Fix/typed image atomic int64 #705

Closed
github-bot wants to merge 7 commits from gh-pr/705/head into gh-pr/705/base
Owner

@⁠Abhishek-Sood on GitHub · 2026-11-24 07:08 UTC · original
Abhishek-Sood:fix/typed-image-atomic-int64 → main · +176 −26 · 2 files · 7 commits · closed without merging

No description provided.

**@⁠Abhishek-Sood** on GitHub · 2026-11-24 07:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/705) `Abhishek-Sood:fix/typed-image-atomic-int64` → `main` · +176 −26 · 2 files · 7 commits · closed without merging *No description provided.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:38 +00:00
github-bot closed this pull request 2026-11-26 04:13:38 +00:00
Author
Owner

@⁠Abhishek-Sood on GitHub · 2026-11-24 07:15 UTC · original

The change adds 64-bit typed-image atomic lowering, including arithmetic, bitwise, min/max, swap, and compare-exchange operations. It also handles packing and unpacking 64-bit values across VGPR pairs, adds the required DXIL feature flags, and includes a regression test for the new lowering path.

What this change does
Adds lowering for 64-bit typed image atomic operations: add, subtract, bitwise operations, min/max, swap, and compare-exchange.
Packs pairs of 32-bit VGPR values into DXIL 64-bit integers and splits returned values back into register pairs.
Declares the required 64-bit integer and typed-resource atomic feature flags.
Adds a shader-lowering regression test covering the 64-bit typed-image atomic path.

Files changed
crates/victory-shader/src/emit/lower.rs — 64-bit value packing and typed-image atomic lowering.
crates/victory-shader/src/emit/shader.rs — required shader feature-flag mapping.

**@⁠Abhishek-Sood** on GitHub · 2026-11-24 07:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7124788379) The change adds 64-bit typed-image atomic lowering, including arithmetic, bitwise, min/max, swap, and compare-exchange operations. It also handles packing and unpacking 64-bit values across VGPR pairs, adds the required DXIL feature flags, and includes a regression test for the new lowering path. What this change does Adds lowering for 64-bit typed image atomic operations: add, subtract, bitwise operations, min/max, swap, and compare-exchange. Packs pairs of 32-bit VGPR values into DXIL 64-bit integers and splits returned values back into register pairs. Declares the required 64-bit integer and typed-resource atomic feature flags. Adds a shader-lowering regression test covering the 64-bit typed-image atomic path. Files changed crates/victory-shader/src/emit/lower.rs — 64-bit value packing and typed-image atomic lowering. crates/victory-shader/src/emit/shader.rs — required shader feature-flag mapping.
Author
Owner

@⁠justr4mzi on GitHub · 2026-11-24 09:06 UTC · original

Tested PR #705 (92ed309d) on Windows 11 with an AMD Radeon RX 6700 XT (RDNA2), Rust 1.98.1 (x86_64-pc-windows-msvc), and dxil.dll from Windows SDK 10.0.26100.0, against main (02f404e) as negative control.

victory translate --validate (full game shader set, 26,599 containers / 26,148 programs)

Build VS/PS (emitted / validated) CS (emitted / validated) MS (emitted / validated) 64-bit image atomic refusals Flags must match usage. validator errors
main (02f404e, negative control) 12,236 / 12,160 1,440 / 1,417 8,163 / 8,101 653 0
PR #705 (92ed309) 12,754 / 12,160 1,442 / 1,417 8,163 / 8,101 0 520
  • All 653 emit: a 64-bit image atomic refusals are cleared, emitting 520 extra programs (518 VS/PS + 2 CS; the remaining 133 programs advance to downstream refusals such as scalar memory read as data 604 -> 708 and barycentrics read directly 13 -> 36).
  • However, all 520 newly emitted programs fail dxil.dll validation with validator: error: Flags must match usage., resulting in +0 validated shaders (12,160 VS/PS and 1,417 CS unchanged).
  • Root cause from inspection of crates/victory-shader/src/emit/shader.rs in 92ed309: the PR sets ATOMIC_INT64_ON_TYPED_RESOURCE (1 << 27 / SFI0 0x40_0000), but programs accessing UAVs through ResourceDescriptorHeap[] also require the heap-resource int64 atomic flag (1 << 32 / SFI0 0x1000_0000). Note also that 92ed309 includes #696 and #706 in its branch history ahead of current main (02f404e).

Build and checks

  • cargo clippy -p victory-shader --lib: clean.
  • cargo xtask policy: 152 files ok.
  • cargo build --release -p victory: succeeded.
  • cargo test -p victory-shader -- --test-threads=1 and --all-targets: failed to compile test target on pre-existing main issue #719 (lowers(&words) missing rsrc2 argument at lower.rs:7021), unrelated to this PR.
  • No game data included; the title itself was not launched.

AI-assisted analysis and test execution (reviewed locally).

**@⁠justr4mzi** on GitHub · 2026-11-24 09:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7126976140) Tested PR #705 (`92ed309d`) on Windows 11 with an AMD Radeon RX 6700 XT (RDNA2), Rust 1.98.1 (`x86_64-pc-windows-msvc`), and `dxil.dll` from Windows SDK `10.0.26100.0`, against `main` (`02f404e`) as negative control. ### `victory translate --validate` (full game shader set, 26,599 containers / 26,148 programs) | Build | VS/PS (emitted / validated) | CS (emitted / validated) | MS (emitted / validated) | `64-bit image atomic` refusals | `Flags must match usage.` validator errors | |---|---|---|---|---|---| | `main` (`02f404e`, negative control) | 12,236 / 12,160 | 1,440 / 1,417 | 8,163 / 8,101 | 653 | 0 | | PR #705 (`92ed309`) | 12,754 / **12,160** | 1,442 / **1,417** | 8,163 / 8,101 | 0 | **520** | - All 653 `emit: a 64-bit image atomic` refusals are cleared, emitting 520 extra programs (518 VS/PS + 2 CS; the remaining 133 programs advance to downstream refusals such as `scalar memory read as data` 604 -> 708 and `barycentrics read directly` 13 -> 36). - However, **all 520 newly emitted programs fail `dxil.dll` validation** with `validator: error: Flags must match usage.`, resulting in **+0 validated shaders** (`12,160` VS/PS and `1,417` CS unchanged). - Root cause from inspection of `crates/victory-shader/src/emit/shader.rs` in `92ed309`: the PR sets `ATOMIC_INT64_ON_TYPED_RESOURCE` (`1 << 27` / `SFI0` `0x40_0000`), but programs accessing UAVs through `ResourceDescriptorHeap[]` also require the heap-resource int64 atomic flag (`1 << 32` / `SFI0` `0x1000_0000`). Note also that `92ed309` includes `#696` and `#706` in its branch history ahead of current `main` (`02f404e`). ### Build and checks - `cargo clippy -p victory-shader --lib`: clean. - `cargo xtask policy`: `152 files ok`. - `cargo build --release -p victory`: succeeded. - `cargo test -p victory-shader -- --test-threads=1` and `--all-targets`: failed to compile test target on pre-existing `main` issue `#719` (`lowers(&words)` missing `rsrc2` argument at `lower.rs:7021`), unrelated to this PR. - No game data included; the title itself was not launched. *AI-assisted analysis and test execution (reviewed locally).*
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 10:16 UTC · original

This does not build on current main@ffe310e, so it needs a rebase:

error[E0061]: this function takes 4 arguments but 3 arguments were supplied
   --> crates\victory-shader\src\emit\lower.rs:7524:23
7524 |     let res = resource::track(&p, &native.layout, native.stage).unwrap();
     |                  ^^^^^^^^^^^^^^^------------------------------- argument #4 of type `Option<&structure::Structured>` is missing
error: could not compile `victory-shader` (lib test) due to 1 previous error

