-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ensure render pipelines have at least 1 target #5715
fix: ensure render pipelines have at least 1 target #5715
Conversation
e12651b
to
b74508e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
8272494
to
65356d0
Compare
Oof, it appears this change has caught at least one place the CTS is doing something that seems non-standard in
|
CTS fix for |
I think there are more such occurrences in cts: https://github.com/sagudev/servo/actions/runs/9602065915/job/26483847356, but on my repro even Edge https://sagudev.github.io/briefcase/WGPURenderPipeline does not trigger error, so I thought I interpreted spec wrong. EDIT: Opened gpuweb/cts#3806 |
Connections
None of note.
Description
Important validation is performed on render pipeline configuration (like multisampling) against render targets. However, when no targets are specified, WGPU still compiles pipelines. It misses not just this validation1, but also the case mandated by WebGPU spec., section 10.3.1. (
Render Pipeline Creation
), which states in the subsection titledvalidating GPURenderPipelineDescriptor(descriptor, layout, device)
:Even if the entire space of possible render targets would have rejected the pipeline's configuration,
wgpu-core
still asks backends to compile pipelines using potentially invalid configuration when no targets are specified. These backends can then misbehave in very different ways, which I've tested with erichdongubler-mozilla#82 for multisampling specifically; examples:While there are valid use cases for executing render pipelines with no render targets (DX12 and Vulkan support this, for instance), the WebGPU standard currently does not enable them.
Testing
Tests have been added in this PR; see the changes in
tests/
for more details. As described above, these tests were cherry-picked separately and tested in erichdongubler-mozilla#82; this PR definitely fixes them.Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.Footnotes
While not germane to this bug, specifying a render target is the only way to get a usable render pipeline, so functioning applications are unlikely to do this in shipped code. ↩