GPU & shader: full Root SRV extent refresh, safe fallback VAs, and Root UAVs #294

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

@⁠wbkepler on GitHub · 2026-11-24 02:06 UTC · original
wbkepler:gpu/root-srv-bounds-and-uav → main · +1485 −123 · 11 files · 4 commits · closed without merging

Summary

Fixes Root SRV truncation past 1 MiB, null/unmapped root view faults, and adds full Root UAV support end-to-end:

  • Full Root SRV / Root UAV extent refresh (draw.rs):
    • Refreshes the full remaining Shadow buffer extent (shadow.left(address)) for Root SRVs and Root UAVs while keeping Root CBVs at the 64 KiB D3D12 limit.
  • Safe fallback VAs (shadow.rs, draw.rs):
    • Guards shadow::find/loose against low (< 0x10000), overflowing top-of-u64, and uncommitted addresses, and binds permanently-alive 4 MiB zeroed/sink fallback GPU VAs instead of skipping Set*Root*View.
  • End-to-end Root UAVs (victory-shader, victory-gpu):
    • Implements Root UAVs (u<slot>, space1 RWByteAddressBuffer) across victory-shader (descriptor handle, global_store_dword*, s_load_dword* on root descriptors, PSV0/dx.resources metadata, SFI0/ShaderFlags UAVsAtEveryStage), shader_cache (VSH2), pipeline::host (deduplicating shared (kind, slot) root views across stages), and draw.rs (binding, gpu_writes write-back, and post-draw/dispatch/ExecuteIndirect UAV barriers).

Verification

  • cargo clippy --workspace --all-targets — passed (zero new warnings)
  • cargo clippy -p victory --features diagnostics --all-targets — passed
  • cargo test --workspace — passed (victory-gpu: 47 passed, 1 ignored; victory-shader: 71 passed including dxil.dll validation, WARP, and host GPU tests)
  • cargo xtask policy — passed (151 files ok)
**@⁠wbkepler** on GitHub · 2026-11-24 02:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/294) `wbkepler:gpu/root-srv-bounds-and-uav` → `main` · +1485 −123 · 11 files · 4 commits · closed without merging ## Summary Fixes Root SRV truncation past 1 MiB, null/unmapped root view faults, and adds full Root UAV support end-to-end: - **Full Root SRV / Root UAV extent refresh (`draw.rs`)**: - Refreshes the full remaining `Shadow` buffer extent (`shadow.left(address)`) for Root SRVs and Root UAVs while keeping Root CBVs at the 64 KiB D3D12 limit. - **Safe fallback VAs (`shadow.rs`, `draw.rs`)**: - Guards `shadow::find`/`loose` against low (`< 0x10000`), overflowing top-of-`u64`, and uncommitted addresses, and binds permanently-alive 4 MiB zeroed/sink fallback GPU VAs instead of skipping `Set*Root*View`. - **End-to-end Root UAVs (`victory-shader`, `victory-gpu`)**: - Implements Root UAVs (`u<slot>, space1` `RWByteAddressBuffer`) across `victory-shader` (descriptor handle, `global_store_dword*`, `s_load_dword*` on root descriptors, `PSV0`/`dx.resources` metadata, `SFI0`/`ShaderFlags` `UAVsAtEveryStage`), `shader_cache` (`VSH2`), `pipeline::host` (deduplicating shared `(kind, slot)` root views across stages), and `draw.rs` (binding, `gpu_writes` write-back, and post-draw/dispatch/`ExecuteIndirect` UAV barriers). ## Verification - `cargo clippy --workspace --all-targets` — passed (zero new warnings) - `cargo clippy -p victory --features diagnostics --all-targets` — passed - `cargo test --workspace` — passed (`victory-gpu`: 47 passed, 1 ignored; `victory-shader`: 71 passed including `dxil.dll` validation, WARP, and host GPU tests) - `cargo xtask policy` — passed (151 files ok)
- Refresh the full remaining Shadow buffer extent for Root SRVs and Root UAVs instead of truncating at 1 MiB (keeping Root CBVs at the 64 KiB D3D12 limit).

- Guard shadow::find/loose against low (<0x10000) and uncommitted addresses, and bind permanently-alive 4 MiB zeroed/sink fallback GPU VAs instead of skipping Set*Root*View when a root view is unset, null, or unmapped.

- Support Root UAVs (u<slot>, space1 RWByteAddressBuffer) end-to-end across victory-shader (descriptor handle, global_store_dword*, s_load_dword* on root descriptors, PSV0/dx.resources metadata, SFI0/ShaderFlags UAVsAtEveryStage=1<<16), shader_cache (VSH2), pipeline::host (deduplicating shared (kind, slot) root views across stages), and draw (binding, gpu_writes write-back, and post-draw/dispatch UAV barriers).

- Add unit, dxil.dll validation, WARP, and host GPU tests covering >1 MiB Root SRV dirty-page refresh, null/unmapped fallback VAs, cross-stage root view deduplication, and Root UAV execution/write-back.
Root SRVs and UAVs took the whole rest of their buffer's host copy, so a
root UAV near the start of a very large backing copy kept and compared
that whole range on every submission. A root view has no size and the
translated shader does not report its range yet, so bound them: root
SRVs refresh at most 4 MiB, root UAVs refresh, snapshot and copy back at
most 2 MiB, constant buffers keep the 64 KiB D3D12 maximum. A cut is
logged once per view kind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prevent RootView::Uav in draw::root_view from falling back to
shadow::loose() copies of arbitrary committed title memory. Because
RootView::Uav schedules Shadow::gpu_writes copy-back after submission,
binding a loose window for an unregistered or bogus root UAV address
allowed GPU shader stores to overwrite unrelated title CPU objects
(reported as 0xc0000005 access violations by Vaximous and nullmarsh).

- Split shadow::find_buffer() out of shadow::find() to look up only
  registered title buffers (never LOOSE windows).
- Route RootView::Uav through shadow::find_buffer() so misses bind the
  writable sink fallback VA without registering copy-back; RootView::Cbv
  and RootView::Srv continue to allow read-only loose lookups.
- Add draw::tests::root_uav_on_unregistered_loose_memory_uses_fallback_without_copy_back
  verifying that an unregistered committed address (even with an active
  loose shadow from CBV/SRV) misses RootView::Uav and is never modified
  by GPU compute stores.
Add root_uavs to the waterfall test HostShader literal and pass the structured
lane info to resource::track in the new Root UAV tests.

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

@⁠r4tedx on GitHub · 2026-11-24 03:11 UTC · original

Review question on cost (built on main d2a4bae; cargo test -p victory-gpu and -p victory-shader pass on an RTX 5070). In root_view, a root SRV and a root UAV now take the whole rest of the backing copy:

RootView::Uav => {
    let len = shadow.left(address);
    shadow.refresh(list, address, len);
    shadow.gpu_writes(list, address, len);

main capped root SRVs at 1 MiB. Testers report one host copy of about 174 MiB behind most of the title's buffers (#199: title buffer 0x19b10000+0xae00000). For a root UAV into it, gpu_writes keeps the range's bytes before the submission and the copy-back compares the range afterwards, so a root UAV near the start of that heap means on the order of 174 MiB kept and compared per submission. A direct-SRV refresh of similar size (#185) took an RX 7800 XT from about 1 s to about 6 s per frame, and long submissions are what ends in the device removal.

Has this been measured on a large buffer? If the view's real extent cannot be known, a cap with a logged warning when it is hit (as main does for SRVs) would keep the worst case bounded.

From reading and synthetic tests only; I have no copy of the title.

**@⁠r4tedx** on GitHub · 2026-11-24 03:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7120862742) Review question on cost (built on `main` `d2a4bae`; `cargo test -p victory-gpu` and `-p victory-shader` pass on an RTX 5070). In `root_view`, a root SRV and a root UAV now take the whole rest of the backing copy: ```rust RootView::Uav => { let len = shadow.left(address); shadow.refresh(list, address, len); shadow.gpu_writes(list, address, len); ``` `main` capped root SRVs at 1 MiB. Testers report one host copy of about 174 MiB behind most of the title's buffers (#199: `title buffer 0x19b10000+0xae00000`). For a root UAV into it, `gpu_writes` keeps the range's bytes before the submission and the copy-back compares the range afterwards, so a root UAV near the start of that heap means on the order of 174 MiB kept and compared per submission. A direct-SRV refresh of similar size (#185) took an RX 7800 XT from about 1 s to about 6 s per frame, and long submissions are what ends in the device removal. Has this been measured on a large buffer? If the view's real extent cannot be known, a cap with a logged warning when it is hit (as `main` does for SRVs) would keep the worst case bounded. From reading and synthetic tests only; I have no copy of the title.
Author
Owner

@⁠miniongk on GitHub · 2026-11-24 03:22 UTC · original

Tested bffaefd on an RTX 5080, driver 621.24, Windows 11 26300, with a local Xbox Series 1.0.2.1 copy.

  • cargo test --workspace: 270 passed, 0 failed, 4 ignored.
  • WARP with DRED still reaches the known menu compute failure described in #97; there were no null or unmapped root-view fallback warnings.
  • The native hardware path reached the world (1,283 host pipelines), but still ended in DXGI_ERROR_DEVICE_HUNG at a compute dispatch. There were again no null or unmapped root-view fallback warnings.

So this does not resolve #97 on my machine; that is not evidence against the root-UAV functionality itself. Only aggregate counts and error classes shared, no game data or raw game logs. AI-assisted (Kimi Code).

**@⁠miniongk** on GitHub · 2026-11-24 03:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7121029197) Tested `bffaefd` on an RTX 5080, driver 621.24, Windows 11 26300, with a local Xbox Series 1.0.2.1 copy. - `cargo test --workspace`: 270 passed, 0 failed, 4 ignored. - WARP with DRED still reaches the known menu compute failure described in #97; there were no null or unmapped root-view fallback warnings. - The native hardware path reached the world (1,283 host pipelines), but still ended in `DXGI_ERROR_DEVICE_HUNG` at a compute dispatch. There were again no null or unmapped root-view fallback warnings. So this does not resolve #97 on my machine; that is not evidence against the root-UAV functionality itself. Only aggregate counts and error classes shared, no game data or raw game logs. AI-assisted (Kimi Code).
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 03:39 UTC · original

Thanks @⁠r4tedx, good catch: it had not been measured on a large buffer, and the UAV snapshot/compare is the expensive part. Pushed 0050ce5:

  • New root_len bounds every root view instead of using shadow.left(address): CBVs stay at the 64 KiB D3D12 maximum, root SRVs refresh at most 4 MiB, root UAVs refresh, snapshot and copy back at most 2 MiB (smaller because that range is kept and compared on every submission).
  • When a cap cuts the remaining extent, a one-time warning is logged per view kind (with the remaining length and the cap), like main does.
  • It is marked // shortcut:. The translated shader does not report the range a root view reads or writes yet. Once it does, that range should replace the caps.
  • SRVs keep a 4 MiB cap rather than main's 1 MiB, so the >1 MiB geometry reads this PR fixed still work. The existing +1.5 MiB SRV/UAV tests still pass, and a unit test checks the caps and that shorter extents are taken whole.

The fallback VAs and root UAV support are unchanged. Gate: clippy (both configs), cargo test --workspace and cargo xtask policy are clean.

**@⁠wbkepler** on GitHub · 2026-11-24 03:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7121299889) Thanks @⁠r4tedx, good catch: it had not been measured on a large buffer, and the UAV snapshot/compare is the expensive part. Pushed 0050ce5: - New `root_len` bounds every root view instead of using `shadow.left(address)`: CBVs stay at the 64 KiB D3D12 maximum, root SRVs refresh at most **4 MiB**, root UAVs refresh, snapshot and copy back at most **2 MiB** (smaller because that range is kept and compared on every submission). - When a cap cuts the remaining extent, a one-time warning is logged per view kind (with the remaining length and the cap), like `main` does. - It is marked `// shortcut:`. The translated shader does not report the range a root view reads or writes yet. Once it does, that range should replace the caps. - SRVs keep a 4 MiB cap rather than `main`'s 1 MiB, so the >1 MiB geometry reads this PR fixed still work. The existing +1.5 MiB SRV/UAV tests still pass, and a unit test checks the caps and that shorter extents are taken whole. The fallback VAs and root UAV support are unchanged. Gate: clippy (both configs), `cargo test --workspace` and `cargo xtask policy` are clean.
Author
Owner

@⁠ghost on GitHub · 2026-11-24 06:04 UTC · original · edited 2026-11-24 06:05 UTC

In game on AMD RDNA4 (RX 9060 XT, Windows 11), opening cutscene: d2a4bae + #135 + #365 + #318 + #385 + #346 + #305 + #500 + #489 (279eac1), diag + a local logging patch; this PR's draw.rs conflict resolved to its side.

With 0050ce5, 3b90165a77d95cdf (the largest compute dropper) and 4ddd6f9702fab2a7 run: 3,003 and 120 dispatches in 5 traced frames, none dropped.