The PR is based on 8e79c80; resource::track gained the structured-access argument in between (that is #709's subject), so the branch predates it. Nothing else was run.

Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug build, patch applied clean. AI-assisted (opencode).

**@⁠dcastell1** on GitHub · 2026-11-24 10:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7128552112) This does not build on current `main@ffe310e`, so it needs a rebase: ``` error[E0061]: this function takes 4 arguments but 3 arguments were supplied --> crates\victory-shader\src\emit\lower.rs:7524:23 7524 | let res = resource::track(&p, &native.layout, native.stage).unwrap(); | ^^^^^^^^^^^^^^^------------------------------- argument #4 of type `Option<&structure::Structured>` is missing error: could not compile `victory-shader` (lib test) due to 1 previous error ``` The PR is based on `8e79c80`; `resource::track` gained the structured-access argument in between (that is #709's subject), so the branch predates it. Nothing else was run. Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug build, patch applied clean. AI-assisted (opencode).
Author
Owner

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

Same result as I measured on #539, which covers the same 64-bit image atomics. Over the world's shaders (751 programs dumped from a run into the world, re-translated offline), this PR translates the same 4 extra pixel programs (670/751, none lost). Under vkd3d-proton (dxil-spirv 34f0ff8) all 4 fail spirv-val (OpAtomicUMin with a non-integer result type) unless #177's handle-key change is in as well. Details and numbers in my comment on #539.

Setup: RX 9070 XT, RADV (Mesa 26.3.1), CachyOS, vkd3d-proton master 30b0eb9.

**@⁠pablogonz12** on GitHub · 2026-11-24 11:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7129562022) Same result as I measured on #539, which covers the same 64-bit image atomics. Over the world's shaders (751 programs dumped from a run into the world, re-translated offline), this PR translates the same 4 extra pixel programs (670/751, none lost). Under vkd3d-proton (dxil-spirv `34f0ff8`) all 4 fail `spirv-val` (`OpAtomicUMin` with a non-integer result type) unless #177's handle-key change is in as well. Details and numbers in my comment on #539. Setup: RX 9070 XT, RADV (Mesa 26.3.1), CachyOS, vkd3d-proton master `30b0eb9`.
Author
Owner

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

Audit: ✅ Looks good — verified & tested

Reviewed this PR as part of an audit of mergeable PRs.

  • Scope: crates/victory-shader/src/emit/lower.rs + shader.rs (+176/-26). Adds 64-bit typed image atomics: dmask=3 → atomicBinOp.i64, dmask=0xF (cmpswap) → atomicCompareExchange.i64, packing/unpacking the value through VGPR pairs via the new pack64/split64 helpers. Sets the DXIL feature bits INT64, ATOMIC_INT64_ON_TYPED_RESOURCE, and ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE.
  • Merges cleanly into main.
  • Tests: image_atomics_64_bit_lower_with_typed_int64_flag → passed. The test builds both a 64-bit add and cmpswap MIMG shader, lowers them, and asserts all three feature bits are present in the emitted DXIL SFI0 flags.
  • Correctness review: the width matrix (1/3 for 32-bit, 3/0xF for 64-bit, cmpswap takes twice the dwords) and the .glc old-value handling for the hi dword are handled correctly. comp is derived from width (0x105 vs 0x107), and sub negates the full i64.

No issues found. Nice, well-scoped feature with proper feature-bit declaration.

**@⁠ErRusso** on GitHub · 2026-11-24 11:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7129946066) ## Audit: ✅ Looks good — verified & tested Reviewed this PR as part of an audit of mergeable PRs. - **Scope:** `crates/victory-shader/src/emit/lower.rs` + `shader.rs` (+176/-26). Adds 64-bit typed image atomics: `dmask=3` → `atomicBinOp.i64`, `dmask=0xF` (cmpswap) → `atomicCompareExchange.i64`, packing/unpacking the value through VGPR pairs via the new `pack64`/`split64` helpers. Sets the DXIL feature bits `INT64`, `ATOMIC_INT64_ON_TYPED_RESOURCE`, and `ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE`. - **Merges cleanly** into `main`. - **Tests:** `image_atomics_64_bit_lower_with_typed_int64_flag` → **passed**. The test builds both a 64-bit add and cmpswap MIMG shader, lowers them, and asserts all three feature bits are present in the emitted DXIL SFI0 flags. - **Correctness review:** the width matrix (1/3 for 32-bit, 3/0xF for 64-bit, cmpswap takes twice the dwords) and the `.glc` old-value handling for the hi dword are handled correctly. `comp` is derived from width (`0x105` vs `0x107`), and `sub` negates the full i64. No issues found. Nice, well-scoped feature with proper feature-bit declaration.
Author
Owner

