Validation fixes for dual-source blending, depth bias, and frag_depth#8856
Validation fixes for dual-source blending, depth bias, and frag_depth#8856andyleiserson merged 3 commits intogfx-rs:trunkfrom
frag_depth#8856Conversation
e5801e2 to
1f70e72
Compare
1f70e72 to
6de61ed
Compare
|
This doesn't solve my issue (should have been an issue not a discussion): #8798 This is using a GLSL shader which works correctly if I hack wgpu to disable this validation completely. |
It's not related to this change, but I filed #8864 from your discussion, and opened #8865 and kas-gui/kas#635. |
Wumpf
left a comment
There was a problem hiding this comment.
very nice, thanks for the logical commit split
wgpu-core/src/validation.rs
Outdated
| .iter() | ||
| .any(|varying| matches!(varying, Varying::BuiltIn(naga::BuiltIn::FragDepth))) |
There was a problem hiding this comment.
would be nice if those types would be Eq so we could just do a contains, any reason why not?
There was a problem hiding this comment.
I don't see why not. Depending on how tightly the enums get packed, the Varying::Local { location: u32, iv: InterfaceVar } variant could be one or two words, or could be a handful more than that, but it's not so much that it seems inappropriate to implement Eq.
c20c23a to
bc4b44e
Compare
* Depth bias is only supported with triangle topologies (fixes gfx-rs#6071) * If the shader outputs `frag_depth`, the pipeline must have a depth attachment
bc4b44e to
75180c3
Compare
Several validation fixes. The only reason the dual-source blending fix is related is that both it and the
frag_depthfix add fields toShaderStageForValidation::Fragmentthat @ErichDonGubler added recently.frag_depth, then the pipeline must have a depth attachment. (No bug.)This change will conflict with #8840, which needs more discussion, so I expect #8840 will be rebased on this one. Whichever lands second should enable the entire
depth_stencil_statesuite.Testing
Enables relevant CTS tests.
Squash or Rebase? Rebase
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentries.