Repository navigation
d3d12: give 16-bit depth with stencil a writable depth plane - #162
Merged
Merged
Conversation
GTA VI creates its scene depth as D16_UNORM_S8_UINT with both depth-stencil and unordered access, and writes depth from compute through an R16_UNORM view of the depth plane. Host depth images cannot have unordered access, so these views had nothing to write to. Use the float depth pair that R32G8X24 surfaces already have. The host depth becomes D32_FLOAT_S8X24_UINT, whose float holds every 16-bit value exactly, so an EQUAL test against a depth a shader wrote still passes. A view of the stencil plane becomes a null view and is reported once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
GTA VI creates its scene depth as D16_UNORM_S8_UINT with depth-stencil and unordered access and writes depth from compute through an R16_UNORM view. Host depth images cannot have unordered access, so those views had nothing to write to.
Uses the float depth pair that R32G8X24 surfaces already have. D32_FLOAT holds every 16-bit value exactly, so EQUAL depth tests still pass. A view of the stencil plane becomes a null view and is reported once.
🤖 Generated with Claude Code