Implement the new checks for readonly stencils #3443
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
cargo clippy
. (clippy is complaining about other parts of the codebase)RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
None that I know of
Description
wgpu currently checks if the
write_mask
is 0 to determine wether a stencil is used as readonly or not. However Webgpu contains a more complex ruleset that also checks the cull mode and face operations to determine if the stencil is readonly or not.This PR aims to align the wgpu rules with the webgpu specification.
Testing
This changes was tested by using this patch and checking that the validation passes
and running some more complex applications that had the same problem.