Repository navigation
Shaders: a descriptor only read as data of eight dwords is a measured image - #81
undeadhuman37 wants to merge 2 commits into
Conversation
… image The pixel shaders 7d0f14ce44746d7e and 6b6db9f1a526daeb of the world run read an image descriptor's size bits with no instruction that samples it, so no use named its kind and the program was refused. Eight dwords are taken for an image descriptor (2D) and its size comes from getDimensions. The waterfall test runs the console loop that ends in v_alignbit_b32 of dwords 1 and 2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Tested on an RTX 5080 (merged with #71, #77 and #38 on
Setup: NVIDIA GeForce RTX 5080 16 GB, driver 621.14, i9-13900KF, Windows 11 26200, release build. AI use: Claude Code, Claude Opus 5.5 built the merged branch, ran it on the machine above (the person at the machine played) and read the logs. |
|
Independent test run on commit
AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report. |
|
Offline coverage of this PR on the retail shader pack, measured alone on its base Method: worktree at
+35 gained, 0 lost. All 35 are puddle detection, and only three distinct programs, repeated across containers: That is exactly the refusal the title reports on my machine: So this one should be testable as a visual difference (wet ground) rather than a count. Largest clean gain I have measured on this pack after the BVH branch (which was +334), and unlike #52 it takes nothing away. No game data; counts and program names only. |
|
Merged onto main 90228a7 and ran
|
|
A visual regression with this PR under Linux/Proton: the cell's walls disappear in the first gameplay room. Skipping the two pixel programs it makes translate brings them back. RTX 4070 Ti 12 GB, NVIDIA 620.70.06 (open modules), Fedora 45; Proton Experimental Wine, vkd3d-proton Three runs, same scene (Lucia at the cell window, then walking into the room):
So with the two pixel programs translated, their draws (3 and 8 per frame here) cover the room's walls. My guess is the shortcut in the change: an eight-dword entry that no range names is taken for a 2D image, and here it may be another kind of view (a cube, for example), so the programs sample the wrong thing. I have not checked what they bind. One run each, so treat it as a lead. It may not show on Windows: the Windows reports above don't mention missing walls. Unrelated to the walls, for anyone else on Linux: these runs use a local fix for dxil-spirv's endless recursion in the dominator computation (HansKristian-Work/dxil-spirv#376, since closed by its maintainer with a fix on another branch). Without it, four compute pipelines kill their worker thread under Wine every run and stay "being made". AI use: Claude Code (Claude Opus 5.5) ran these tests on my machine and drafted this comment. |
|
Correction to my comment above: the missing walls are not caused by this PR. Two later runs that skip both pixel programs ( Sorry for the noise. Nothing here speaks against the change. AI use: Claude Code (Claude Opus 5.5) ran these tests on my machine and drafted this comment. |
|
Tested on an RTX 5080 (Windows 11, driver 621.24, 32.0.16.2124, Ryzen 7 5700X3D). Build:
The two programs this PR fixes were refused before, so their draws didn't run in the run without it. The window and wall difference therefore suggests the change also alters how some other, already-translating program resolves its views. A likely candidate is "the table's range names the view's kind". I haven't traced which program draws the glass or the papers. Is the clear glass what you see on the 4070 too? AI-assisted (Claude Code). Runs on my own machine with my own copy; no captures attached. |
A refused descriptor load is deferred: where nothing needs its dwords the program translated before. The eight-dword fallback also applied there, adding a 2D heap handle and getDimensions to programs that already worked. It now runs only after the whole emit has refused with that message, so a program that translated before comes out as it did. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Correction: the window difference in my report above probably isn't caused by this PR, the same conclusion as the correction above mine. A later run without this PR, on the same machine and scene, came out with the same clear glass and no papers on the wall. That run was the base build plus an unrelated change, with the late-wait switches on. Over five runs these details came and went: without this PR the papers were missing in 2 of 4 runs and the glass was clear in 1 of 4. One run each can't pin them on this PR. The rest of the report stands: both refusals are gone (8 → 6 refused programs), and the build held 20 minutes with no device loss. AI-assisted (Claude Code). |
What
A scalar load of an image descriptor whose dwords the code reads only as numbers (the width and height bits, never sampled) was refused with "a descriptor read only as data", because the view's kind came only from a use. Now the table's range names the view's kind, and an entry in the resource heap that no range names is taken for a 2D image when it is eight dwords (marked
shortcut:in the code). The size then comes fromgetDimensions.Two pixel programs of the title's first scene were refused for exactly this and now translate.
Tested
cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(497 passed, 0 failed) andcargo xtask policypass, on Windows with an RTX 4070 and the host GPU tests enabled.a_descriptor_only_read_as_data_gives_its_views_size: a hand-assembled waterfall program that reads a texture's size throughs_load_dwordx8andv_alignbit_b32, with no sampling. It fails with the old refusal without the change.AI use: an AI tool (Claude Code) wrote this change; a person ran and reviewed the checks.