Fix write-only stencil state descriptors from not working - fixes #911#912
Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom Aug 31, 2020
Merged
Fix write-only stencil state descriptors from not working - fixes #911#912bors[bot] merged 1 commit intogfx-rs:masterfrom
bors[bot] merged 1 commit intogfx-rs:masterfrom
Conversation
This was referenced Aug 30, 2020
grovesNL
reviewed
Aug 30, 2020
| (self.front != StencilStateFaceDescriptor::IGNORE | ||
| || self.back != StencilStateFaceDescriptor::IGNORE) | ||
| && self.read_mask != 0 | ||
| && (self.read_mask != 0 || self.write_mask != 0) |
Collaborator
There was a problem hiding this comment.
@kvark this is the check I was also wondering about in #873 (comment)
Member
There was a problem hiding this comment.
yeah, sorry, looks like I screwed this up 😓
Collaborator
There was a problem hiding this comment.
No problem :) I just wanted to link it here in case it was intentional
kvark
approved these changes
Aug 31, 2020
Member
kvark
left a comment
There was a problem hiding this comment.
I double checked Vulkan spec, and I think I was just confused about this. Write and read masks are separate.
bors +
Contributor
|
Did you mean "r+"? |
Member
|
bors r+ |
Contributor
|
Build succeeded: |
Member
|
@Dinnerbone could you make the same PR against the 0.6 branch, and add a small commit that bumps wgpu-types patch version and adds a small line to the changelog? |
Member
|
I've done the backporting myself, and this fix is now available in |
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Sep 2, 2020
548: wgpu update with correctness fixes r=kvark a=kvark Picks up a few important correctness fixes, such as gfx-rs/wgpu#916 and gfx-rs/wgpu#912 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
kvark
added a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
548: wgpu update with correctness fixes r=kvark a=kvark Picks up a few important correctness fixes, such as gfx-rs#916 and gfx-rs#912 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Connections
This fixes #911 - Stencil testing broken between v0.5 and v0.6.
Description
Write-only stencil states (read 0, write >0) are being treated as if they are disabled, which causes pipelines to act as though they don't have any stencil state set at all. This worked prior to commit 2473c25 (introduced in PR #873). As far as I can tell, this works fine in Vulkan, Metal, DX12 and DX11 as we've been using this approach over at Ruffle for a while now.
Testing
You can view the reproduction case in #911 for manual testing. I have confirmed that this fix makes that case work as expected.
I couldn't find any automated tests for wgpu-types to copy and add for this case. If that's wanted then please let me know what the best approach is.