Handle optional depth and stencil views of view depth and prepass depth texture#24725
Open
beicause wants to merge 5 commits into
Open
Handle optional depth and stencil views of view depth and prepass depth texture#24725beicause wants to merge 5 commits into
beicause wants to merge 5 commits into
Conversation
IceSentry
reviewed
Jun 24, 2026
kfc35
approved these changes
Jun 27, 2026
kfc35
left a comment
Contributor
There was a problem hiding this comment.
Just comments on whether it’s valuable to re-name in this PR, and some two other smaller things. Looks good to me though
| (None, Some(shadow_occlusion_culling)) => &shadow_occlusion_culling.depth_texture_view, | ||
| (None, None) => { | ||
| // No depth texture | ||
| continue; |
Contributor
There was a problem hiding this comment.
This used to panic before if I understand correctly. Is this now an acceptable thing to just ignore? Should there be a warning just in case?
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.
Objective
Related: #21358
Supersedes #22556
Solution
To support custom depth formats, we need to handle depth and stencil views depending on usage: only single aspect view can be used as resource binding in shaders, only full aspect view can be used as a render attachment.
Refactor
DepthAttachment,ViewDepthTextureandViewPrepassTextures::depthto handle optional depth and stencil views.This does not yet support custom depth formats. The depth formats needs to be added to pipeline key similar to how color texture formats are handled, as a followup (adopt #21493)
Testing
CI