GPU: typed null descriptors for empty table slots, depth-UAV scratch stand-in, and packed 16-bit fallback #581
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!581
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/581/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@FibbS6 on GitHub · 2026-11-24 05:13 UTC · original
FibbS6:fix/nvidia-null-descriptors-and-views→main· +199 −4 · 4 files · 2 commits · closed without mergingProblem
On NVIDIA D3D12 hardware (tested on RTX 4070), several descriptor-table edge cases cause D3D12 validation errors and GPU page faults / hangs (related to #392):
UAV,CBV, orBuffer(dwords == 4), NVIDIA drivers fault or hang on the mismatched descriptor type.R16_TYPELESS/R32G8X24_TYPELESSwithPlaneSlice=1) cannot have UAVs created directly on D3D12, leaving null/invalid descriptors and triggering validation errors onPlaneSlice.86/115) lacked a host typeless fallback when creating views.Fix
SRV,UAV,CBV, buffer vs. texture) matching the shader's declaredUsedResourcemetadata.PlaneSlice = 0forTexture2D/Texture2DArray) when a depth-stencil surface is bound as a UAV.R16_TYPELESSview fallback for packed 16-bit formats.Verification
cargo xtask policy— passed (151 files ok)cargo test -p victory-gpu -- --test-threads=1—43 passed, 0 failed@Nixitov on GitHub · 2026-11-24 06:04 UTC · original
Test report on the hardware the two
no host texturewarnings come from (RTX 5070, native Windows D3D12).Setup: Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818, Rust 1.98.1,
cargo build --release -p victory, based2a4bae+ this PR merged, no other local changes except therpcrt4policy line from #636 (unrelated file).Warnings at the first screens, main vs this PR:
d2a4baeno host texture ... format: 86, flags: 5(2560x1440, UAV)no host texture ... format: 115, flags: 1(2560x1440, RT)view the host does not allow unordered=true format=53 flags=2depth UAV: scratch stand-in format=53 width=768 height=768So both packed 16-bit targets now exist on this GPU, and the depth-stencil UAV takes the scratch stand-in. The one remaining
view the host does not allowis the depth surface's own UAV view, one line before the stand-in: expected, and it does not stop the frame.Where the run goes: past the first screens and into the world. The frame log reaches
frame = 1024(4976 draws / 514 dispatches in the preceding 512 frames) after about 35 s, and pipeline creation continues to frame ~1669. Menus are at 30 fps.Then the known NVIDIA hang, unchanged by this PR: a submission of 11 lists takes 10.97 s and the device is removed with
0x887A0006(DXGI_ERROR_DEVICE_HUNG, reported after0x887A0004). It holds 16 compute pipelines, 24 mesh+pixel pipelines and one vertex+pixel pipeline; the compute hashes in that submission were19e215b47ff9112a,1d449fb6a212a044,362753554f3ad60b,5fae02b711504eee,6a62009bc6a4146e,6b48bef1005f4f2f,81e79f687ae84943,9146291b38ea9ce1,98888f39b68dbfde,9938c251a313fe28,e3d5f313df8f0bd0,ec4528c014a996ca,eccf008b413ba7b1,f7f9f22551967b84,fb9c7f430da14c4c. Not breadcrumbed (release build, no DRED).Not covered by this test: the menus' pixels were not compared beyond the frame count; AMD/Intel and WARP were not run. No game files are included; only log lines and shader hashes.
AI-assisted (DeepSeek V4.1 Flash coding agent).
@Nixitov on GitHub · 2026-11-24 06:24 UTC · original
Follow-up: this stacks cleanly on #493 + #483 (the pair that stops the RTX 5070 world hang for me), and in a full world run the texture warnings stay gone.
d2a4bae+ #493 + #483 + this PR, merged in that order:cargo build --release -p victoryclean, no conflicts after the one described on #493 (guard slot on the variable dynamic range).no host texturelines, 1depth UAV: scratch stand-in format=53 width=768 height=768, 1.8-1.9 fps at 500-1207 draws per frame.No game files; only log lines and timings.
AI-assisted (DeepSeek V4.1 Flash coding agent).
@iurysf on GitHub · 2026-11-24 08:06 UTC · original
Tested on an RTX 4070 (driver 32.0.16.2101) on top of #493 + #483. Run with
VICTORY_D3D12_DEBUG=1+VICTORY_D3D12_GBV=1+DRED=1, one run each.AI-assisted.
@Marvisak on GitHub · 2026-11-25 00:25 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Three hacks against old code: depth UAVs written into a throwaway scratch texture (main has depth twins, twin.rs), null CBVs via CreateConstantBufferView (main reads constant buffers as raw views), and an unexplained format-53 to R16 view fallback.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed