Shaders: a descriptor only read as data takes its kind from its table #1067

Closed
github-bot wants to merge 1 commit from gh-pr/1067/head into gh-pr/1067/base
Owner

@⁠undeadhuman37 on GitHub · 2026-11-24 15:27 UTC · original
undeadhuman37:pr/descriptor-read-as-data → main · +129 −37 · 2 files · 1 commits · closed without merging

What changed

An s_load_dword* of a descriptor whose dwords the code reads as numbers (an image's width and levels) but never samples was refused with "a descriptor read only as data", because the view's kind came only from a use point. Now:

  • the table's range names the kind when it has one;
  • an entry in the resource heap that no range names (a run-time index reaches it) is an image when it is eight dwords, taken for 2D.

Known limit, marked shortcut: in the code: an unnamed eight-dword heap entry is taken as a 2D image, so a cube, 3D or array texture reads sizes of the wrong rank.

Measured

victory translate over the title's shader archive, taken on our integration branch (this commit on top of other fixes, not on bare main), so the deltas on main may be smaller:

before after
programs refused 4123 3749
"a descriptor read only as data" 395 18
compute programs emitted 1441 1743
compute programs validated 1417 1647

A hand-assembled waterfall program that reads two textures' sizes is the new test (waterfall_tests.rs). It fails with the old refusal without the change, and passes on the host GPU and on WARP.

Checks on current main (ffe310e)

  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean
  • cargo test -p victory-shader --locked: 121 passed, 0 failed, 1 ignored

No game data is included, only counts. This work was AI-assisted.

🤖 Generated with Claude Code

**@⁠undeadhuman37** on GitHub · 2026-11-24 15:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067) `undeadhuman37:pr/descriptor-read-as-data` → `main` · +129 −37 · 2 files · 1 commits · closed without merging ## What changed An `s_load_dword*` of a descriptor whose dwords the code reads as numbers (an image's width and levels) but never samples was refused with "a descriptor read only as data", because the view's kind came only from a use point. Now: - the table's range names the kind when it has one; - an entry in the resource heap that no range names (a run-time index reaches it) is an image when it is eight dwords, taken for 2D. Known limit, marked `shortcut:` in the code: an unnamed eight-dword heap entry is taken as a 2D image, so a cube, 3D or array texture reads sizes of the wrong rank. ## Measured `victory translate` over the title's shader archive, taken on our integration branch (this commit on top of other fixes, not on bare main), so the deltas on main may be smaller: | | before | after | |---|---|---| | programs refused | 4123 | 3749 | | "a descriptor read only as data" | 395 | 18 | | compute programs emitted | 1441 | 1743 | | compute programs validated | 1417 | 1647 | A hand-assembled waterfall program that reads two textures' sizes is the new test (`waterfall_tests.rs`). It fails with the old refusal without the change, and passes on the host GPU and on WARP. ## Checks on current main (ffe310e) - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean - `cargo test -p victory-shader --locked`: 121 passed, 0 failed, 1 ignored No game data is included, only counts. This work was AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
An s_load_dword* of a descriptor whose dwords the code reads as numbers
(an image's width and levels) but never samples was refused with "a
descriptor read only as data": the view's kind came only from a use. Now
the table's range names it, and an entry in the resource heap that no
range names (a run-time index reaches it) is an image if it is eight
dwords, taken for 2D (shortcut noted in the code).

Offline over the whole corpus, programs refused: 4123 -> 3749; "a
descriptor read only as data" 395 -> 18; compute programs emitted
1441 -> 1743 (validated 1417 -> 1647). Tested with a hand-assembled
waterfall program that reads two textures' sizes, on the host GPU and
WARP; it fails with the old refusal without the change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:50 +00:00
github-bot closed this pull request 2026-11-26 04:18:50 +00:00
Author
Owner

@⁠sambagarandawertanda on GitHub · 2026-11-24 15:42 UTC · original

I ran the same small fixture with and without the #1067 lowering on our integration tree. The shader loads a fixed 8-dword SRV table entry with s_load_dwordx8, reads width and height without sampling, and writes the encoded dimensions to a raw UAV. The input is a generated 8×4 RGBA32F texture.

  • The original lowering stopped at byte offset 40 with a descriptor read only as data.
  • With the patch, all 32 lanes returned 0x00030007 (width minus one = 7, height minus one = 3) on RTX 3080 (driver 32.0.16.2114) and WARP.

Two distinct compute shaders hit the same translation refusal in an earlier prologue trace. This test covers a 2D table entry. Array and 3D dimensions and the effect on the prologue remain unverified.

AI-assisted fixture, tested locally with generated data.

**@⁠sambagarandawertanda** on GitHub · 2026-11-24 15:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7136491034) I ran the same small fixture with and without the #1067 lowering on our integration tree. The shader loads a fixed 8-dword SRV table entry with `s_load_dwordx8`, reads width and height without sampling, and writes the encoded dimensions to a raw UAV. The input is a generated 8×4 RGBA32F texture. - The original lowering stopped at byte offset 40 with `a descriptor read only as data`. - With the patch, all 32 lanes returned `0x00030007` (width minus one = 7, height minus one = 3) on RTX 3080 (driver 32.0.16.2114) and WARP. Two distinct compute shaders hit the same translation refusal in an earlier prologue trace. This test covers a 2D table entry. Array and 3D dimensions and the effect on the prologue remain unverified. AI-assisted fixture, tested locally with generated data.
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 16:26 UTC · original

Sizing for NVIDIA: with console-flow wave64 in place, this refusal becomes the largest one in compute, so it pairs well with #439.

Full offline census (26,503 containers, DXIL validation, --host-lanes 32-32) of ffe310e + #439 (bf0f951) + r4tedx's shader/wave-per-group + #493 + #206 + #667 + #704 + #878 + #489 + #294/#709, without this PR:

a descriptor read only as data programs
compute 891
all stages 998

Of the 411 compute programs my #189 (Wave32) stack refuses for its two main wave reasons, 253 reach this one next on the #439 stack, and only 103 validate. r4tedx counts 730 compute programs at it on #439 alone (#439).

JMAN730's fork has an independent change for the same class, 57c98c7 ("twin descriptor loads and quad gradients for compute samples"). My stack on that fork is at 1 compute program for this reason (7 in all stages). #979 infers the view in a similar way. So there are three versions of this, worth comparing before one lands.

I haven't measured this PR on the #439 stack. The known limit you mark, the 2D guess for an unnamed heap entry, is what I'd check at runtime.

AI-assisted (Claude Code): the census was automated. The hardware, title copy and runs are the user's.

**@⁠NuraadGit** on GitHub · 2026-11-24 16:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7137677846) Sizing for NVIDIA: with console-flow wave64 in place, **this refusal becomes the largest one in compute**, so it pairs well with #439. Full offline census (26,503 containers, DXIL validation, `--host-lanes 32-32`) of `ffe310e` + #439 (`bf0f951`) + r4tedx's `shader/wave-per-group` + #493 + #206 + #667 + #704 + #878 + #489 + #294/#709, without this PR: | `a descriptor read only as data` | programs | |---|---:| | compute | **891** | | all stages | 998 | Of the 411 compute programs my #189 (Wave32) stack refuses for its two main wave reasons, 253 reach this one next on the #439 stack, and only 103 validate. r4tedx counts 730 compute programs at it on #439 alone (https://git.gtahub.st/github/Marvisak--VIctory/pulls/439). JMAN730's fork has an independent change for the same class, [`57c98c7`](https://github.com/JMAN730/VIctory/commit/57c98c77b54f131f9241073930e761a05f8ef477) ("twin descriptor loads and quad gradients for compute samples"). My stack on that fork is at 1 compute program for this reason (7 in all stages). #979 infers the view in a similar way. So there are three versions of this, worth comparing before one lands. I haven't measured this PR on the #439 stack. The known limit you mark, the 2D guess for an unnamed heap entry, is what I'd check at runtime. *AI-assisted (Claude Code): the census was automated. The hardware, title copy and runs are the user's.*
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 6d30fd7: cargo test -p victory-shader passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7137761659) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 6d30fd7: `cargo test -p victory-shader` passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 16:38 UTC · original

Independent check on Linux (RX 9070 XT, RADV/Mesa 26.3.1, dxil-spirv master, spirv-val 1.3). Your head 6d30fd7 applied alone onto origin/main ffe310e, then the offline four-stage check over the 751-program world dump plus the 52-program BVH capture (768 programs once 35 duplicate containers are skipped):

translated translate refusals "a descriptor read only as data" spirv-val / pipeline failures
main ffe310e 666 102 4 (2 compute, 2 pixel) 10 / 0
your head 670 98 0 10 / 0

Exactly those 4 programs clear and nothing else changes: no new refusal, and the 10 spirv-val failures are the same pre-existing ones. "a descriptor's address or format read as data" stays at 1.

For comparison I also built my own attempt at the same 4 programs (a raw buffer view, commit 61085ee in our tree, not pushed): it clears them too, but one lands on "a descriptor's address or format read as data", so 669 translated. Taking the kind from the table is the better fix; I did not open a competing PR.

Not tested: the full archive (only these dumps), in-game, native Windows.

**@⁠pablogonz12** on GitHub · 2026-11-24 16:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7137972109) Independent check on Linux (RX 9070 XT, RADV/Mesa 26.3.1, dxil-spirv master, spirv-val 1.3). Your head 6d30fd7 applied alone onto origin/main ffe310e, then the offline four-stage check over the 751-program world dump plus the 52-program BVH capture (768 programs once 35 duplicate containers are skipped): | | translated | translate refusals | "a descriptor read only as data" | spirv-val / pipeline failures | |---|---|---|---|---| | main ffe310e | 666 | 102 | 4 (2 compute, 2 pixel) | 10 / 0 | | your head | 670 | 98 | 0 | 10 / 0 | Exactly those 4 programs clear and nothing else changes: no new refusal, and the 10 spirv-val failures are the same pre-existing ones. "a descriptor's address or format read as data" stays at 1. For comparison I also built my own attempt at the same 4 programs (a raw buffer view, commit 61085ee in our tree, not pushed): it clears them too, but one lands on "a descriptor's address or format read as data", so 669 translated. Taking the kind from the table is the better fix; I did not open a competing PR. Not tested: the full archive (only these dumps), in-game, native Windows.
Author
Owner

@⁠shortselow-byte on GitHub · 2026-11-24 16:41 UTC · original

#1067 and #1130 both remove the refusal "a descriptor read only as data", in different ways, and neither mentions the other:

  • #1067: the kind comes from the table's range; an unnamed eight-dword heap entry is taken as a 2D image (its shortcut:).
  • #1130: the kind comes from another load of the same entry (same parameter, offset and term, or the same waterfall VGPR) that is used as a resource.

Tested on Windows 11, Rust 1.98.1 MSVC, AMD Radeon RX 6900 XT, both on main ffe310e (neither has a CI run yet):

workspace tests clippy (default, --all-features) policy
#1067 6d30fd7 343 passed, 0 failed clean ok
#1130 98f073d 343 passed, 0 failed clean ok

They conflict in lower.rs (descriptor_data), so whichever merges second needs a rebase. They combine naturally: in #1067's version, match use_at.or_else(|| self.same_entry_use(site)), so #1130's lookup runs first and #1067's table/heap fallback only when no other load of the entry is used. With that one-line resolution (local, not pushed), both new tests pass together (a_descriptor_only_read_as_data_gives_its_views_size on the AMD device and WARP, a_descriptor_read_only_as_data_takes_the_kind_of_its_entrys_use), the workspace has 344 passed, 0 failed, and both clippy runs are clean.

That order would also keep #1067's 2D guess for heap entries that #1130 can't name, instead of using it first.

