Repository navigation
Runtime: stencil-plane SRVs only on their own depth-stencil family - #778
Merged
Merged
Conversation
The stencil side of ItsNotRexed#767. image_descriptor accepted X24_TYPELESS_G8_UINT and X32_TYPELESS_G8X24_UINT plane-1 views on either family, so an R32G8X24_TYPELESS texture with an X24_TYPELESS_G8_UINT view (or the other way round) got a live 8_UINT T# where D3D12 refuses the view. Each stencil view format is now accepted on its own DXGI family only: X24_TYPELESS_G8_UINT on R24G8_TYPELESS / D24_UNORM_S8_UINT, X32_TYPELESS_G8X24_UINT on R32G8X24_TYPELESS / D32_FLOAT_S8X24_UINT. The family is the DXGI format, not the Vulkan one behind it. d3d12_descriptor_test checks that the other family's stencil view format leaves the slot null on both textures; on main that check fails.
2 tasks done
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.
Follow-up of my #668 (D3D-75): the stencil side of #767. Claimed in #634.
image_descriptoraccepted both stencil view formats,X24_TYPELESS_G8_UINTandX32_TYPELESS_G8X24_UINT, for a plane-1 view of either depth-stencil family. So anR32G8X24_TYPELESStexture viewed asX24_TYPELESS_G8_UINT(or anR24G8_TYPELESSone asX32_TYPELESS_G8X24_UINT) got a live 8_UINT T#, where D3D12 refuses the view because the format is outside the resource's family.Change: each stencil view format is accepted on its own DXGI family only.
X24_TYPELESS_G8_UINT: onR24G8_TYPELESSandD24_UNORM_S8_UINT.X32_TYPELESS_G8X24_UINT: onR32G8X24_TYPELESSandD32_FLOAT_S8X24_UINT.As in #767, the family is the texture's DXGI format, not the Vulkan format behind it (a D24 texture may be
D32_SFLOAT_S8_UINTon AMD). Anything else leaves the slot null with a log.This touches the stencil check in
image_descriptorand #767 touches the depth check a few lines below, so the two should merge in either order.Test (
d3d12_descriptor_test): for both textures, the other family's stencil view format leaves the slot null. Onmainthat check fails (line 564); with this change it passes.Tested on NVIDIA GeForce RTX 4070 SUPER, driver 32.0.16.1088, Windows 11, MSVC 2022:
d3d12_descriptor_testpasses withLEONIDA_VK_VALIDATION=1and 0 validation errors;ctestpasses 29/29.The
checkjob may stay red until #713 restores therpf9-explorerpin onmain. No game files used.AI-assisted.