But the device hangs (0x887A0006) 16–23 s after the world starts in every run I didn't stop first: 4 runs (3 at 0050ce5, 1 at bffaefd, so not the new caps). Two short runs I stopped at 20–21 s hadn't hung yet, and one bffaefd run ended at 12 s in a title access violation instead. Each time 3b90…, 4ddd… and 969c1cef8b783b39 dispatches are in flight, and the fault is in no title memory copy. Without this PR: 79 and 219 s, the known inside freed texture fault with mesh draws. 969c… runs without this PR too.

With VICTORY_SKIP_PIPELINES for 3b90… and 4ddd…, 1 of 2 runs still hung (28 s), with three other programs this PR enables in flight (14394a322f6dd5c2, f94e5d8bf4e1cf05, 5c09eb42b7a3c362). So it looks like the root-UAV programs as a group.

Not checked: which dispatch faults; GBV.

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

**@⁠ghost** on GitHub · 2026-11-24 06:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7123545419) · edited 2026-11-24 06:05 UTC In game on AMD RDNA4 (RX 9060 XT, Windows 11), opening cutscene: `d2a4bae` + #135 + #365 + #318 + #385 + #346 + #305 + #500 + #489 (`279eac1`), `diag` + a local logging patch; this PR's `draw.rs` conflict resolved to its side. With `0050ce5`, `3b90165a77d95cdf` (the largest compute dropper) and `4ddd6f9702fab2a7` run: 3,003 and 120 dispatches in 5 traced frames, none dropped. But the device hangs (`0x887A0006`) 16–23 s after the world starts in every run I didn't stop first: 4 runs (3 at `0050ce5`, 1 at `bffaefd`, so not the new caps). Two short runs I stopped at 20–21 s hadn't hung yet, and one `bffaefd` run ended at 12 s in a title access violation instead. Each time `3b90…`, `4ddd…` and `969c1cef8b783b39` dispatches are in flight, and the fault is in no title memory copy. Without this PR: 79 and 219 s, the known `inside freed texture` fault with mesh draws. `969c…` runs without this PR too. With `VICTORY_SKIP_PIPELINES` for `3b90…` and `4ddd…`, 1 of 2 runs still hung (28 s), with three other programs this PR enables in flight (`14394a322f6dd5c2`, `f94e5d8bf4e1cf05`, `5c09eb42b7a3c362`). So it looks like the root-UAV programs as a group. Not checked: which dispatch faults; GBV. AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Author
Owner

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

I checked the root-SRV extent change on Windows in a local integration that also uses the bounded root-SRV tables from #493. The synthetic root_srv_refreshes_dirty_data_past_one_mib regression passed.

I also replayed six dropped world compute shaders offline on that integration. All six reached the program IR, but none produced a host compute pipeline. Four stopped during resource tracking with “an address in an SGPR that is no root parameter” and the two meshlet-culling variants stopped in emission with “a hardware SGPR input”. In this configuration the translator stops before these programs can exercise the runtime root-UAV binding. This check verifies the SRV refresh separately from the title’s lighting.

**@⁠Raxstreams** on GitHub · 2026-11-24 06:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7123738357) I checked the root-SRV extent change on Windows in a local integration that also uses the bounded root-SRV tables from #493. The synthetic `root_srv_refreshes_dirty_data_past_one_mib` regression passed. I also replayed six dropped world compute shaders offline on that integration. All six reached the program IR, but none produced a host compute pipeline. Four stopped during resource tracking with “an address in an SGPR that is no root parameter” and the two meshlet-culling variants stopped in emission with “a hardware SGPR input”. In this configuration the translator stops before these programs can exercise the runtime root-UAV binding. This check verifies the SRV refresh separately from the title’s lighting.
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 05:05 UTC · original · edited 2026-11-24 06:55 UTC

Tested this PR at 0050ce50 together with #489 at 279eac1 (which includes #302) on Windows 11 and a physical RTX 5070. Five previously refused compute shaders reached fence-complete direct dispatches during mission loading.

Same 31 compute inputs Windows SDK-valid DXIL
Main d2a4bae 0
#302 0
#489 0
#489 + this PR 6

All six previously stopped on root UAV / typed root view handling with #489. The SDK preserved all six emitted DXIL hashes. For the live comparison I kept the previous mission build, including #457 and the same readback instrumentation, and added #489 and this PR. The startup logs show 682 early pipeline keys for the previous build and 683 for the combined build. I staged identical 682-key seeds, but the harness set only the data directory and both launchers used the shared pipeline cache. The runs therefore do not give a controlled cache or frame-time comparison. A diagnostic observer matched nonempty direct dispatches for five distinct shaders to their submitted command lists. The native queue fence completed at the submitted value for both batches. The mission screen remained near black. This run establishes dispatch progress, with visible rendering and frame-time impact still unresolved.

I also isolated why the sixth shader fails pipeline creation on this adapter. Its validated DXIL requires a 64-lane wave, and DXC accepts the production root signature for it. The RTX 5070 reports WaveOps support with both the minimum and maximum wave size at 32. I compared two ordinary 512-thread compute shaders with 1,024 bytes of group-shared memory and the same root signature. Both passed SDK and root-signature validation. Changing only [WaveSize(32)] to [WaveSize(64)] changed native pipeline creation from S_OK to E_INVALIDARG (0x80070057), the same refusal as the sixth shader. This is a sufficient reason for that PSO refusal. The test created no command list or queue. Related wave-size handling in #223.

Separately, the production root-binding and guest copy-back path passed a bounded synthetic check on the same GPU. A direct dispatch and a one-group indirect dispatch both wrote the expected guest dword. An unmapped UAV wrote to the designated sink, the separate zero buffer stayed zero, and surrounding guest bytes stayed intact. Each submission completed its fence with the device reporting S_OK.

