-
Notifications
You must be signed in to change notification settings - Fork 335
Read-only depth-stencil pass #746
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
Conversation
Marking for "Needs Discussion" for the meeting after the next one, since we are behind the deadline for the current one. |
+1 for the overall idea, but I have a concern that it adds another piece of renderpass <-> pipeline compatibility to check. Previously the attachment sample-count and formats had to match exactly so we could optimize the check to be a single pointer compare. With this pipelines that are read-only for depth/stencil can be used for render passes with both read-only or writeable depth-stencil attachments. So we can't precompute the validation and have to check at |
For our implementation, there isn't any significant increase in the cost. At pipeline binding, we are currently checking the attachment formats, sample count, blend color, and stencil reference, plus the compatibility of the bindings. One extra flag is not changing the picture here. Moreover, we will combine blend color, stencil ref, and these new read-only flags into just a required bitmask, so adding flags there will be essentially free.
I think that would be redundant. We can already see if the depth write mask is set there, and if the stencil operations are mutating. |
This is cheap enough, I'll retract my comment. LGTM |
Does this need to be tracked separately from #514 on the project board? |
Creating these kinds of read-only feedback loops (or, non-feedback loops, as it were) are well-defined and valid in Metal. |
@kainino0x no, I added "Fixes #514" to the description. |
…uilt-in functions (gpuweb#746)
Fixes #514
This is a strawman proposal to solve the use case explained in #514 (comment)
If the depth in a render pass is read-only, its usage allows it also be used as a shader-accessible texture in this pass.
Obviously the spec will need to explain how this works. Filed #745 for more general introduction of the "shadow" usage bits.
Edit - unresolved questions:
Preview | Diff