**@⁠shortselow-byte** on GitHub · 2026-11-24 16:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7138060411) #1067 and #1130 both remove the refusal "a descriptor read only as data", in different ways, and neither mentions the other: - #1067: the kind comes from the table's range; an unnamed eight-dword heap entry is taken as a 2D image (its `shortcut:`). - #1130: the kind comes from another load of the same entry (same parameter, offset and term, or the same waterfall VGPR) that is used as a resource. Tested on Windows 11, Rust 1.98.1 MSVC, AMD Radeon RX 6900 XT, both on `main` `ffe310e` (neither has a CI run yet): | | workspace tests | clippy (default, `--all-features`) | policy | |---|---|---|---| | #1067 `6d30fd7` | 343 passed, 0 failed | clean | ok | | #1130 `98f073d` | 343 passed, 0 failed | clean | ok | They **conflict** in `lower.rs` (`descriptor_data`), so whichever merges second needs a rebase. They combine naturally: in #1067's version, `match use_at.or_else(|| self.same_entry_use(site))`, so #1130's lookup runs first and #1067's table/heap fallback only when no other load of the entry is used. With that one-line resolution (local, not pushed), both new tests pass together (`a_descriptor_only_read_as_data_gives_its_views_size` on the AMD device and WARP, `a_descriptor_read_only_as_data_takes_the_kind_of_its_entrys_use`), the workspace has 344 passed, 0 failed, and both clippy runs are clean. That order would also keep #1067's 2D guess for heap entries that #1130 can't name, instead of using it first.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 17:18 UTC · original

Reviewed 6d30fd7 alongside #979 / #1130 / #953 and found three edge cases worth tightening in the None fallback path:

  1. None if in_views => (false, count as u8, 0) fabricates 2D SRVs for untracked 8-dword loads & passes mip = 0 for UAVs:
    • When used_kind(&src) returns None (for example an s_load_dwordx8 spanning two adjacent 4-dword CBVs or an untracked ResourceHeap load), count == 8 unconditionally declares a 2D SRV (2, 0x409); if the backing slot is actually an RWTexture2D UAV, uav = false passes mip = 0 instead of undef to dx.op.getDimensions (rejected by dxil.dll). Requiring let used = self.used_kind(&src).ok_or(NONE)?; avoids guessing untracked slots.
  2. Load width / narrowed intra-slot offset vs used.dwords:
    • used_kind matches u.table_offset_dwords <= dword with no upper bound, so an s_load_dwordx8 (count = 8) after an earlier 4-dword buffer range (u.dwords = 4) is misclassified as a 4-dword buffer unless in_slot + count <= u32::from(used.dwords) is checked (in_slot = (a.offset % 32) / 4).
    • Accounting for in_slot in rel = (in_slot + k).wrapping_sub(u32::from(first)) also supports LLVM-narrowed single-dword NUM_RECORDS loads at +0x08 (in_slot = 2) instead of failing at rel = 0 ("a descriptor's address or format read as data").
  3. Non-dword-multiple stride fallback (4 if used.is_some() => (11 | u, 0)):
    • When u.dwords == 4 has a non-zero stride that is not a multiple of 4 (e.g. stride = 2), falling through to raw buffer (11 | u, 0) causes getDimensions to return byte length (2 * N) rather than record count (N). Only stride == 0 should map to raw (11 | u, 0).

Verified across 8-dword Texture2D/RWTexture2D, 4-dword StructuredBuffer/ByteAddressBuffer, and narrowed +0x08 RWByteAddressBuffer size readbacks on RTX 5090 + D3D12 WARP + dxil.dll in fuzeofficlal/VIctory@66a9fde.