**@⁠jeremygold02** on GitHub · 2026-11-24 05:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7122618287) · edited 2026-11-24 06:55 UTC Tested this PR at `0050ce50` together with #489 at `279eac1` (which includes #302) on Windows 11 and a physical RTX 5070. Five previously refused compute shaders reached fence-complete direct dispatches during mission loading. | Same 31 compute inputs | Windows SDK-valid DXIL | | --- | ---: | | Main `d2a4bae` | 0 | | #302 | 0 | | #489 | 0 | | #489 + this PR | 6 | All six previously stopped on root UAV / typed root view handling with #489. The SDK preserved all six emitted DXIL hashes. For the live comparison I kept the previous mission build, including #457 and the same readback instrumentation, and added #489 and this PR. The startup logs show 682 early pipeline keys for the previous build and 683 for the combined build. I staged identical 682-key seeds, but the harness set only the data directory and both launchers used the shared pipeline cache. The runs therefore do not give a controlled cache or frame-time comparison. A diagnostic observer matched nonempty direct dispatches for **five distinct shaders** to their submitted command lists. The native queue fence completed at the submitted value for both batches. The mission screen remained near black. This run establishes dispatch progress, with visible rendering and frame-time impact still unresolved. I also isolated why the sixth shader fails pipeline creation on this adapter. Its validated DXIL requires a 64-lane wave, and DXC accepts the production root signature for it. The RTX 5070 reports WaveOps support with both the minimum and maximum wave size at 32. I compared two ordinary 512-thread compute shaders with 1,024 bytes of group-shared memory and the same root signature. Both passed SDK and root-signature validation. Changing only `[WaveSize(32)]` to `[WaveSize(64)]` changed native pipeline creation from `S_OK` to `E_INVALIDARG` (`0x80070057`), the same refusal as the sixth shader. This is a sufficient reason for that PSO refusal. The test created no command list or queue. [Related wave-size handling in #223](https://git.gtahub.st/github/Marvisak--VIctory/pulls/223). Separately, the production root-binding and guest copy-back path passed a bounded synthetic check on the same GPU. A direct dispatch and a one-group indirect dispatch both wrote the expected guest dword. An unmapped UAV wrote to the designated sink, the separate zero buffer stayed zero, and surrounding guest bytes stayed intact. Each submission completed its fence with the device reporting `S_OK`.
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 07:13 UTC · original

Thanks @⁠nullmarsh and @⁠miniongk for the live hardware reports!

Re: the 16–28 s 0x887A0006 hangs across the root-UAV compute group (3b90165a77d95cdf, 4ddd6f9702fab2a7, 14394a322f6dd5c2, f94e5d8bf4e1cf05, 5c09eb42b7a3c362) with the fault outside any title memory copy:

  • I audited #294's draw.rs, pipeline/host.rs, and victory-shader/src/emit/{lower.rs,shader.rs} root-UAV paths. The binding slots, deduplication, VSH2 cache, and UAV barriers match up cleanly (as confirmed by @⁠jeremygold02's bounded hardware dispatch/readback test).
  • The likely cause of the unmapped-address fault across all five root-UAV shaders as a group is that D3D12 root descriptors (SetComputeRootUnorderedAccessView / SetComputeRootShaderResourceView) carry no hardware size or bounds check. On the console, Source::Built V# descriptors enforce num_records (silently dropping OOB stores and zeroing OOB loads), and global_load_* / global_store_* can receive negative or OOB offsets when an earlier producer pass is dropped or returns zeros. On a raw D3D12 root UAV, any OOB byte offset writes/reads straight past the end of the host Shadow buffer into unmapped GPU VA space ("in no title memory copy") and triggers 0x887A0006 — the same class of unbounded root-descriptor fault seen on Root SRVs in #71 / #493 (c48b240) and addressed by bounded root views in #650.
  • If you happen to test #294 with VICTORY_D3D12_GBV=1 or stacked with #650 (or capture which of the 5 hashes DRED stops on), that would confirm whether the fault is an OOB root-UAV offset vs a shader loop timeout (like the wave64/loop compute hangs in #97 on @⁠miniongk's RTX 5080).
**@⁠wbkepler** on GitHub · 2026-11-24 07:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7124750308) Thanks @⁠nullmarsh and @⁠miniongk for the live hardware reports! Re: the 16–28 s `0x887A0006` hangs across the root-UAV compute group (`3b90165a77d95cdf`, `4ddd6f9702fab2a7`, `14394a322f6dd5c2`, `f94e5d8bf4e1cf05`, `5c09eb42b7a3c362`) with the fault outside any title memory copy: - I audited `#294`'s `draw.rs`, `pipeline/host.rs`, and `victory-shader/src/emit/{lower.rs,shader.rs}` root-UAV paths. The binding slots, deduplication, `VSH2` cache, and UAV barriers match up cleanly (as confirmed by @⁠jeremygold02's bounded hardware dispatch/readback test). - The likely cause of the unmapped-address fault across all five root-UAV shaders as a group is that **D3D12 root descriptors (`SetComputeRootUnorderedAccessView` / `SetComputeRootShaderResourceView`) carry no hardware size or bounds check**. On the console, `Source::Built` V# descriptors enforce `num_records` (silently dropping OOB stores and zeroing OOB loads), and `global_load_*` / `global_store_*` can receive negative or OOB offsets when an earlier producer pass is dropped or returns zeros. On a raw D3D12 root UAV, any OOB byte offset writes/reads straight past the end of the host `Shadow` buffer into unmapped GPU VA space ("in no title memory copy") and triggers `0x887A0006` — the same class of unbounded root-descriptor fault seen on Root SRVs in #71 / #493 (`c48b240`) and addressed by bounded root views in #650. - If you happen to test `#294` with `VICTORY_D3D12_GBV=1` or stacked with #650 (or capture which of the 5 hashes DRED stops on), that would confirm whether the fault is an OOB root-UAV offset vs a shader loop timeout (like the wave64/loop compute hangs in #97 on @⁠miniongk's RTX 5080).
Author
Owner

@⁠Vaximous on GitHub · 2026-11-24 07:33 UTC · original

A memory-corruption hazard in the root UAV path here, which I ran into with my own root-UAV binding on a local branch. The mechanism is the same in this PR.

root_view(.., RootView::Uav) gets the host copy with crate::shadow::find(address, 1). When no registered title buffer holds the address, find falls back to loose(), a window copy of whatever committed title memory is at that address. That is harmless for reads (CBV/SRV). But the UAV branch then calls shadow.gpu_writes(list, address, len), so whatever the shader writes there is copied back into that CPU memory after the submission. When the address is wrong, or points at memory the title uses for its own CPU-side records, the shader's bytes overwrite title objects.

Observed on an RTX 4070 Ti (local integration branch with root UAVs and address tracing through two root constants / readfirstlane):

  • About 14 s after world entry the title crashed with 0xc0000005 reading a non-canonical address. It had loaded a pointer field from one of its own pool objects, and that field held two floats (0xbf116000bf4e8000).
  • 16 distinct root UAV addresses in that run were outside every registered buffer, all in one region. Each had been bound as a writable loose window.
  • Fix: root UAVs look up registered buffer objects only (a find_buffer that shares find's lookup minus the loose fallback), and drop the draw/dispatch otherwise. With that, the same build ran ~145 s in the world (to the run's time limit) with no exception.

Suggested change for this PR: use a buffer-only lookup for RootView::Uav (and anything that calls gpu_writes). When it misses, take the zeroed fallback VA this PR already has, instead of a loose window. The fallback keeps the dispatch running without touching title memory. A loose window stays fine for CBV/SRV.

Not tested on this PR's branch itself (only on my local branch with the equivalent binding), so treat the above as a review note rather than a repro on #294.