@⁠h0useadv on GitHub · 2026-11-24 12:36 UTC · original

Offline coverage on main ffe310e (full retail shader pack, victory translate --validate, programs matched one by one): +520 programs validate, 0 newly fail; a 64-bit image atomic 653 → 0. #305, #539 and #705 give exactly the same 520 programs, so on coverage they're interchangeable and the choice can rest on review alone. Stacked with #180 and the lane-mask branch from #653: +1,193, 0 regressions. Full table: #293

AI-assisted (Claude Code). Counts only, no game data.

**@⁠h0useadv** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7131685405) Offline coverage on `main` `ffe310e` (full retail shader pack, `victory translate --validate`, programs matched one by one): **+520 programs validate, 0 newly fail**; `a 64-bit image atomic` 653 → 0. #305, #539 and #705 give exactly the same 520 programs, so on coverage they're interchangeable and the choice can rest on review alone. Stacked with #180 and the lane-mask branch from #653: +1,193, 0 regressions. Full table: https://git.gtahub.st/github/Marvisak--VIctory/issues/293 AI-assisted (Claude Code). Counts only, no game data.
Author
Owner

@⁠bittertea0323 on GitHub · 2026-11-24 14:24 UTC · original

Verified offline: the class is gone and 518 more programs emit DXIL

Applied the branch's two-file diff on ffe310e + local diag changes; same container dump
(26,503 containers / 26,084 programs), same host, both runs.

metric before after
emit: a 64-bit image atomic 653 0
vertex+pixel programs emitting DXIL 12252 / 14027 12770 / 14027
compute programs emitting DXIL 1443 / 2582 1445 / 2582
mesh programs emitting DXIL 8214 / 8713 8214 / 8713
emit: a scalar memory read as data 771 875

+518 vertex/pixel programs reaching DXIL is the largest single-patch gain we have measured
offline so far.

One thing to know before merge: a scalar memory read as data rose by 104. That is the next
failure being exposed, not a regression — those programs used to stop at the atomic and now
translate far enough to hit something else. It does mean this class (875) becomes the top
remaining blocker once #705 lands, so it is the natural next thing to attack.

Repro: cargo build --release -p victory then victory translate <container dump>; nothing
else in the failure table moved.

**@⁠bittertea0323** on GitHub · 2026-11-24 14:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7134317777) ## Verified offline: the class is gone and 518 more programs emit DXIL Applied the branch's two-file diff on `ffe310e` + local diag changes; same container dump (26,503 containers / 26,084 programs), same host, both runs. | metric | before | after | |---|---|---| | `emit: a 64-bit image atomic` | 653 | **0** | | vertex+pixel programs emitting DXIL | 12252 / 14027 | **12770 / 14027** | | compute programs emitting DXIL | 1443 / 2582 | 1445 / 2582 | | mesh programs emitting DXIL | 8214 / 8713 | 8214 / 8713 | | `emit: a scalar memory read as data` | 771 | 875 | +518 vertex/pixel programs reaching DXIL is the largest single-patch gain we have measured offline so far. One thing to know before merge: `a scalar memory read as data` rose by 104. That is the *next* failure being exposed, not a regression — those programs used to stop at the atomic and now translate far enough to hit something else. It does mean this class (875) becomes the top remaining blocker once #705 lands, so it is the natural next thing to attack. Repro: `cargo build --release -p victory` then `victory translate <container dump>`; nothing else in the failure table moved.
Author
Owner

@⁠dpalacios69 on GitHub · 2026-11-24 15:07 UTC · original

Independent check of the current head ee037b0 on Linux (cargo test -p victory-shader --locked; no GPU). It already contains main (ffe310e).