**@⁠fuzeofficlal** on GitHub · 2026-11-24 17:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7139007398) Reviewed `6d30fd7` alongside `#979` / `#1130` / `#953` and found three edge cases worth tightening in the `None` fallback path: 1. **`None if in_views => (false, count as u8, 0)` fabricates 2D SRVs for untracked 8-dword loads & passes `mip = 0` for UAVs**: - When `used_kind(&src)` returns `None` (for example an `s_load_dwordx8` spanning two adjacent 4-dword CBVs or an untracked `ResourceHeap` load), `count == 8` unconditionally declares a 2D SRV `(2, 0x409)`; if the backing slot is actually an `RWTexture2D` UAV, `uav = false` passes `mip = 0` instead of `undef` to `dx.op.getDimensions` (rejected by `dxil.dll`). Requiring `let used = self.used_kind(&src).ok_or(NONE)?;` avoids guessing untracked slots. 2. **Load width / narrowed intra-slot offset vs `used.dwords`**: - `used_kind` matches `u.table_offset_dwords <= dword` with no upper bound, so an `s_load_dwordx8` (`count = 8`) after an earlier 4-dword buffer range (`u.dwords = 4`) is misclassified as a 4-dword buffer unless `in_slot + count <= u32::from(used.dwords)` is checked (`in_slot = (a.offset % 32) / 4`). - Accounting for `in_slot` in `rel = (in_slot + k).wrapping_sub(u32::from(first))` also supports LLVM-narrowed single-dword `NUM_RECORDS` loads at `+0x08` (`in_slot = 2`) instead of failing at `rel = 0` (`"a descriptor's address or format read as data"`). 3. **Non-dword-multiple `stride` fallback (`4 if used.is_some() => (11 | u, 0)`)**: - When `u.dwords == 4` has a non-zero stride that is not a multiple of 4 (e.g. `stride = 2`), falling through to raw buffer `(11 | u, 0)` causes `getDimensions` to return **byte length (`2 * N`)** rather than **record count (`N`)**. Only `stride == 0` should map to raw `(11 | u, 0)`. Verified across 8-dword `Texture2D`/`RWTexture2D`, 4-dword `StructuredBuffer`/`ByteAddressBuffer`, and narrowed `+0x08` `RWByteAddressBuffer` size readbacks on **RTX 5090 + D3D12 WARP + `dxil.dll`** in [`fuzeofficlal/VIctory@66a9fde`](https://github.com/fuzeofficlal/VIctory/commit/66a9fde8f8c1c163f460c81d7eef9b49f52af519).
Author
Owner

@⁠justlovett0 on GitHub · 2026-11-24 17:32 UTC · original

Runtime verification on Win10/RTX 3080 (driver 621.24): this PR clears the dominant runtime failure class.

We dumped the exact containers of every shader that failed at runtime (VICTORY_DUMP_REFUSALS, a small diagnostics addition) and censused them with victory translate. Across the world runs, the captured failing set was ~466 unique shaders, dominated by "a descriptor read only as data" (303) after the mask classes were cleared by #309.

With this PR stacked (main ffe310e + #175/#994/#302/#193/#704/#309/#953 + this), a re-census of the same captured containers emits 313/381 compute, 11/14 VS/PS, 4/21 mesh — and the in-game untranslated count fell from 444 to 100. Visibly more character and scene geometry loads.

Note for the record: #1056 (which we tried first) gained ~0 on this class, consistent with the #1247 benchmark; this PR is the one that moves it. The residual "descriptor read only as data" cases now report as "a descriptor's address or format read as data" (40) — the dword-0/1 subset your summary routes onward.

Remaining runtime classes after this: descriptor-address/format-as-data 40, address-not-from-root 29 (#1276's pattern), address-from-phi 11, image_gather4_l 9, root-UAV/typed-root-view 8.

AI use: Qwen Code (underlying model name not disclosed by the tool) ran the builds/censuses and drafted this comment at the user's request.

**@⁠justlovett0** on GitHub · 2026-11-24 17:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7139345333) Runtime verification on Win10/RTX 3080 (driver 621.24): this PR clears the dominant runtime failure class. We dumped the exact containers of every shader that failed at runtime (`VICTORY_DUMP_REFUSALS`, a small diagnostics addition) and censused them with `victory translate`. Across the world runs, the captured failing set was ~466 unique shaders, dominated by **"a descriptor read only as data" (303)** after the mask classes were cleared by #309. With this PR stacked (main `ffe310e` + #175/#994/#302/#193/#704/#309/#953 + this), a re-census of the same captured containers emits **313/381 compute, 11/14 VS/PS, 4/21 mesh** — and the in-game untranslated count fell from **444 to 100**. Visibly more character and scene geometry loads. Note for the record: #1056 (which we tried first) gained ~0 on this class, consistent with the #1247 benchmark; this PR is the one that moves it. The residual "descriptor read only as data" cases now report as "a descriptor's address or format read as data" (40) — the dword-0/1 subset your summary routes onward. Remaining runtime classes after this: descriptor-address/format-as-data 40, address-not-from-root 29 (#1276's pattern), address-from-phi 11, image_gather4_l 9, root-UAV/typed-root-view 8. AI use: Qwen Code (underlying model name not disclosed by the tool) ran the builds/censuses and drafted this comment at the user's request.
Author
Owner

@⁠dragoso on GitHub · 2026-11-24 19:19 UTC · original

Offline pipeline-creation check on an RTX 5060 Ti: #1067 on top of #585 adds 540 host pipelines and loses none. Together with #585 it adds 563 over main. Counts only; no shader names or dumps.

victory translate --validate --pipelines --list over shaders.rpf (retail 1.0.2.1, 26,084 programs). A program counts as usable only when its D3D12 pipeline is created on this GPU (NVIDIA RTX 5060 Ti, 32-lane, driver 32.0.16.1742, dxil.dll from SDK 10.0.26100).

I measured #1067 stacked on #585 (ffe310e + #585 + #1067), not alone. The merge has one conflict, in descriptor_data's branch for a descriptor with no use. Both PRs rewrite it; I took #1067's side, which covers #585's (#585 only handles the case where used_kind is known).

pipelines created
main ffe310e 21,566
+ #585 21,589
+ #585 + #1067 22,129
  • #1067's step (#585 → #585 + #1067): +540, 0 lost. All 540 failed before with "a descriptor read only as data". By stage: 489 compute, 48 pixel, 3 vertex.
  • Over main, 190 of the gains are programs that main refuses earlier, with "a select on an untracked mask". So #1067 counts for more once #585 lands.
  • 18 programs still stop with "a lane-mask join of an untracked mask" right after their descriptor is handled, and 1 moves to another refusal.

In the game (same machine, same save, empty shader cache), the stacked build had 0 regressions: no shader whose pipeline was created on main fails with it. Like main, it reaches the world and is removed with 0x887A0006.

AI-assisted (Claude Code); everything was run on our machine.

**@⁠dragoso** on GitHub · 2026-11-24 19:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7141921430) **Offline pipeline-creation check on an RTX 5060 Ti: #1067 on top of #585 adds 540 host pipelines and loses none. Together with #585 it adds 563 over `main`.** Counts only; no shader names or dumps. `victory translate --validate --pipelines --list` over `shaders.rpf` (retail 1.0.2.1, 26,084 programs). A program counts as usable only when its D3D12 pipeline is created on this GPU (NVIDIA RTX 5060 Ti, 32-lane, driver 32.0.16.1742, dxil.dll from SDK 10.0.26100). I measured #1067 stacked on #585 (`ffe310e` + #585 + #1067), not alone. The merge has one conflict, in `descriptor_data`'s branch for a descriptor with no use. Both PRs rewrite it; I took #1067's side, which covers #585's (#585 only handles the case where `used_kind` is known). | | pipelines created | |---|---| | `main` `ffe310e` | 21,566 | | + #585 | 21,589 | | + #585 + #1067 | **22,129** | - **#1067's step (#585 → #585 + #1067): +540, 0 lost.** All 540 failed before with "a descriptor read only as data". By stage: 489 compute, 48 pixel, 3 vertex. - Over `main`, 190 of the gains are programs that `main` refuses earlier, with "a select on an untracked mask". So #1067 counts for more once #585 lands. - 18 programs still stop with "a lane-mask join of an untracked mask" right after their descriptor is handled, and 1 moves to another refusal. In the game (same machine, same save, empty shader cache), the stacked build had **0 regressions**: no shader whose pipeline was created on `main` fails with it. Like `main`, it reaches the world and is removed with `0x887A0006`. *AI-assisted (Claude Code); everything was run on our machine.*
Author
Owner

@⁠ScarionWorkspace on GitHub · 2026-11-24 20:09 UTC · original

#1067 vs #1130 head-to-head, full archive, bare main. Windows 11, RX 9070 XT, Rust 1.98.1, dxil.dll from SDK 10.0.26100. victory translate --list --validate over shaders.rpf + the executable (1.0.2.1, 25,901 programs), each PR alone merged onto main ffe310e, compared program by program:

validated "a descriptor read only as data" gained lost
main 21,736 394 – –
#1067 (6d30fd7) 22,031 17 +295 0
#1130 (98f073d) 21,976 53 +240 0
both, #1130's same_entry_use tried before #1067's table fallback 22,012 17 +276 0
  • All 240 programs #1130 gains are among #1067's 295. The 55 only #1067 gains are mostly pixel programs (#1067 gains 62 Ps, #1130 9).
  • Merged together in that order, 19 of #1067's gains are lost again: they fail with "a scalar memory read as data" instead. So either #1067 alone, or #1067's table path before same_entry_use.
  • In every variant the same 72 former refusals now fail validation ("Entry function performs some operation that is incompatible with the shader stage"); that is the shared next blocker.
  • Validated is not correct: some of #1067's extra programs may rely on its 2D shortcut for unnamed eight-dword heap entries. Not checked at run time.

AI-assisted (Claude); counts only, no game data.

**@⁠ScarionWorkspace** on GitHub · 2026-11-24 20:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7143129330) **#1067 vs #1130 head-to-head, full archive, bare `main`.** Windows 11, RX 9070 XT, Rust 1.98.1, dxil.dll from SDK 10.0.26100. `victory translate --list --validate` over `shaders.rpf` + the executable (1.0.2.1, 25,901 programs), each PR alone merged onto `main` `ffe310e`, compared program by program: | | validated | "a descriptor read only as data" | gained | lost | |---|---:|---:|---:|---:| | main | 21,736 | 394 | – | – | | #1067 (`6d30fd7`) | 22,031 | 17 | +295 | 0 | | #1130 (`98f073d`) | 21,976 | 53 | +240 | 0 | | both, #1130's `same_entry_use` tried before #1067's table fallback | 22,012 | 17 | +276 | 0 | - All 240 programs #1130 gains are among #1067's 295. The 55 only #1067 gains are mostly pixel programs (#1067 gains 62 Ps, #1130 9). - Merged together in that order, 19 of #1067's gains are lost again: they fail with "a scalar memory read as data" instead. So either #1067 alone, or #1067's table path before `same_entry_use`. - In every variant the same 72 former refusals now fail validation ("Entry function performs some operation that is incompatible with the shader stage"); that is the shared next blocker. - Validated is not correct: some of #1067's extra programs may rely on its 2D shortcut for unnamed eight-dword heap entries. Not checked at run time. AI-assisted (Claude); counts only, no game data.
Author
Owner