**@⁠Vaximous** on GitHub · 2026-11-24 07:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7125119230) A memory-corruption hazard in the root UAV path here, which I ran into with my own root-UAV binding on a local branch. The mechanism is the same in this PR. `root_view(.., RootView::Uav)` gets the host copy with `crate::shadow::find(address, 1)`. When no registered title buffer holds the address, `find` falls back to `loose()`, a window copy of whatever committed title memory is at that address. That is harmless for reads (CBV/SRV). But the UAV branch then calls `shadow.gpu_writes(list, address, len)`, so whatever the shader writes there is copied back into that CPU memory after the submission. When the address is wrong, or points at memory the title uses for its own CPU-side records, the shader's bytes overwrite title objects. Observed on an RTX 4070 Ti (local integration branch with root UAVs and address tracing through two root constants / readfirstlane): - About 14 s after world entry the title crashed with `0xc0000005` reading a non-canonical address. It had loaded a pointer field from one of its own pool objects, and that field held two floats (`0xbf116000bf4e8000`). - 16 distinct root UAV addresses in that run were outside every registered buffer, all in one region. Each had been bound as a writable loose window. - Fix: root UAVs look up registered buffer objects only (a `find_buffer` that shares `find`'s lookup minus the `loose` fallback), and drop the draw/dispatch otherwise. With that, the same build ran ~145 s in the world (to the run's time limit) with no exception. Suggested change for this PR: use a buffer-only lookup for `RootView::Uav` (and anything that calls `gpu_writes`). When it misses, take the zeroed fallback VA this PR already has, instead of a loose window. The fallback keeps the dispatch running without touching title memory. A loose window stays fine for CBV/SRV. Not tested on this PR's branch itself (only on my local branch with the equivalent binding), so treat the above as a review note rather than a repro on #294.
Author
Owner

@⁠itsRevela on GitHub · 2026-11-24 07:43 UTC · original

A data point from the title's opening cutscene, in case it helps with the device-hung reports here. Setup:

  • Hardware: RTX 3070 Ti (driver 32.0.16.1088) through Windows Sandbox's vGPU, Windows 11 26200.
  • Builds: diag builds with a warm shader cache.
  • Method: DRED, plus VICTORY_GPU_TIMING.

This PR is what lets compute program 4ddd6f9702fab2a7 translate.

  • On main it stops at an address in an SGPR that is no root parameter.
  • With #302 #489 #307 #346 it stops at a root UAV or typed root view.
  • Adding this PR, it translates.

In a local integration build it is what hangs. That build is this PR plus #302 #489, my #709 #710 and two more translator changes.

  • What DRED shows: the device is removed (0x887A0006) while a single dispatch 1x1x1 of that program is in flight, a few frames into the heavy part of the cutscene. Two runs out of two.
  • With the loop limit: the same happens with VICTORY_SHADER_LOOP_LIMIT=4096. That cut the slow commands from 98 to 42 (7.05 s to 1.62 s of timed GPU work) but not this one, so it doesn't look like a loop that merely runs long.
  • With the program skipped (VICTORY_SKIP_PIPELINES=4ddd6f9702fab2a7), the cutscene runs about twice as long, 24 frames past the first heavy frame against 6 to 12. Then the device goes on an indirect mesh dispatch, the hang #325 and #71 describe.

So one workgroup of this program never finishes. Either its root-UAV accesses translate wrongly, or it waits on something written by passes that are still dropped. On #302 #489 #307 #346 + this PR alone, the first hang was the indirect mesh one instead. So it may need the extra work the integration build runs before it spins.

Counts and hashes only. AI-assisted (Claude Code).

**@⁠itsRevela** on GitHub · 2026-11-24 07:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7125295904) A data point from the title's opening cutscene, in case it helps with the device-hung reports here. Setup: - **Hardware:** RTX 3070 Ti (driver 32.0.16.1088) through Windows Sandbox's vGPU, Windows 11 26200. - **Builds:** `diag` builds with a warm shader cache. - **Method:** DRED, plus `VICTORY_GPU_TIMING`. **This PR is what lets compute program `4ddd6f9702fab2a7` translate.** - On `main` it stops at `an address in an SGPR that is no root parameter`. - With #302 #489 #307 #346 it stops at `a root UAV or typed root view`. - Adding this PR, it translates. **In a local integration build it is what hangs.** That build is this PR plus #302 #489, my #709 #710 and two more translator changes. - **What DRED shows:** the device is removed (`0x887A0006`) while a single **`dispatch 1x1x1`** of that program is in flight, a few frames into the heavy part of the cutscene. Two runs out of two. - **With the loop limit:** the same happens with `VICTORY_SHADER_LOOP_LIMIT=4096`. That cut the slow commands from 98 to 42 (7.05 s to 1.62 s of timed GPU work) but not this one, so it doesn't look like a loop that merely runs long. - **With the program skipped** (`VICTORY_SKIP_PIPELINES=4ddd6f9702fab2a7`), the cutscene runs about twice as long, 24 frames past the first heavy frame against 6 to 12. Then the device goes on an indirect mesh dispatch, the hang #325 and #71 describe. So one workgroup of this program never finishes. Either its root-UAV accesses translate wrongly, or it waits on something written by passes that are still dropped. On #302 #489 #307 #346 + this PR alone, the first hang was the indirect mesh one instead. So it may need the extra work the integration build runs before it spins. Counts and hashes only. AI-assisted (Claude Code).
Author
Owner

@⁠ghost on GitHub · 2026-11-24 07:45 UTC · original

@⁠wbkepler The removal report says where the list stopped, and it is the same program every time:

run stopped at
4 hangs with this PR (3 at 0050ce5, 1 at bffaefd) command 606, 477, 501, 3037: dispatch 1x1x1 [compute 4ddd6f9702fab2a7], op 6 of its list
with 3b90… and 4ddd… skipped dispatch 39x1x1 [compute 14394a322f6dd5c2], op 6
2 control hangs without this PR mesh draws (51ff151f75cd5759, c962201cddbdd7dd), op 42

No binding zeroed fallback warning appears in any of these runs. One bffaefd run ended instead with a title access violation 12 s into the world, which might be @⁠Vaximous's loose-window case; I can't tell from here.

#650 conflicts with this PR directly (git merge-tree prs/294 prs/650: draw.rs, lower.rs, valu_tests.rs). A combined branch from you would be a fairer test than my hand merge; I'll run it on the same stack. GBV: my one GBV run (on the base, not this PR) hit the title watchdog before the world; with #454's VICTORY_NO_WATCHDOG I can try it on this PR.

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