The tests do not compile. resource::track takes a fourth argument on main (lanes: Option<&Structured>, resource.rs:147), and one test still calls it with three: error[E0061]: this function takes 4 arguments but 3 arguments were supplied at crates/victory-shader/src/emit/lower.rs:7524:23. The other calls in the file already pass Some(&st); this one needs the same. cargo clippy -p victory-shader --lib is clean.

For anyone choosing between the three 64-bit image atomics PRs (#305, #539, #705; they conflict in pairs in lower.rs and shader.rs), what I could verify statically on ffe310e:

  • All three lower the same 11 operations (add, sub, and, or, xor, smin, smax, umin, umax, swap, cmpswap) as i64 (0x107), and all three set the same two feature bits (1 << 27 and 1 << 32) under different names: #305 ATOMIC_INT64_ON_TYPED_RESOURCE / ATOMIC_INT64_ON_HEAP_RESOURCE, #705 ..._ON_TYPED_RESOURCE / ..._ON_DESCRIPTOR_HEAP_RESOURCE, #539 ATOMIC_INT64_TYPED / ATOMIC_INT64_HEAP. None of these exists on main yet.
  • #305 sets both bits together and unconditionally (lower.rs:5707-5708); #705 sets the heap bit only when a heap handle is used (:5580).
  • Tests: #305 and #705 add one test each; #539 adds none. #539 creates its own heap handle, which sidesteps a cache collision with the float view that #177 also addresses.

Only the first point is a defect in this PR; the rest is information for whoever decides the order. AI-assisted; no game data.

**@⁠dpalacios69** on GitHub · 2026-11-24 15:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7135509375) Independent check of the current head `ee037b0` on Linux (`cargo test -p victory-shader --locked`; no GPU). It already contains `main` (`ffe310e`). **The tests do not compile.** `resource::track` takes a fourth argument on `main` (`lanes: Option<&Structured>`, `resource.rs:147`), and one test still calls it with three: `error[E0061]: this function takes 4 arguments but 3 arguments were supplied` at `crates/victory-shader/src/emit/lower.rs:7524:23`. The other calls in the file already pass `Some(&st)`; this one needs the same. `cargo clippy -p victory-shader --lib` is clean. For anyone choosing between the three 64-bit image atomics PRs (#305, #539, #705; they conflict in pairs in `lower.rs` and `shader.rs`), what I could verify statically on `ffe310e`: - All three lower the same 11 operations (add, sub, and, or, xor, smin, smax, umin, umax, swap, cmpswap) as `i64` (`0x107`), and all three set the same two feature bits (`1 << 27` and `1 << 32`) under different names: #305 `ATOMIC_INT64_ON_TYPED_RESOURCE` / `ATOMIC_INT64_ON_HEAP_RESOURCE`, #705 `..._ON_TYPED_RESOURCE` / `..._ON_DESCRIPTOR_HEAP_RESOURCE`, #539 `ATOMIC_INT64_TYPED` / `ATOMIC_INT64_HEAP`. None of these exists on `main` yet. - #305 sets both bits together and unconditionally (`lower.rs:5707-5708`); #705 sets the heap bit only when a heap handle is used (`:5580`). - Tests: #305 and #705 add one test each; #539 adds none. #539 creates its own heap handle, which sidesteps a cache collision with the float view that #177 also addresses. Only the first point is a defect in this PR; the rest is information for whoever decides the order. AI-assisted; no game data.
Author
Owner

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

Useful: the tree you measured is not the tree we measured, which narrows the regression.

Our A/B in this thread ran on 4efabc4 (the head at the time), and there
cargo test --offline -p victory-shader --lib compiled and ran: 129 passed, 15 failed, 1 ignored.
(The 15 failures are all "no SM 6.6 hardware device; skipped" — environmental, this host has no
device available to those GPU numerical tests at that moment, and they are unrelated to #705.)

So resource::track still took three arguments at 4efabc4. The arity change to four
(lanes: Option<&Structured>) came in with main's later commits, and the stale call at
lower.rs:7524 is wherever #705's branch stopped tracking main. Rebased on
ee037b0's base it will need that fourth argument like the other call sites in the file.

Our offline numbers (653 → 0, +518 vertex/pixel programs) stand for 4efabc4; they should not
change if the rebase is mechanical, but I have not measured ee037b0.

**@⁠bittertea0323** on GitHub · 2026-11-24 15:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7135610703) Useful: the tree you measured is not the tree we measured, which narrows the regression. Our A/B in this thread ran on `4efabc4` (the head at the time), and there `cargo test --offline -p victory-shader --lib` **compiled and ran**: 129 passed, 15 failed, 1 ignored. (The 15 failures are all "no SM 6.6 hardware device; skipped" — environmental, this host has no device available to those GPU numerical tests at that moment, and they are unrelated to #705.) So `resource::track` still took three arguments at `4efabc4`. The arity change to four (`lanes: Option<&Structured>`) came in with `main`'s later commits, and the stale call at `lower.rs:7524` is wherever #705's branch stopped tracking `main`. Rebased on `ee037b0`'s base it will need that fourth argument like the other call sites in the file. Our offline numbers (653 → 0, +518 vertex/pixel programs) stand for `4efabc4`; they should not change if the rebase is mechanical, but I have not measured `ee037b0`.
Author
Owner

@⁠Abhishek-Sood on GitHub · 2026-11-24 15:16 UTC · original

can anyone tell whats the final benchmarks or the bottlenecks that we are currently encountering or at ? i need some clear info

**@⁠Abhishek-Sood** on GitHub · 2026-11-24 15:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7135759790) can anyone tell whats the final benchmarks or the bottlenecks that we are currently encountering or at ? i need some clear info
Author
Owner

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

@⁠Abhishek-Sood there is no official benchmark yet, but the picture is fairly clear from the README status and the testers' runs in #71. Summary, with the sources:

Where it stands (README, 2026-11-23). Menus, intro video and loading run at 30 fps. The world is reached but frames take 0.5-1.8 s and most of the scene is dark or missing.

Bottlenecks, in order of how much they block:

  1. The GPU hangs shortly after entering the world on NVIDIA (TDR, DEVICE_HUNG). Measured causes: translated loops running to the 2^20 cap (a lower VICTORY_SHADER_LOOP_LIMIT keeps the run alive: h0useadv, Machad3x), unbounded root SRVs (#493 alone: 19 min in the world vs ~20 s on main on an RTX 4090), and wave64 compute on 32-lane GPUs (#189). Sunkiller-qc's merge order is the best map of this.
  2. Shaders that don't translate, so draws are dropped. README: mesh 8,191/8,506, vertex/pixel 10,617/12,346, compute 1,643/2,539. 64-bit image atomics are listed as missing, which is what your PR is about; bittertea0323's A/B measured 653 refused programs going to 0 on 4efabc4.
  3. Slow frames even when the device survives (0.1-1.5 fps in the tester runs), mostly from those loops and compute passes.

For #705 itself, the next step is small: the current head ee037b0 already contains main, but the test at lower.rs:7524 still calls resource::track with 3 arguments (it takes 4 now, resource.rs:147), so cargo test -p victory-shader doesn't compile. Passing Some(&st) like the other calls fixes it. #305 and #539 cover the same ground and conflict with yours, so it may be worth asking which one the maintainer wants to land.

AI-assisted; no game data.

**@⁠dpalacios69** on GitHub · 2026-11-24 15:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7135868160) @⁠Abhishek-Sood there is no official benchmark yet, but the picture is fairly clear from the README status and the testers' runs in #71. Summary, with the sources: **Where it stands (README, 2026-11-23).** Menus, intro video and loading run at 30 fps. The world is reached but frames take 0.5-1.8 s and most of the scene is dark or missing. **Bottlenecks, in order of how much they block:** 1. **The GPU hangs shortly after entering the world on NVIDIA** (TDR, `DEVICE_HUNG`). Measured causes: translated loops running to the 2^20 cap (a lower `VICTORY_SHADER_LOOP_LIMIT` keeps the run alive: [h0useadv](https://git.gtahub.st/github/Marvisak--VIctory/issues/71), [Machad3x](https://git.gtahub.st/github/Marvisak--VIctory/issues/71)), unbounded root SRVs (#493 alone: 19 min in the world vs ~20 s on `main` on an RTX 4090), and wave64 compute on 32-lane GPUs (#189). [Sunkiller-qc's merge order](https://git.gtahub.st/github/Marvisak--VIctory/issues/71) is the best map of this. 2. **Shaders that don't translate, so draws are dropped.** README: mesh 8,191/8,506, vertex/pixel 10,617/12,346, compute 1,643/2,539. 64-bit image atomics are listed as missing, which is what your PR is about; [bittertea0323's A/B](https://git.gtahub.st/github/Marvisak--VIctory/pulls/705) measured 653 refused programs going to 0 on `4efabc4`. 3. **Slow frames** even when the device survives (0.1-1.5 fps in the tester runs), mostly from those loops and compute passes. **For #705 itself**, the next step is small: the current head `ee037b0` already contains `main`, but the test at `lower.rs:7524` still calls `resource::track` with 3 arguments (it takes 4 now, `resource.rs:147`), so `cargo test -p victory-shader` doesn't compile. Passing `Some(&st)` like the other calls fixes it. #305 and #539 cover the same ground and conflict with yours, so it may be worth asking which one the maintainer wants to land. AI-assisted; no game data.
Author
Owner

@⁠muhammed-aksoy on GitHub · 2026-11-24 17:16 UTC · original

I tested ee037b0 on Windows 11 with Rust 1.98.1 and the Windows SDK DXIL validator. With the following test-fixture change in crates/victory-shader/src/emit/lower.rs, the serial shader suite passed 121 tests, with zero failures and one ignored.

-            let res = resource::track(&p, &native.layout, native.stage).unwrap();
+            let res = resource::track(&p, &native.layout, native.stage, None).unwrap();

None preserves the original fixture's tracking behavior. This run used synthetic inputs. AI-assisted.

**@⁠muhammed-aksoy** on GitHub · 2026-11-24 17:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7138948103) I tested `ee037b0` on Windows 11 with Rust 1.98.1 and the Windows SDK DXIL validator. With the following test-fixture change in `crates/victory-shader/src/emit/lower.rs`, the serial shader suite passed 121 tests, with zero failures and one ignored. ```diff - let res = resource::track(&p, &native.layout, native.stage).unwrap(); + let res = resource::track(&p, &native.layout, native.stage, None).unwrap(); ``` `None` preserves the original fixture's tracking behavior. This run used synthetic inputs. AI-assisted.
Author
Owner

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

