DepthStencilState validation fixes#8840
Conversation
|
(Responding to discussion of a possible A data point: https://github.com/search?q=language%3ARust+RenderPipelineDescriptor+DepthStencilState&type=code finds 6.7k files 😬. Even the need to add |
aff5f3b to
5196d9a
Compare
|
@cwfitzgerald you had proposed a different change that would create a separate (And I guess separately from that, there's also a question of whether to offer a migration via |
The depth-related fields are optional in the WebGPU API, and must be specified iff they are relevant to the configuration. Fixes gfx-rs#8830
5196d9a to
e78b04a
Compare
The depth-related fields are optional in the WebGPU API, and must be specified iff they are relevant to the configuration. In order to have
wgpu-coreprovide a common implementation of this validation for all the JS clients, this changes pipeline descriptors to use a newDepthStencilStateIdlstruct that matches the spec (at least for the enable/compare -- it still differs from the spec in that the depth bias and stencil configuration are not inlined).DepthStencilStateis maintained as-is so that implementations can keep the same struct literals and just add a call to.into(). I also added some associated method constructors that will be forwards-compatible with makingDepthStencilStatelook likeDepthStencilStateIdl.There is some related discussion in Matrix. We may decide to create a separate
DepthStatestruct instead.This PR conflicts with #8856. Whichever lands second should enable the entire
depth_stencil_statesuite.Testing
Enables some relevant CTS tests.
Squash or Rebase? Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.