**@⁠ghost** on GitHub · 2026-11-24 07:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7125331658) @⁠wbkepler The removal report says where the list stopped, and it is the same program every time: | run | stopped at | |---|---| | 4 hangs with this PR (3 at `0050ce5`, 1 at `bffaefd`) | command 606, 477, 501, 3037: `dispatch 1x1x1 [compute 4ddd6f9702fab2a7]`, op 6 of its list | | with `3b90…` and `4ddd…` skipped | `dispatch 39x1x1 [compute 14394a322f6dd5c2]`, op 6 | | 2 control hangs without this PR | mesh draws (`51ff151f75cd5759`, `c962201cddbdd7dd`), op 42 | No `binding zeroed fallback` warning appears in any of these runs. One `bffaefd` run ended instead with a title access violation 12 s into the world, which might be @⁠Vaximous's loose-window case; I can't tell from here. #650 conflicts with this PR directly (`git merge-tree prs/294 prs/650`: `draw.rs`, `lower.rs`, `valu_tests.rs`). A combined branch from you would be a fairer test than my hand merge; I'll run it on the same stack. GBV: my one GBV run (on the base, not this PR) hit the title watchdog before the world; with #454's `VICTORY_NO_WATCHDOG` I can try it on this PR. AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-24 09:38 UTC · original