Merged onto main @ ffe310eb, this PR (ee037b0c) no longer compiles its tests. crates/victory-shader/src/emit/lower.rs:7524 calls resource::track with 3 arguments. Since 6638098c it takes a 4th, lanes: Option<&Structured>; main's tests pass Some(&st) with let st = structure::structure(&p).unwrap();.

Checked with CI's steps (both clippy runs with -D warnings, cargo test --workspace) on Windows 11, AMD RX 9070. Every open PR: https://gist.github.com/alexdeliu/ef9ef0ebc1776ff104b5aa8eaea18e87

**@⁠alexdeliu** on GitHub · 2026-11-24 17:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7139139586) Merged onto `main` @ `ffe310eb`, this PR (`ee037b0c`) no longer compiles its tests. `crates/victory-shader/src/emit/lower.rs:7524` calls `resource::track` with 3 arguments. Since 6638098c it takes a 4th, `lanes: Option<&Structured>`; main's tests pass `Some(&st)` with `let st = structure::structure(&p).unwrap();`. <sub>Checked with CI's steps (both clippy runs with `-D warnings`, `cargo test --workspace`) on Windows 11, AMD RX 9070. Every open PR: https://gist.github.com/alexdeliu/ef9ef0ebc1776ff104b5aa8eaea18e87</sub>
Author
Owner

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

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

Empty description; the same 64-bit image atomics as #305, which are in main.

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:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/705#issuecomment-7148537064) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. Empty description; the same 64-bit image atomics as #305, which are in main. 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!705
No description provided.