Repository navigation
Conversation
…ked 16-bit textures on NVIDIA
|
Test report on the hardware the two Setup: Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818, Rust 1.98.1, Warnings at the first screens, main vs this PR:
So both packed 16-bit targets now exist on this GPU, and the depth-stencil UAV takes the scratch stand-in. The one remaining Where the run goes: past the first screens and into the world. The frame log reaches Then the known NVIDIA hang, unchanged by this PR: a submission of 11 lists takes 10.97 s and the device is removed with 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). |
|
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.
No game files; only log lines and timings. AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
Tested on an RTX 4070 (driver 32.0.16.2101) on top of #493 + #483. Run with
AI-assisted. |
…arvisak#581, intégrée sur local/hang-fix) Un slot nul écrit en SRV Texture2D puis lu en UAV est un mismatch de type qui fait tomber le GPU NVIDIA (DEVICE_HUNG sur 969c1cef8b783b39 et 5552dac6a2b7a1fd). Intégration : résolution de deux conflits (whole_uav + depth_scratch conservés ; effacement des clear values packed16 vers R16_UNORM).
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 0a936b6 on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 43 passed. Clippy's 1 warning is the existing one in host.rs. I didn't run a title here, and the PR adds no tests.
Typed null descriptors for empty table slots (make_null_for_used) are the right fix: a CBV, buffer SRV, or buffer or texture UAV slot now gets a null descriptor of its declared kind instead of a 2D-texture SRV. Two parts trade a fault for silently wrong results and should say so, or be gated:
descriptor/host.rs(fits,own == 53): a packed 16-bit colour view (B5G5R5A1,B4G4R4A4, or unknown) on anR16_TYPELESStexture becomesR16_UNORM/R16_UINT. The shader then reads one 16-bit channel where it expects four packed channels, so colours come out wrong without any error. If the host texture really lost its packed format, fix that at texture creation, or at least log once per texture so it's visible.depth_scratch: a UAV on a depth texture is redirected to a scratch texture. Writes are discarded and reads return scratch contents. That's acceptable as a stop-gap against device removal, but it needs ashortcut:note and a one-timewarn, so a missing effect isn't mistaken for a translator bug.- A unit test for
make_null_for_used's kind mapping (the sentinel table) would be cheap and would catch a swapped arm.
AI-assisted (Claude Code).
…ck (PR #581) NVIDIA rejects B5G5R5A1 (86) and B4G4R4A4 (115) with render-target or UAV flags, so the 2560x1440 targets of those formats got 'no host texture 0x80070057' and every view of them became a null descriptor. They are now stored as R16_TYPELESS (same 16 bpp) and viewed as R16_UNORM; empty table slots get a null descriptor of the kind the shader reads. Clean merge; the 73 victory-gpu tests pass. Descriptor tests are upstream's; the packed-format fallback itself needs real hardware. Targets symptom 5 (no host texture 0x80070057, formats 86/115). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d texture_at hosts
|
Automated triage for the maintainers. Closing because this change is already in 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. |
Problem
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