@⁠BitWuehler on GitHub · 2026-11-24 20:24 UTC · original

In-game Linux + Proton + NVIDIA RTX 5080 A/B verification combining #585 and #1067 (using @⁠dragoso's descriptor_data merge resolution where #1067 supersedes #585's None arm):

  • Setup: CachyOS (7.3.6-1-cachyos), Ryzen 7 9800X3D, RTX 5080 16 GB (driver 620.73.04), GE-Proton11-14 via umu-run (VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains), retail 1.0.2.1, --console series-x, diag build (VICTORY_DEBUG_PS=1, VICTORY_SHOW_TARGET=2560x1440-f28-3, VICTORY_NO_WATCHDOG=1).
  • Base stack: #994 + #177 + #454 + #1260 + #1267 + local MIN_DYNAMIC = 1 << 18 (#747); added #1500 + #1180 + #585 + #1067.
In-world metric Before (n = 30) With #585 + #1067 (n = 28)
Unique untranslated shaders 415 308 (−107)
• "a select on an untracked mask" (#585) 89 0
• "a descriptor read only as data" (#1067) 67 0 (18 moved downstream to "descriptor's address or format read as data")
host pipeline refused warnings 137 134
draws/frame (median / max) 2,076 / 5,662 3,051 / 8,073 (+47%)
GPU faults / device removals / Xids 0 / 0 / 0 0 / 0 / 0 (reached frame=1523)

No regressions observed (cargo test -p victory-shader --locked: 97 passed, 0 failed, 1 benchmark ignored). Cross-posted briefly on #585.

AI-assisted log analysis; built and run locally on my own retail copy, no game files or raw logs attached.

**@⁠BitWuehler** on GitHub · 2026-11-24 20:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7143508064) In-game Linux + Proton + **NVIDIA RTX 5080** A/B verification combining `#585` and `#1067` (using @⁠dragoso's `descriptor_data` merge resolution where `#1067` supersedes `#585`'s `None` arm): - **Setup:** CachyOS (`7.3.6-1-cachyos`), Ryzen 7 9800X3D, RTX 5080 16 GB (driver `620.73.04`), `GE-Proton11-14` via `umu-run` (`VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains`), retail `1.0.2.1`, `--console series-x`, `diag` build (`VICTORY_DEBUG_PS=1`, `VICTORY_SHOW_TARGET=2560x1440-f28-3`, `VICTORY_NO_WATCHDOG=1`). - **Base stack:** `#994 + #177 + #454 + #1260 + #1267` + local `MIN_DYNAMIC = 1 << 18` (#747); added `#1500 + #1180 + #585 + #1067`. | In-world metric | Before (`n = 30`) | With `#585 + #1067` (`n = 28`) | |---|---:|---:| | Unique untranslated shaders | `415` | **`308`** (**−107**) | | • `"a select on an untracked mask"` (`#585`) | `89` | **`0`** | | • `"a descriptor read only as data"` (`#1067`) | `67` | **`0`** *(18 moved downstream to `"descriptor's address or format read as data"`)* | | `host pipeline refused` warnings | `137` | `134` | | `draws/frame` (median / max) | `2,076` / `5,662` | **`3,051`** / **`8,073`** (**+47%**) | | GPU faults / device removals / Xids | `0` / `0` / `0` | **`0`** / **`0`** / **`0`** (reached `frame=1523`) | No regressions observed (`cargo test -p victory-shader --locked`: 97 passed, 0 failed, 1 benchmark ignored). Cross-posted briefly on `#585`. *AI-assisted log analysis; built and run locally on my own retail copy, no game files or raw logs attached.*
Author
Owner

@⁠thatirishguyyy on GitHub · 2026-11-24 22:52 UTC · original

I rebased 6d30fd7 onto 70564ae, preserving main’s descriptor-address fallback. Over 26,096 programs, the rebase added 36 DXIL-valid shaders with zero validation regressions. Both PS_PuddleDetect variants from my RX 9070 XT logs now validate, and all six waterfall tests pass. Cutscene rendering remains unverified on the rebased build. AI-assisted.

**@⁠thatirishguyyy** on GitHub · 2026-11-24 22:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7146738707) I rebased `6d30fd7` onto `70564ae`, preserving main’s descriptor-address fallback. Over 26,096 programs, the rebase added 36 DXIL-valid shaders with zero validation regressions. Both `PS_PuddleDetect` variants from my RX 9070 XT logs now validate, and all six waterfall tests pass. Cutscene rendering remains unverified on the rebased build. AI-assisted.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:31 UTC · original

Automated triage for the maintainers. Closing because this change is already in main, or main has since replaced the code it patches.

Main takes a size-only descriptor's kind from a twin load (75677cb8). What this adds beyond that is a guess: any eight-dword entry with no use is a 2D image. Main's notes rule that out (a 2D getDimensions on a view of another dimension is invalid in D3D12; the open case, PS_PuddleDetect, needs a size table from the host).

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1067#issuecomment-7148597076) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. Main takes a size-only descriptor's kind from a twin load (75677cb8). What this adds beyond that is a guess: any eight-dword entry with no use is a 2D image. Main's notes rule that out (a 2D getDimensions on a view of another dimension is invalid in D3D12; the open case, PS_PuddleDetect, needs a size table from the host). 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1067
No description provided.