Tested on an RTX 4070 SUPER (diag build, main 58fed37 + ~25 PRs including #493, #688, #483, #189; conflicts resolved by keeping #493's one-view tables for root SRVs and sending root CBVs/UAVs through this PR's push_root_view; + #709):

  • "a root UAV or typed root view is not supported" disappears (14 programs before, 0 after). Untranslated programs in the world drop from 549 to 482.
  • The two compute programs dropped most often in the mission 1 opening (about 400 and 200 per frame) now get past the root UAV and stop on "an LDS write of bytes or halves" and "buffer_load_ushort".
  • Side effect to know about: a compute program this PR unblocks now runs and hangs the GPU (DXGI_ERROR_DEVICE_HUNG). DRED stops on a Dispatch 1x1x1 of it, and one of its tables reads a null heap slot. VICTORY_SHADER_LOOP_LIMIT=32 does not prevent it, so it looks like a wait on data that a still-dropped producer never writes, rather than a problem in this PR.

🤖 Generated with Claude Code

**@⁠LooperSalty** on GitHub · 2026-11-24 09:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7127685531) Tested on an RTX 4070 SUPER (diag build, main `58fed37` + ~25 PRs including #493, #688, #483, #189; conflicts resolved by keeping #493's one-view tables for root SRVs and sending root CBVs/UAVs through this PR's `push_root_view`; + #709): - "a root UAV or typed root view is not supported" disappears (14 programs before, 0 after). Untranslated programs in the world drop from 549 to 482. - The two compute programs dropped most often in the mission 1 opening (about 400 and 200 per frame) now get past the root UAV and stop on "an LDS write of bytes or halves" and "buffer_load_ushort". - Side effect to know about: a compute program this PR unblocks now runs and hangs the GPU (`DXGI_ERROR_DEVICE_HUNG`). DRED stops on a `Dispatch 1x1x1` of it, and one of its tables reads a null heap slot. `VICTORY_SHADER_LOOP_LIMIT=32` does not prevent it, so it looks like a wait on data that a still-dropped producer never writes, rather than a problem in this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 10:32 UTC · original

For the requested combined source and the two mission-1 compiler refusals reported here, there are now two pinned revisions for an offline translation and validation comparison.

  • afa5bdc, bounded root views combines #294, #650 and #709 with their prerequisites. The normal dispatch test checks that an interior root view gets the correct start and remaining byte count.
  • 6649785, sub-dword comparison adds #571 for LDS byte/halfword access and a focused implementation of buffer_load_ushort through bounded root views. The latter covers a halfword crossing a dword boundary and is narrower than all of #164. The combined source passed 69 Linux shader tests, the asset check, and Windows-target checks for the CLI and shader/GPU tests.

If the original two compute programs are available locally, the useful result is one line per program and revision: whether it validated, or the first remaining refusal. The public report does not identify the descriptor class for the halfword load. The combined revision has no measured title coverage or HDR output result yet.

AI-assisted integration and verification.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 10:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7128922723) For the requested combined source and the two mission-1 compiler refusals reported here, there are now two pinned revisions for an **offline translation and validation comparison**. - [`afa5bdc`, bounded root views](https://github.com/MichaelSmithAI/VIctory/pull/4) combines #294, #650 and #709 with their prerequisites. The normal dispatch test checks that an interior root view gets the correct start and remaining byte count. - [`6649785`, sub-dword comparison](https://github.com/MichaelSmithAI/VIctory/commit/664978547a2f24aa2df848a00a7abc75fc878d81) adds #571 for LDS byte/halfword access and a focused implementation of `buffer_load_ushort` through bounded root views. The latter covers a halfword crossing a dword boundary and is narrower than all of #164. The combined source passed 69 Linux shader tests, the asset check, and Windows-target checks for the CLI and shader/GPU tests. If the original two compute programs are available locally, the useful result is one line per program and revision: whether it validated, or the first remaining refusal. The public report does not identify the descriptor class for the halfword load. The combined revision has no measured title coverage or HDR output result yet. AI-assisted integration and verification.
Author
Owner

@⁠ghost on GitHub · 2026-11-24 11:27 UTC · original

@⁠wbkepler @⁠MichaelSmithAI In game on an RX 9060 XT (driver 32.0.32029.2010), diag + DRED, 2 runs of 200 s per build: afa5bdc (this PR 0050ce5, #650 06657a8, #709 e50ed36, #489 279eac1, #307, #346 on d2a4bae) + #135 + #365, #135's draw.rs conflict resolved to the branch's side.

build end
afa5bdc no device loss in either run, still running at the limit (104 and 140 s in the world)
the same with the merge 66ac451 (#650) reverted device hung 31 and 25 s into the world, the list stopped at dispatch 1x1x1 [compute 4ddd6f9702fab2a7], op 6, both times

The reverted build stops where this PR alone did in my four earlier runs. In both builds 3b90165a77d95cdf, 4ddd6f9702fab2a7, 14394a322f6dd5c2, f94e5d8bf4e1cf05 and 5c09eb42b7a3c362 translate, get host pipelines, and have no drop lines, so they run either way. Reverting that merge brings the hang back. (@⁠LooperSalty's NVIDIA hang on a Dispatch 1x1x1 may be the same one.)

Not checked: #650 without #709; past 140 s, which is short of where the baseline's own fault comes (79–219 s).

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

**@⁠ghost** on GitHub · 2026-11-24 11:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7130113211) @⁠wbkepler @⁠MichaelSmithAI In game on an RX 9060 XT (driver 32.0.32029.2010), `diag` + DRED, 2 runs of 200 s per build: `afa5bdc` (this PR `0050ce5`, #650 `06657a8`, #709 `e50ed36`, #489 `279eac1`, #307, #346 on `d2a4bae`) + #135 + #365, #135's `draw.rs` conflict resolved to the branch's side. | build | end | |---|---| | `afa5bdc` | no device loss in either run, still running at the limit (104 and 140 s in the world) | | the same with the merge `66ac451` (#650) reverted | device hung 31 and 25 s into the world, the list stopped at `dispatch 1x1x1 [compute 4ddd6f9702fab2a7]`, op 6, both times | The reverted build stops where this PR alone did in my four earlier runs. In both builds `3b90165a77d95cdf`, `4ddd6f9702fab2a7`, `14394a322f6dd5c2`, `f94e5d8bf4e1cf05` and `5c09eb42b7a3c362` translate, get host pipelines, and have no drop lines, so they run either way. Reverting that merge brings the hang back. (@⁠LooperSalty's NVIDIA hang on a `Dispatch 1x1x1` may be the same one.) Not checked: #650 without #709; past 140 s, which is short of where the baseline's own fault comes (79–219 s). AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Author
Owner

@⁠itsRevela on GitHub · 2026-11-24 07:48 UTC · original · edited 2026-11-24 12:25 UTC

Follow-up on 4ddd6f9702fab2a7. Its code (read locally, not posted) has no loop at all: 52 instructions, only forward execz branches, 2 buffer loads, 2 buffer stores and 2 scalar loads. The buffer accesses are raw (offen, no idxen) through its two root UAVs (Descriptor parameters, declared stride: 1). So it can't be spinning, and my "waits on something" guess above is wrong. A single straight-line workgroup that never completes points instead at one of those root-UAV accesses hitting an address the host can't serve: an unmapped address, a fallback/sink buffer, or an offset past the refreshed extent. That would be the thing to check in this PR's binding path. Counts only. AI-assisted (Claude Code).

Addendum: in the DRED dump of that hang, both root UAVs of the dispatch are the same title address, and the host maps it to one host copy 0x60700 bytes long, the same for both. So the two views alias one 394 KB region, and any access past it goes beyond the host copy. Root views carry no size, so nothing stops that on the GPU.

Second addendum, an experiment: I had root_view ask shadow::find for the whole capped extent (root_len(u64::MAX, kind)) instead of 1 byte. That made 4 loose copies. Then 4ddd6f9702fab2a7 is no longer what hangs, but the device still goes 8 frames into the heavy part. This time it's on another single dispatch 1x1x1 of a small compute program that accesses memory through root UAVs (5552dac6a2b7a1fd, which also needs #709 to translate). So it looks like a class: one-workgroup compute programs that access memory through root UAVs. It doesn't look like one program's extent.

**@⁠itsRevela** on GitHub · 2026-11-24 07:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7125393035) · edited 2026-11-24 12:25 UTC Follow-up on `4ddd6f9702fab2a7`. Its code (read locally, not posted) has **no loop at all**: 52 instructions, only forward `execz` branches, 2 buffer loads, 2 buffer stores and 2 scalar loads. The buffer accesses are raw (`offen`, no `idxen`) through its two root UAVs (`Descriptor` parameters, declared `stride: 1`). So it can't be spinning, and my "waits on something" guess above is wrong. A single straight-line workgroup that never completes points instead at one of those root-UAV accesses hitting an address the host can't serve: an unmapped address, a fallback/sink buffer, or an offset past the refreshed extent. That would be the thing to check in this PR's binding path. Counts only. AI-assisted (Claude Code). Addendum: in the DRED dump of that hang, **both root UAVs of the dispatch are the same title address**, and the host maps it to one host copy `0x60700` bytes long, the same for both. So the two views alias one 394 KB region, and any access past it goes beyond the host copy. Root views carry no size, so nothing stops that on the GPU. Second addendum, an experiment: I had `root_view` ask `shadow::find` for the whole capped extent (`root_len(u64::MAX, kind)`) instead of 1 byte. That made 4 loose copies. Then `4ddd6f9702fab2a7` is no longer what hangs, but the device still goes 8 frames into the heavy part. This time it's on another single `dispatch 1x1x1` of a small compute program that accesses memory through root UAVs (`5552dac6a2b7a1fd`, which also needs #709 to translate). So it looks like a class: one-workgroup compute programs that access memory through root UAVs. It doesn't look like one program's extent.
Author
Owner

@⁠erickbobd on GitHub · 2026-11-24 12:44 UTC · original

A data point on an RTX 5070 Ti (617.14, Windows 11, Series S, VICTORY_SHADER_LOOP_LIMIT=32), in case it helps with the root UAV part.

On a base that stays in the world (d2a4bae + #493 #483 #189 #89 #205 #206 #469 #459 #454 #211 #472 #688 #489, 10 min with no device removal), adding this PR lost the device at 118 s and 127 s, still during loading; DRED stopped at compute 4ddd6f9702fab2a7, one of the programs whose root UAV this PR lets translate.

As a local experiment I kept this PR's shader and root-signature side but bound each root UAV as a one-view table with a raw UAV of the host copy, sized to what is left of that copy (the way #493 binds root SRVs), so a write past it is dropped instead of going through an unbounded VA; no copy-back. That build stayed 10 min in the world with no device removal (one run; two other runs ended in host OOM during loading: peak private bytes rose from about 15 GB to 20 GB). 4ddd6f9702fab2a7 and 3b90165a77d95cdf now translate; caa78b8ca62bc3d6 and 28918b7150a7aad5 then stop at buffer_load_ushort. The 3D scene is still black, and the world was slower (0.7 fps against 1.2).

So the device loss looks like unbounded root UAV writes, not the root UAV programs themselves. One root UAV address here was only 4-byte aligned, which a raw view cannot start at.

No game data attached. AI-assisted (Claude Code); runs on my machine.

**@⁠erickbobd** on GitHub · 2026-11-24 12:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7131855585) A data point on an RTX 5070 Ti (617.14, Windows 11, Series S, `VICTORY_SHADER_LOOP_LIMIT=32`), in case it helps with the root UAV part. On a base that stays in the world (`d2a4bae` + #493 #483 #189 #89 #205 #206 #469 #459 #454 #211 #472 #688 #489, 10 min with no device removal), adding this PR lost the device at 118 s and 127 s, still during loading; DRED stopped at compute `4ddd6f9702fab2a7`, one of the programs whose root UAV this PR lets translate. As a local experiment I kept this PR's shader and root-signature side but bound each root UAV as a one-view table with a raw UAV of the host copy, sized to what is left of that copy (the way #493 binds root SRVs), so a write past it is dropped instead of going through an unbounded VA; no copy-back. That build stayed 10 min in the world with no device removal (one run; two other runs ended in host OOM during loading: peak private bytes rose from about 15 GB to 20 GB). `4ddd6f9702fab2a7` and `3b90165a77d95cdf` now translate; `caa78b8ca62bc3d6` and `28918b7150a7aad5` then stop at `buffer_load_ushort`. The 3D scene is still black, and the world was slower (0.7 fps against 1.2). So the device loss looks like unbounded root UAV writes, not the root UAV programs themselves. One root UAV address here was only 4-byte aligned, which a raw view cannot start at. No game data attached. AI-assisted (Claude Code); runs on my machine.
Author
Owner

@⁠ghost on GitHub · 2026-11-24 13:13 UTC · original

Follow-up on the RX 9060 XT. afa5bdc (+ #135 + #365) over four runs: no device loss in any; two ran to the 200 s limit, two longer ones ended in title access violations 35 and 137 s into the world.

@⁠MichaelSmithAI your 6649785 on the same base, from the runtime log:

program afa5bdc 6649785
caa78b8ca62bc3d6 an LDS write of bytes or halves buffer_store_short
28918b7150a7aad5 buffer_load_ushort translates, host pipeline, no drops

With 6649785 as is, 4 of 4 runs end in a title access violation 10–14 s after 28918… is first bound, before the first world frame. With it skipped, 4 of 4 reach the world (3 to the limit). In 3 of those 4 crashes the pointer register holds two floats (0x7f8000007f800000), and the skip run's one crash shows another float pair. That looks like @⁠Vaximous's case above: a root-UAV write-back landing on title data. So 28918…, a root-UAV writer, may be triggering this PR's write-back rather than the halfword read being wrong. Not checked: which memory its root UAV points at.

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

**@⁠ghost** on GitHub · 2026-11-24 13:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7132532311) Follow-up on the RX 9060 XT. `afa5bdc` (+ #135 + #365) over four runs: no device loss in any; two ran to the 200 s limit, two longer ones ended in title access violations 35 and 137 s into the world. @⁠MichaelSmithAI your `6649785` on the same base, from the runtime log: | program | `afa5bdc` | `6649785` | |---|---|---| | `caa78b8ca62bc3d6` | `an LDS write of bytes or halves` | `buffer_store_short` | | `28918b7150a7aad5` | `buffer_load_ushort` | translates, host pipeline, no drops | With `6649785` as is, 4 of 4 runs end in a title access violation 10–14 s after `28918…` is first bound, before the first world frame. With it skipped, 4 of 4 reach the world (3 to the limit). In 3 of those 4 crashes the pointer register holds two floats (`0x7f8000007f800000`), and the skip run's one crash shows another float pair. That looks like @⁠Vaximous's case above: a root-UAV write-back landing on title data. So `28918…`, a root-UAV writer, may be triggering this PR's write-back rather than the halfword read being wrong. Not checked: which memory its root UAV points at. AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Author
Owner

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

Read of head c00c1bc against current main (ffe310e; this PR's base is d2a4bae). It merges without a text conflict, but the Windows test build should stop compiling:

  • The PR adds a required field pub root_uavs: Vec<u8> to HostShader (emit/mod.rs:159, no Default).
  • emit/waterfall_tests.rs exists on main but not in this PR's base, and its build() makes a HostShader { stage, dxil, user_data, samplers, static_samplers, root_cbvs, root_srvs } literal (line 77, no ..). After the merge that literal has no root_uavs, so cargo test -p victory-shader on Windows should fail with E0063: missing field root_uavs.

Adding root_uavs: lowered.root_uavs, next to root_srvs: lowered.root_srvs, there should be enough (Lowered carries root_uavs in this PR, lower.rs:38). The module is #[cfg(all(test, windows))], so I could not compile it on Linux; this is from reading both files. It is the same kind of base drift as the resource::track arity change tracked in #801. AI-assisted; no game data.

**@⁠dpalacios69** on GitHub · 2026-11-24 19:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7141484168) Read of head `c00c1bc` against current `main` (`ffe310e`; this PR's base is `d2a4bae`). It merges without a text conflict, but the Windows test build should stop compiling: - The PR adds a required field `pub root_uavs: Vec<u8>` to `HostShader` (`emit/mod.rs:159`, no `Default`). - `emit/waterfall_tests.rs` exists on `main` but not in this PR's base, and its `build()` makes a `HostShader { stage, dxil, user_data, samplers, static_samplers, root_cbvs, root_srvs }` literal (line 77, no `..`). After the merge that literal has no `root_uavs`, so `cargo test -p victory-shader` on Windows should fail with `E0063: missing field root_uavs`. Adding `root_uavs: lowered.root_uavs,` next to `root_srvs: lowered.root_srvs,` there should be enough (`Lowered` carries `root_uavs` in this PR, `lower.rs:38`). The module is `#[cfg(all(test, windows))]`, so I could not compile it on Linux; this is from reading both files. It is the same kind of base drift as the `resource::track` arity change tracked in #801. AI-assisted; no game data.
Author
Owner

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

Thanks @⁠dpalacios69 for the catch. The branch is now rebased onto upstream ffe310e (head a4e0feb), and root_uavs is added to the HostShader literal in waterfall_tests.rs (plus the resource::track signature change in the new Root UAV tests). Clippy, cargo test -p victory-shader -p victory-gpu and the asset policy check are clean.

For the earlier in-world reports of a device hang at a compute program with two raw root UAVs (@⁠nullmarsh, @⁠itsRevela, @⁠erickbobd): your own data shows the hang goes away once #650 (bounding root view accesses by the host-bound size) is stacked on this PR, so #650 should land with or before this one.

AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.

**@⁠wbkepler** on GitHub · 2026-11-24 20:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/294#issuecomment-7143763614) Thanks @⁠dpalacios69 for the catch. The branch is now rebased onto upstream `ffe310e` (head `a4e0feb`), and `root_uavs` is added to the `HostShader` literal in `waterfall_tests.rs` (plus the `resource::track` signature change in the new Root UAV tests). Clippy, `cargo test -p victory-shader -p victory-gpu` and the asset policy check are clean. For the earlier in-world reports of a device hang at a compute program with two raw root UAVs (@⁠nullmarsh, @⁠itsRevela, @⁠erickbobd): your own data shows the hang goes away once #650 (bounding root view accesses by the host-bound size) is stacked on this PR, so #650 should land with or before this one. _AI-assisted (Claude Code); checked on Windows 11 / RTX 5090._

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!294
No description provided.