NVIDIA D3D12 (70564ae): stride_tests & synthetic_tests fail due to HEAP_VIEWS (2M > 1M NVIDIA limit) and Stride::Structured with rawBufferLoad #1835

Open
opened 2026-11-26 04:46:12 +00:00 by github-bot · 18 comments
Owner

@⁠towiice on GitHub · 2026-11-24 23:10 UTC · original

Running the new victory-shader GPU test suites at main (70564ae) on NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88, Windows 11 26300) passes bvh_tests (14/14), flow_tests (1/1), and memory_tests (2/2), and surfaces three NVIDIA hardware failures in stride_tests and synthetic_tests:


1. emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros — HEAP_VIEWS = 1 << 21 exceeds NVIDIA's 1,000,000 descriptor heap limit

thread 'emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros' panicked at crates\victory-shader\src\emit\stride_tests.rs:343:33:
hardware: dispatch failed: The parameter is incorrect.
  • Root cause: crates/victory-shader/src/emit/shader.rs:25 defines HEAP_VIEWS = 1 << 21 (2,097,152) and NULL_BUFFER_VIEW = HEAP_VIEWS - 2 (2,097,150). In emit/host.rs:1356, Some(View::NullBuffers) requests a shader-visible CBV_SRV_UAV descriptor heap of HEAP_VIEWS (2,097,152) descriptors.
  • On NVIDIA D3D12 drivers (D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = 1,000,000), CreateDescriptorHeap with NumDescriptors > 1,000,000 returns E_INVALIDARG ("The parameter is incorrect.").
  • Additionally, in victory-gpu/src/descriptor/host.rs:145,206, when an NVIDIA host caps the heap at PORTABLE_VIEWS (1,000,000), null < total is false (2,097,150 >= 1,000,000), so the null buffer views are never written and any shader redirecting a non-buffer slot (stride == 0) to NULL_BUFFER_VIEW (2,097,150) indexes past the end of the 1M NVIDIA heap.

2. emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride — Stride::Structured(12) multiplies byte offset by 12 a second time on NVIDIA

thread 'emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride' panicked at crates\victory-shader\src\emit\stride_tests.rs:293:9:
assertion `left == right` failed: hardware
  left: [101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 right: [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231]
  • Root cause: The lowered shader multiplies vindex (lane) by VIEW_STRIDES[1] (12) and adds voffset (4) to produce a byte offset 12 * lane + 4 (4, 16, 28, 40, ...), then issues a raw ByteAddressBuffer rawBufferLoad(h, byte_offset, undef).
  • In production (victory-gpu/src/descriptor/host.rs:418,535), bindless heap buffer SRVs are created with Format = DXGI_FORMAT_R32_TYPELESS, StructureByteStride = 0, Flags = D3D12_BUFFER_SRV_FLAG_RAW.
  • However, the test fixture (stride_tests.rs:245 -> emit/host.rs:1595) creates the SRV with Stride::Structured(12) (Format = DXGI_FORMAT_UNKNOWN, StructureByteStride = 12). On NVIDIA hardware, executing rawBufferLoad(h, index, undef) against a descriptor whose hardware stride is 12 treats index (4, 16, 28, ...) as an element index and multiplies by 12 again (reading bytes 48, 192, 336, ... = dwords 12, 48, 84, ... = [101, 104, 107, ...] until out-of-bounds 0).

3. emit::synthetic_tests::gathers_at_a_level_match_the_hardware — lane 0 (u = NaN)

thread 'emit::synthetic_tests::gathers_at_a_level_match_the_hardware' panicked at crates\victory-shader\src\emit\synthetic_tests.rs:261:13:
assertion `left == right` failed: hardware: lane 0
  left: [0.0, 1.0, 0.0, 0.0]
 right: [0.0, 0.0, 0.0, 0.0]
  • Notice synthetic_tests.rs:208 also binds input with Stride::Structured(16) while the shader (program line 42: buffer_load_dwordx4 v[12:15], v16, s[20:23], 0 offen with idxen = 0, offen = 1) lowers via the index = None raw ByteAddressBuffer path (lower.rs:8704, (11 | u, 0)), so on NVIDIA v16 = lane * 16 is multiplied by StructureByteStride = 16 (lane * 256 bytes).
**@⁠towiice** on GitHub · 2026-11-24 23:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835) Running the new `victory-shader` GPU test suites at `main` (`70564ae`) on **NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver `610.88`, Windows 11 26300)** passes `bvh_tests` (14/14), `flow_tests` (1/1), and `memory_tests` (2/2), and surfaces **three NVIDIA hardware failures** in `stride_tests` and `synthetic_tests`: --- ### 1. `emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` — `HEAP_VIEWS = 1 << 21` exceeds NVIDIA's 1,000,000 descriptor heap limit ```text thread 'emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros' panicked at crates\victory-shader\src\emit\stride_tests.rs:343:33: hardware: dispatch failed: The parameter is incorrect. ``` - **Root cause:** `crates/victory-shader/src/emit/shader.rs:25` defines `HEAP_VIEWS = 1 << 21` (`2,097,152`) and `NULL_BUFFER_VIEW = HEAP_VIEWS - 2` (`2,097,150`). In `emit/host.rs:1356`, `Some(View::NullBuffers)` requests a shader-visible `CBV_SRV_UAV` descriptor heap of `HEAP_VIEWS` (`2,097,152`) descriptors. - On NVIDIA D3D12 drivers (`D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = 1,000,000`), `CreateDescriptorHeap` with `NumDescriptors > 1,000,000` returns `E_INVALIDARG` (`"The parameter is incorrect."`). - Additionally, in `victory-gpu/src/descriptor/host.rs:145,206`, when an NVIDIA host caps the heap at `PORTABLE_VIEWS` (`1,000,000`), `null < total` is false (`2,097,150 >= 1,000,000`), so the null buffer views are never written and any shader redirecting a non-buffer slot (`stride == 0`) to `NULL_BUFFER_VIEW` (`2,097,150`) indexes past the end of the 1M NVIDIA heap. --- ### 2. `emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride` — `Stride::Structured(12)` multiplies byte offset by 12 a second time on NVIDIA ```text thread 'emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride' panicked at crates\victory-shader\src\emit\stride_tests.rs:293:9: assertion `left == right` failed: hardware left: [101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] right: [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231] ``` - **Root cause:** The lowered shader multiplies `vindex` (`lane`) by `VIEW_STRIDES[1]` (`12`) and adds `voffset` (`4`) to produce a **byte offset** `12 * lane + 4` (`4, 16, 28, 40, ...`), then issues a raw `ByteAddressBuffer` `rawBufferLoad(h, byte_offset, undef)`. - In production (`victory-gpu/src/descriptor/host.rs:418,535`), bindless heap buffer SRVs are created with `Format = DXGI_FORMAT_R32_TYPELESS, StructureByteStride = 0, Flags = D3D12_BUFFER_SRV_FLAG_RAW`. - However, the test fixture (`stride_tests.rs:245` -> `emit/host.rs:1595`) creates the SRV with `Stride::Structured(12)` (`Format = DXGI_FORMAT_UNKNOWN, StructureByteStride = 12`). On NVIDIA hardware, executing `rawBufferLoad(h, index, undef)` against a descriptor whose hardware stride is `12` treats `index` (`4, 16, 28, ...`) as an **element index** and multiplies by `12` again (reading bytes `48, 192, 336, ...` = dwords `12, 48, 84, ...` = `[101, 104, 107, ...]` until out-of-bounds `0`). --- ### 3. `emit::synthetic_tests::gathers_at_a_level_match_the_hardware` — lane 0 (`u = NaN`) ```text thread 'emit::synthetic_tests::gathers_at_a_level_match_the_hardware' panicked at crates\victory-shader\src\emit\synthetic_tests.rs:261:13: assertion `left == right` failed: hardware: lane 0 left: [0.0, 1.0, 0.0, 0.0] right: [0.0, 0.0, 0.0, 0.0] ``` - Notice `synthetic_tests.rs:208` also binds `input` with `Stride::Structured(16)` while the shader (`program` line 42: `buffer_load_dwordx4 v[12:15], v16, s[20:23], 0 offen` with `idxen = 0, offen = 1`) lowers via the `index = None` raw `ByteAddressBuffer` path (`lower.rs:8704`, `(11 | u, 0)`), so on NVIDIA `v16 = lane * 16` is multiplied by `StructureByteStride = 16` (`lane * 256` bytes).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:46:12 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 23:10 UTC · original

Hi everyone!

I want to help get community contributions into the project faster, so I've started VIctory V2, an integration fork of this repository:
https://github.com/DesertGamer/VIctory-V2

What it does

  • Merges open community PRs from upstream in batches
  • Screens each PR for suspicious content (binaries, build.rs, git hooks, scripts, new dependencies)
  • Runs tests after every batch
  • Resolves conflicts between PRs and records the reasoning in the commit message

Please note

  • V2 is not an official project and is not endorsed by the original author.
  • Original history and commit authorship are preserved, and V2 is regularly synced with upstream main.
  • Licensed under GPL-3.0-or-later, same as upstream.
  • Current status is the same as upstream: not playable yet. The world loads, but world rendering crashes with a GPU device-removed error (tested on Windows 11 / RX 6700 XT).

If your PR has been sitting unreviewed, feel free to point me to it. Feedback and bug reports are welcome in the V2 repo.

If this post doesn't belong in this section, let me know and I'll remove it.

**@⁠DesertGamer** on GitHub · 2026-11-24 23:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7147106664) Hi everyone! I want to help get community contributions into the project faster, so I've started **VIctory V2**, an integration fork of this repository: https://github.com/DesertGamer/VIctory-V2 **What it does** - Merges open community PRs from upstream in batches - Screens each PR for suspicious content (binaries, `build.rs`, git hooks, scripts, new dependencies) - Runs tests after every batch - Resolves conflicts between PRs and records the reasoning in the commit message **Please note** - V2 is **not** an official project and is not endorsed by the original author. - Original history and commit authorship are preserved, and V2 is regularly synced with upstream `main`. - Licensed under GPL-3.0-or-later, same as upstream. - Current status is the same as upstream: not playable yet. The world loads, but world rendering crashes with a GPU device-removed error (tested on Windows 11 / RX 6700 XT). If your PR has been sitting unreviewed, feel free to point me to it. Feedback and bug reports are welcome in the V2 repo. If this post doesn't belong in this section, let me know and I'll remove it.
Author
Owner

@⁠towiice on GitHub · 2026-11-24 23:21 UTC · original

Prepared and verified a minimal 4-line fix on NVIDIA GeForce GTX 1650 SUPER + WARP:

Fix Summary

  1. crates/victory-shader/src/emit/shader.rs: place NULL_BUFFER_VIEW at 1_000_000 - 2 (999_998, top of PORTABLE_VIEWS = 1_000_000) instead of HEAP_VIEWS - 2 (2_097_150), and size View::NullBuffers in emit/host.rs to (super::NULL_BUFFER_VIEW + 2) as usize (1_000_000). This ensures the null raw SRV/UAV descriptors fit inside NVIDIA's 1,000,000 shader-visible CBV_SRV_UAV heap cap both in victory-gpu's HostHeap::new (null < total) and in victory-shader's test harness.
  2. crates/victory-shader/src/emit/stride_tests.rs & synthetic_tests.rs: use Stride::Raw for the test views read through raw_view (ByteAddressBuffer rawBufferLoad with byte offsets), matching how victory-gpu/src/descriptor/host.rs:418,535 creates bindless heap buffer SRVs (Format = DXGI_FORMAT_R32_TYPELESS, StructureByteStride = 0, Flags = D3D12_BUFFER_SRV_FLAG_RAW).

Verification (NVIDIA GeForce GTX 1650 SUPER + WARP)

  • cargo +stable-x86_64-pc-windows-gnullvm test -p victory-shader --lib stride_tests -- --test-threads=1: 6 passed, 0 failed (3.15 s)
  • cargo +stable-x86_64-pc-windows-gnullvm test -p victory-shader --lib synthetic_tests -- --test-threads=1: 4 passed, 0 failed (1.07 s)
**@⁠towiice** on GitHub · 2026-11-24 23:21 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7147314968) Prepared and verified a minimal 4-line fix on NVIDIA GeForce GTX 1650 SUPER + WARP: - Branch: https://github.com/towiice/VIctory/tree/fix/nvidia-heap-views-and-raw-buffer-srv (commit `fix/nvidia-heap-views-and-raw-buffer-srv`) ### Fix Summary 1. `crates/victory-shader/src/emit/shader.rs`: place `NULL_BUFFER_VIEW` at `1_000_000 - 2` (`999_998`, top of `PORTABLE_VIEWS = 1_000_000`) instead of `HEAP_VIEWS - 2` (`2_097_150`), and size `View::NullBuffers` in `emit/host.rs` to `(super::NULL_BUFFER_VIEW + 2) as usize` (`1_000_000`). This ensures the null raw SRV/UAV descriptors fit inside NVIDIA's `1,000,000` shader-visible `CBV_SRV_UAV` heap cap both in `victory-gpu`'s `HostHeap::new` (`null < total`) and in `victory-shader`'s test harness. 2. `crates/victory-shader/src/emit/stride_tests.rs` & `synthetic_tests.rs`: use `Stride::Raw` for the test views read through `raw_view` (`ByteAddressBuffer` `rawBufferLoad` with byte offsets), matching how `victory-gpu/src/descriptor/host.rs:418,535` creates bindless heap buffer SRVs (`Format = DXGI_FORMAT_R32_TYPELESS, StructureByteStride = 0, Flags = D3D12_BUFFER_SRV_FLAG_RAW`). ### Verification (NVIDIA GeForce GTX 1650 SUPER + WARP) - `cargo +stable-x86_64-pc-windows-gnullvm test -p victory-shader --lib stride_tests -- --test-threads=1`: **6 passed, 0 failed** (3.15 s) - `cargo +stable-x86_64-pc-windows-gnullvm test -p victory-shader --lib synthetic_tests -- --test-threads=1`: **4 passed, 0 failed** (1.07 s)
Author
Owner

@⁠wildheathen on GitHub · 2026-11-24 23:22 UTC · original

Confirming #2 and #3 on an RTX 5080 (Blackwell, driver 32.0.16.2124, Windows 11), at 70564ae. I reached the same cause independently before seeing this issue.

  • With Stride::Structured(_) in emit/host.rs creating a raw view (R32_TYPELESS, NumElements in dwords, D3D12_BUFFER_SRV_FLAG_RAW, stride 0), the full cargo test -p victory-shader goes from 207 passed / 4 failed to 209 / 2. a_heap_buffer_read_by_element_takes_the_views_stride and gathers_at_a_level_match_the_hardware now pass on the 5080, as on WARP.
  • A diagnostic that reads texels with image_load_mip, so with no sampler involved, showed it plainly: before the change every per-lane coordinate read from the structured input came out wrong on the 5080 (lanes 0–7 read 0, the rest read texel (0,0)), while WARP read them all correctly.
  • I didn't rerun #1 (a_heap_buffer_read_where_no_buffer_view_is_reads_zeros).
  • With the same change, the implicit-LOD compute test in my comment on #1237 passes on the 5080 for both #1065 and #1237.

AI-assisted (Claude Code).

**@⁠wildheathen** on GitHub · 2026-11-24 23:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7147324818) Confirming #2 and #3 on an **RTX 5080** (Blackwell, driver 32.0.16.2124, Windows 11), at `70564ae`. I reached the same cause independently before seeing this issue. - With `Stride::Structured(_)` in `emit/host.rs` creating a raw view (`R32_TYPELESS`, `NumElements` in dwords, `D3D12_BUFFER_SRV_FLAG_RAW`, stride 0), the full `cargo test -p victory-shader` goes from **207 passed / 4 failed to 209 / 2**. `a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware` now pass on the 5080, as on WARP. - A diagnostic that reads texels with `image_load_mip`, so with no sampler involved, showed it plainly: before the change every per-lane coordinate read from the structured input came out wrong on the 5080 (lanes 0–7 read 0, the rest read texel (0,0)), while WARP read them all correctly. - I didn't rerun #1 (`a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`). - With the same change, the implicit-LOD compute test in my comment on #1237 passes on the 5080 for both #1065 and #1237. AI-assisted (Claude Code).
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 23:25 UTC · original

Independently hit the same HEAP_VIEWS wall, and there is a second half to it that the 4-line fix leaves out

I reached cause #1 from the other end — a reproducing run rather than the test suites — and opened #1848 before seeing this issue. Same diagnosis as yours: HEAP_VIEWS = 1 << 21 at emit/shader.rs:25 is larger than the 1,000,000 descriptors a shader-visible heap may have on NVIDIA, and emit/host.rs asks for HEAP_VIEWS slots when it wants the null buffers' views.

Measured on this machine (integrated AMD Radeon(TM) Graphics, driver 32.0.21045.29003, session 1, real window, empty cache, main at 70564ae) — the title's own 1,245,184-slot heap gets capped to 1,000,000, and then:

WARN victory_gpu::descriptor::host: no room for the null buffer views: computed indices of slots
     without a buffer view read what is there

The second half, which I think the 4-line fix does not cover: lowering HEAP_VIEWS to 1,000,000 makes the clamp and the null indices small enough, but the capped heap is created with its dynamic slots filling it to the last descriptor — title slots 934,464 plus 65,536 dynamic = exactly 1,000,000 — so NULL_BUFFER_VIEW = 999,998 is still not past the used slots and the same warning stays. I measured that too:

change no room for the null buffer views
main 1
HEAP_VIEWS = 1_000_000 alone 1 (still)
+ the capped heap reserving two slots, placement checking >= instead of > 0

so the null views only exist if the capped creation leaves room for them. That is the part of #1848 that is not in the minimal fix, and it is what makes the shader's fallback read have somewhere to land.

Your causes #2 and #3 (Stride::Structured with a raw buffer SRV) are not touched by my change at all, and they are the ones I have not looked at.

What I would rather not do is leave two conflicting pull requests open for the same constant. Options, your call as the one with the failing hardware:

  1. take #1848 as it stands for cause #1 (it is rebased on 70564ae, MERGEABLE, with the measurements above), and add #2/#3 separately;
  2. or keep your minimal fix and I withdraw #1848, but then please include the two-slot reservation, or the null-view warning and the out-of-heap fallback stay broken on a capped heap;
  3. or fold both into one, which is probably cleanest for a reviewer.

I am not precious about which; what I did not want was for the constant to be changed twice in two branches.

No game data is involved: counts, constants and warnings only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 23:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7147382562) **Independently hit the same `HEAP_VIEWS` wall, and there is a second half to it that the 4-line fix leaves out** I reached cause #1 from the other end — a reproducing run rather than the test suites — and opened https://git.gtahub.st/github/Marvisak--VIctory/pulls/1848 before seeing this issue. Same diagnosis as yours: `HEAP_VIEWS = 1 << 21` at `emit/shader.rs:25` is larger than the 1,000,000 descriptors a shader-visible heap may have on NVIDIA, and `emit/host.rs` asks for `HEAP_VIEWS` slots when it wants the null buffers' views. Measured on this machine (integrated `AMD Radeon(TM) Graphics`, driver `32.0.21045.29003`, session 1, real window, empty cache, `main` at `70564ae`) — the title's own 1,245,184-slot heap gets capped to 1,000,000, and then: ``` WARN victory_gpu::descriptor::host: no room for the null buffer views: computed indices of slots without a buffer view read what is there ``` **The second half, which I think the 4-line fix does not cover**: lowering `HEAP_VIEWS` to 1,000,000 makes the clamp and the null indices small enough, but the *capped* heap is created with its dynamic slots filling it to the last descriptor — title slots `934,464` plus `65,536` dynamic = exactly `1,000,000` — so `NULL_BUFFER_VIEW = 999,998` is still not *past* the used slots and the same warning stays. I measured that too: | change | `no room for the null buffer views` | |---|---| | `main` | 1 | | `HEAP_VIEWS = 1_000_000` alone | **1** (still) | | + the capped heap reserving two slots, placement checking `>=` instead of `>` | **0** | so the null views only exist if the capped creation leaves room for them. That is the part of #1848 that is not in the minimal fix, and it is what makes the shader's fallback read have somewhere to land. Your causes #2 and #3 (`Stride::Structured` with a raw buffer SRV) are not touched by my change at all, and they are the ones I have not looked at. **What I would rather not do is leave two conflicting pull requests open for the same constant.** Options, your call as the one with the failing hardware: 1. take #1848 as it stands for cause #1 (it is rebased on `70564ae`, `MERGEABLE`, with the measurements above), and add #2/#3 separately; 2. or keep your minimal fix and I withdraw #1848, but then please include the two-slot reservation, or the null-view warning and the out-of-heap fallback stay broken on a capped heap; 3. or fold both into one, which is probably cleanest for a reviewer. I am not precious about which; what I did not want was for the constant to be changed twice in two branches. No game data is involved: counts, constants and warnings only. Written with an AI assistant.
Author
Owner

@⁠towiice on GitHub · 2026-11-24 23:44 UTC · original

Thanks @⁠wildheathen and @⁠fiestorra!

@⁠fiestorra: Since non-collaborators cannot open PRs directly on \Marvisak/VIctory\ right now, please keep #1848 open for cause #1! Note one small detail we noticed while checking the capped heap indices:

  • Because \NULL_BUFFER_VIEW = HEAP_VIEWS - 2 = 999_998, reserving two slots with \count = PORTABLE_VIEWS - MIN_DYNAMIC - 2\ gives \count + extra = 999_998, so
    ull - 1\ (\999_997, the null UAV written by \h.raw_view_at(null - 1, ...)) would still overlap the last dynamic slot (\999_997) unless \NULL_BUFFER_VIEW\ sits at \HEAP_VIEWS - 1\ or 3 slots are reserved (or
    ull > count + extra, i.e.
    ull - 1 >= count + extra).

I folded both fixes (the 1M \HEAP_VIEWS\ + capped-heap null-slot reservation and creating \uffer_srv\ / \Stride::Structured\ host descriptors as raw \R32_TYPELESS\ SRVs for
awBufferLoad, leaving \ iew_stride\ in \VIEW_STRIDES\ intact) into branch https://github.com/towiice/VIctory/tree/fix/nvidia-heap-views-and-raw-buffer-srv (\3142eb2) and verified on NVIDIA GeForce GTX 1650 SUPER + WARP:

  • \cargo test -p victory-shader --lib -- stride_tests synthetic_tests waterfall_tests --test-threads=1: 15 passed, 0 failed
  • \cargo test -p victory-gpu --lib descriptor::host::tests -- --test-threads=1: 4 passed, 0 failed (including \dynamic_slots_are_held_until_released)
**@⁠towiice** on GitHub · 2026-11-24 23:44 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7147738982) Thanks @⁠wildheathen and @⁠fiestorra! @⁠fiestorra: Since non-collaborators cannot open PRs directly on \Marvisak/VIctory\ right now, please keep **#1848** open for cause #1! Note one small detail we noticed while checking the capped heap indices: - Because \NULL_BUFFER_VIEW = HEAP_VIEWS - 2 = 999_998\, reserving two slots with \count = PORTABLE_VIEWS - MIN_DYNAMIC - 2\ gives \count + extra = 999_998\, so \ ull - 1\ (\999_997\, the null UAV written by \h.raw_view_at(null - 1, ...)\) would still overlap the last dynamic slot (\999_997\) unless \NULL_BUFFER_VIEW\ sits at \HEAP_VIEWS - 1\ or 3 slots are reserved (or \ ull > count + extra\, i.e. \ ull - 1 >= count + extra\). I folded both fixes (the 1M \HEAP_VIEWS\ + capped-heap null-slot reservation and creating \uffer_srv\ / \Stride::Structured\ host descriptors as raw \R32_TYPELESS\ SRVs for \ awBufferLoad\, leaving \ iew_stride\ in \VIEW_STRIDES\ intact) into branch https://github.com/towiice/VIctory/tree/fix/nvidia-heap-views-and-raw-buffer-srv (\3142eb2\) and verified on **NVIDIA GeForce GTX 1650 SUPER + WARP**: - \cargo test -p victory-shader --lib -- stride_tests synthetic_tests waterfall_tests --test-threads=1\: **15 passed, 0 failed** - \cargo test -p victory-gpu --lib descriptor::host::tests -- --test-threads=1\: **4 passed, 0 failed** (including \dynamic_slots_are_held_until_released\)
Author
Owner

@⁠carlos-seiffert on GitHub · 2026-11-25 00:04 UTC · original

Measured on an RTX 2060 6 GB (Turing), driver 621.40, Windows 11, all on 70564ae, cargo test -p victory-shader -- --test-threads=1 (hardware and WARP) and cargo test -p victory-gpu:

build victory-shader victory-gpu
main 206 / 3 failed (all three in this issue) 76 / 2 failed
#1848 (closed) 207 / 2 (causes 2 and 3 left) 78 / 0
#1777 207 / 2 (causes 2 and 3 left) 79 / 0
#1779 207 / 2 (causes 2 and 3 left) 80 / 0
#1762 206 / 3 (it changes production views, not the test host) 77 / 2
#1887 208 / 1 (cause 1 left) 76 / 2
#1779 + #1887 209 / 0 80 / 0

Causes 2 and 3 are in the test host only: its Stride::Structured made a structured SRV, while the GPU host makes raw views; NVIDIA applies the stride a second time on the raw load. #1887 makes the test host's view raw, as @⁠wildheathen found above.

🤖 Generated with Claude Code

**@⁠carlos-seiffert** on GitHub · 2026-11-25 00:04 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7148113483) Measured on an **RTX 2060 6 GB (Turing), driver 621.40**, Windows 11, all on `70564ae`, `cargo test -p victory-shader -- --test-threads=1` (hardware and WARP) and `cargo test -p victory-gpu`: | build | victory-shader | victory-gpu | |---|---|---| | `main` | 206 / 3 failed (all three in this issue) | 76 / 2 failed | | #1848 (closed) | 207 / 2 (causes 2 and 3 left) | 78 / 0 | | #1777 | 207 / 2 (causes 2 and 3 left) | 79 / 0 | | #1779 | 207 / 2 (causes 2 and 3 left) | 80 / 0 | | #1762 | 206 / 3 (it changes production views, not the test host) | 77 / 2 | | #1887 | 208 / 1 (cause 1 left) | 76 / 2 | | **#1779 + #1887** | **209 / 0** | **80 / 0** | Causes 2 and 3 are in the test host only: its `Stride::Structured` made a structured SRV, while the GPU host makes raw views; NVIDIA applies the stride a second time on the raw load. #1887 makes the test host's view raw, as @⁠wildheathen found above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-25 01:18 UTC · original

Same three failures on current main (42363ab), and they also fail on WARP with identical output, so they are not NVIDIA-specific.

Adapter Result (cargo test -p victory-shader --lib -- --test-threads=1)
NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1742, Windows 11 26300 243 passed, 3 failed
WARP (VICTORY_D3D12_WARP=1), same machine 243 passed, 3 failed

The failing tests and their output are the same on both adapters, and match the report above:

  • emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride: left: [101, 104, 107, …, 131, 0, …], right: [200, 201, …, 231] (stride_tests.rs:293)
  • emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros: dispatch failed: The parameter is incorrect. (stride_tests.rs:343)
  • emit::synthetic_tests::gathers_at_a_level_match_the_hardware: lane 0, left: [0.0, 1.0, 0.0, 0.0], right: [0.0, 0.0, 0.0, 0.0] (synthetic_tests.rs:261)

This fits the analysis above: a 2^21-view heap is over the 1,000,000 shader-visible limit on WARP as well, and a raw load through a view created with Stride::Structured is indexed by the view's stride on any D3D12 device. So the fix in the previous comment is needed on every adapter, not only on NVIDIA; the "NVIDIA" in the title may be worth dropping.

Not tested: the fix branch itself on this machine.

AI-assisted write-up, checked against the test logs.

**@⁠MoonYueya** on GitHub · 2026-11-25 01:18 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7149421945) Same three failures on current `main` (`42363ab`), and they also fail on **WARP** with identical output, so they are not NVIDIA-specific. | Adapter | Result (`cargo test -p victory-shader --lib -- --test-threads=1`) | |---|---| | NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1742, Windows 11 26300 | 243 passed, 3 failed | | WARP (`VICTORY_D3D12_WARP=1`), same machine | 243 passed, 3 failed | The failing tests and their output are the same on both adapters, and match the report above: - `emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`: `left: [101, 104, 107, …, 131, 0, …]`, `right: [200, 201, …, 231]` (`stride_tests.rs:293`) - `emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`: `dispatch failed: The parameter is incorrect.` (`stride_tests.rs:343`) - `emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: lane 0, `left: [0.0, 1.0, 0.0, 0.0]`, `right: [0.0, 0.0, 0.0, 0.0]` (`synthetic_tests.rs:261`) This fits the analysis above: a 2^21-view heap is over the 1,000,000 shader-visible limit on WARP as well, and a raw load through a view created with `Stride::Structured` is indexed by the view's stride on any D3D12 device. So the fix in the previous comment is needed on every adapter, not only on NVIDIA; the "NVIDIA" in the title may be worth dropping. Not tested: the fix branch itself on this machine. *AI-assisted write-up, checked against the test logs.*
Author
Owner

@⁠Felix2180 on GitHub · 2026-11-25 01:58 UTC · original

RTX 5070 (Blackwell, desktop, driver 32.0.16.1088), i7-14700KF, Windows 11 Pro 26200, main at 940d32f.

cargo test --workspace --locked on main: the same 3 victory-shader failures as reported here, plus the 2 victory-gpu ones from the capped view heap (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views).

Since CI has no GPU, here are the open heap-cap PRs checked on this NVIDIA host, each merged alone onto main:

PR victory-gpu (2 failing) victory-shader (3 failing)
#1548 still 2 failing still 3 failing
#1751 both pass still 3 failing
#1770 both pass (test-only: relaxes the assertions) still 3 failing
#1943 still 2 failing ..._no_buffer_view_is_reads_zeros passes, 2 failing

#1751 + #1943 together: the whole workspace passes except
a_heap_buffer_read_by_element_takes_the_views_stride and gathers_at_a_level_match_the_hardware.

These two are not just fixture bugs, as far as I can tell. Both bind a structured SRV (Stride::Structured(12) / (16)) and read it through a heap handle declared raw (rawBufferLoad at byte address element × VIEW_STRIDES[i] + offset). On NVIDIA the descriptor's StructureByteStride is applied again, which gives the observed [101, 104, 107, ...] (byte offset × 12). In the game path, descriptor/host.rs::buffer_srv/buffer_uav keep the title's view description, so a title structured view read "by element" from the heap would hit the same mismatch on NVIDIA. The obvious fix (making those slots raw) conflicts with shaders that read the same slot structured through a used-resource entry (emit/mod.rs, "Buffer views in the heap"). So this looks like a design decision, for example a raw twin of each structured buffer view that the by-element path indexes.

Happy to rerun candidate fixes on this card.

**@⁠Felix2180** on GitHub · 2026-11-25 01:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7150175473) RTX 5070 (Blackwell, desktop, driver 32.0.16.1088), i7-14700KF, Windows 11 Pro 26200, `main` at 940d32f. `cargo test --workspace --locked` on `main`: the same 3 `victory-shader` failures as reported here, plus the 2 `victory-gpu` ones from the capped view heap (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). Since CI has no GPU, here are the open heap-cap PRs checked on this NVIDIA host, each merged alone onto `main`: | PR | `victory-gpu` (2 failing) | `victory-shader` (3 failing) | |----|---------------------------|------------------------------| | #1548 | still 2 failing | still 3 failing | | #1751 | **both pass** | still 3 failing | | #1770 | both pass (test-only: relaxes the assertions) | still 3 failing | | #1943 | still 2 failing | **`..._no_buffer_view_is_reads_zeros` passes**, 2 failing | #1751 + #1943 together: the whole workspace passes except `a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware`. These two are not just fixture bugs, as far as I can tell. Both bind a *structured* SRV (`Stride::Structured(12)` / `(16)`) and read it through a heap handle declared raw (`rawBufferLoad` at byte address element × `VIEW_STRIDES[i]` + offset). On NVIDIA the descriptor's `StructureByteStride` is applied again, which gives the observed `[101, 104, 107, ...]` (byte offset × 12). In the game path, `descriptor/host.rs::buffer_srv`/`buffer_uav` keep the title's view description, so a title structured view read "by element" from the heap would hit the same mismatch on NVIDIA. The obvious fix (making those slots raw) conflicts with shaders that read the same slot structured through a used-resource entry (`emit/mod.rs`, "Buffer views in the heap"). So this looks like a design decision, for example a raw twin of each structured buffer view that the by-element path indexes. Happy to rerun candidate fixes on this card.
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 05:44 UTC · original

Checked #2121 (4426324) together with #1887 (62bd980) on Windows D3D12, RTX 3050 Laptop, driver 32.0.16.1062. On #2121 alone, the missing-view zero-read test passed. The by-element stride test still returned [101, 104, 107, ...] instead of [200, 201, 202, ...], and gather still disagreed at lane 0.

After merging #1887 into that same checkout (tree 06756d0e), all three tests passed. Repro: cargo test --frozen -p victory-shader --lib -- --nocapture --test-threads=1. Harness total: 248 passed, 0 failed, 3 ignored. Some other tests counted as passed explicitly skipped compiler-dependent checks, including translated_compute_matches_pc.

This covers the three synthetic shader cases in this issue on this setup. The production descriptor path and game runtime were outside the run. AI-assisted; verified against local logs.

**@⁠Dathinel** on GitHub · 2026-11-25 05:44 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7154091204) Checked #2121 (`4426324`) together with #1887 (`62bd980`) on Windows D3D12, RTX 3050 Laptop, driver 32.0.16.1062. On #2121 alone, the missing-view zero-read test passed. The by-element stride test still returned `[101, 104, 107, ...]` instead of `[200, 201, 202, ...]`, and gather still disagreed at lane 0. After merging #1887 into that same checkout (tree `06756d0e`), all three tests passed. Repro: `cargo test --frozen -p victory-shader --lib -- --nocapture --test-threads=1`. Harness total: 248 passed, 0 failed, 3 ignored. Some other tests counted as passed explicitly skipped compiler-dependent checks, including `translated_compute_matches_pc`. This covers the three synthetic shader cases in this issue on this setup. The production descriptor path and game runtime were outside the run. AI-assisted; verified against local logs.
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 08:05 UTC · original

Status on NVIDIA Ada at main 940d32f

cargo test --locked -p victory-shader --lib on an RTX 4070 SUPER (Ada, 32-lane waves, driver 32.0.16.1088), the default adapter, VICTORY_WARP unset: 244 passed, 3 failed. The three are the ones this issue tracks: stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros and synthetic_tests::gathers_at_a_level_match_the_hardware.

Each open PR, merged alone onto 940d32f:

PR Fixes on Ada Still failing
#2178 stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware
#2177 stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, synthetic_tests::gathers_at_a_level_match_the_hardware
#2185 none all three

#2177 and #2178 conflict with each other (shader_cache.rs and emit/mod.rs), so I could not test them together. None of the three PRs fixes synthetic_tests::gathers_at_a_level_match_the_hardware. Comments on #1887 report that the gather test passes with it on an RTX 4070 and an RTX 5080. I did not run #1887 again.

AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 08:05 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7156597865) ### Status on NVIDIA Ada at `main` 940d32f `cargo test --locked -p victory-shader --lib` on an RTX 4070 SUPER (Ada, 32-lane waves, driver 32.0.16.1088), the default adapter, `VICTORY_WARP` unset: 244 passed, 3 failed. The three are the ones this issue tracks: `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` and `synthetic_tests::gathers_at_a_level_match_the_hardware`. Each open PR, merged alone onto 940d32f: | PR | Fixes on Ada | Still failing | |---|---|---| | #2178 | `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride` | `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware` | | #2177 | `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` | `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `synthetic_tests::gathers_at_a_level_match_the_hardware` | | #2185 | none | all three | #2177 and #2178 conflict with each other (`shader_cache.rs` and `emit/mod.rs`), so I could not test them together. None of the three PRs fixes `synthetic_tests::gathers_at_a_level_match_the_hardware`. Comments on #1887 report that the gather test passes with it on an RTX 4070 and an RTX 5080. I did not run #1887 again. AI-assisted (Claude Code).
Author
Owner

@⁠latentdev on GitHub · 2026-11-25 10:03 UTC · original

A test of the runtime's structured views, and which PRs fix them

RTX 4090 (Ada), driver 621.24, Windows 11, main at 940d32f. Each build is its own worktree and target directory.

The triage on #1887 points out that buffer_srv keeps a title's structured descriptor. #1887's new a_heap_buffer_read_by_element_through_the_runtimes_structured_view (5f3cb18) covers that from the shader side: the test host makes a structured view, as the runtime does today. It never runs the runtime's code, though, so it can't show when the runtime is fixed. With #2178 merged it still fails here ([101, 104, 107, …]), as it would on any NVIDIA card. Since victory-shader cannot reach victory-gpu (the dependency runs the other way), a check of the runtime's views has to live in victory-gpu; the shader-side test could become a doc note pointing there rather than a test that stays red on NVIDIA.

This test goes through the runtime itself: bindless::tests::a_structured_heap_view_reads_by_element_through_its_host_slot (victory-gpu, test only). It makes a structured SRV (32 × 12 bytes) with create_srv into a title heap, so make → buffer_srv builds the host slot and HostHeap fills the view-stride table. Then it reads each element raw at that stride, as translated shaders do.

Build New test victory-gpu victory-shader
main fails: [200 … 210, 0, 0, …] 141 / 2 failed + new 244 / 3 failed
#2177 fails new test only 2 failed (by element, gather)
#1779 + #1887 (62bd980) fails new test only 248 / 0
#2121 + #1887 (62bd980) fails new test only 248 / 0
#2178 passes 2 failed (heap cap) 2 failed (null view, gather)
#2178 + #1779 + #1887 (62bd980) passes 147 / 0 248 / 0
#2178 + #1779 + #1887 (5f3cb18) passes 147 / 0 248 / 1: …through_the_runtimes_structured_view

cargo test --workspace on the 62bd980 combination: 706 passed, 0 failed. Clippy with -D warnings is clean.

  • With the runtime's view kept structured, the symptom on the 4090 here is bounding: the FXC-compiled raw load is limited to the view's 32 elements read as dwords (128 bytes). The translator's DXIL load in the shader tests shows the stride applied instead.
  • The new test passes on WARP (--features diagnostics, VICTORY_D3D12_WARP=1): WARP reads this raw load through a structured view correctly. It catches the bug on NVIDIA, not in CI.
  • Merge conflicts: #2178 conflicts with #1779 and with #2121 in shader_cache.rs, because both change the cache key. Keeping both resolves it: host_build(build, views, blocks) with #2178's 4-argument key, and both sets of key assertions. With 5f3cb18, #1887 also conflicts with #2178 in stride_tests.rs (Stride::Raw against the new stride parameter). #1887's stride keeps both.
  • For anyone checking WARP on victory-gpu: VICTORY_D3D12_WARP=1 only applies with --features diagnostics (host.rs:184). Without the feature, those tests run on the default adapter.

Happy to rerun candidates on this card.

**@⁠latentdev** on GitHub · 2026-11-25 10:03 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7159156655) ### A test of the runtime's structured views, and which PRs fix them RTX 4090 (Ada), driver 621.24, Windows 11, `main` at 940d32f. Each build is its own worktree and target directory. The triage on #1887 points out that `buffer_srv` keeps a title's structured descriptor. #1887's new `a_heap_buffer_read_by_element_through_the_runtimes_structured_view` (5f3cb18) covers that from the shader side: the test host *makes* a structured view, as the runtime does today. It never runs the runtime's code, though, so it can't show when the runtime is fixed. With #2178 merged it still fails here (`[101, 104, 107, …]`), as it would on any NVIDIA card. Since `victory-shader` cannot reach `victory-gpu` (the dependency runs the other way), a check of the runtime's views has to live in `victory-gpu`; the shader-side test could become a doc note pointing there rather than a test that stays red on NVIDIA. This test goes through the runtime itself: [`bindless::tests::a_structured_heap_view_reads_by_element_through_its_host_slot`](https://github.com/latentdev/VIctory/commit/39f46b5) (`victory-gpu`, test only). It makes a structured SRV (32 × 12 bytes) with `create_srv` into a title heap, so `make` → `buffer_srv` builds the host slot and `HostHeap` fills the view-stride table. Then it reads each element raw at that stride, as translated shaders do. | Build | New test | `victory-gpu` | `victory-shader` | |---|---|---|---| | `main` | fails: `[200 … 210, 0, 0, …]` | 141 / 2 failed + new | 244 / 3 failed | | #2177 | fails | new test only | 2 failed (by element, gather) | | #1779 + #1887 (62bd980) | fails | new test only | 248 / 0 | | #2121 + #1887 (62bd980) | fails | new test only | 248 / 0 | | #2178 | **passes** | 2 failed (heap cap) | 2 failed (null view, gather) | | #2178 + #1779 + #1887 (62bd980) | **passes** | 147 / 0 | 248 / 0 | | #2178 + #1779 + #1887 (5f3cb18) | **passes** | 147 / 0 | 248 / 1: `…through_the_runtimes_structured_view` | `cargo test --workspace` on the 62bd980 combination: 706 passed, 0 failed. Clippy with `-D warnings` is clean. - With the runtime's view kept structured, the symptom on the 4090 here is bounding: the FXC-compiled raw load is limited to the view's 32 elements read as dwords (128 bytes). The translator's DXIL load in the shader tests shows the stride applied instead. - The new test passes on WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`): WARP reads this raw load through a structured view correctly. It catches the bug on NVIDIA, not in CI. - Merge conflicts: #2178 conflicts with #1779 and with #2121 in `shader_cache.rs`, because both change the cache key. Keeping both resolves it: `host_build(build, views, blocks)` with #2178's 4-argument `key`, and both sets of key assertions. With 5f3cb18, #1887 also conflicts with #2178 in `stride_tests.rs` (`Stride::Raw` against the new `stride` parameter). #1887's `stride` keeps both. - For anyone checking WARP on `victory-gpu`: `VICTORY_D3D12_WARP=1` only applies with `--features diagnostics` (`host.rs:184`). Without the feature, those tests run on the default adapter. Happy to rerun candidates on this card.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-25 10:55 UTC · original

I ran the three original tests in this issue together on an RTX 5080 (621.40) and built-in WARP (10.0.26100.10068), Windows 11 build 26300.10075. The tests cover the missing heap slot, reading a structured view by element, and the level-zero gather. Each passing test completed a device readback in the isolated adapter run.

Same build for all three tests RTX 5080 WARP
Pristine main at 940d32f 0/3 passed 3/3 passed
#2177 with Venom2054’s heap correction, #2178, and #2323 3/3 passed 3/3 passed
Same combination with the structured-subview SRV correction 3/3 passed 3/3 passed

On pristine main the RTX missing-slot case stopped before readback. The other two returned data and failed their value assertions. On the combined build all three completed their assertions on both devices. The #2323 change is one test-host input-view change. On the RTX it restored all 32 input records and all 64 gather comparisons while the generated gather shader stayed byte-identical. Gather input/output comparison · Heap allocation A/B

There is a separate subview case worth keeping for release testing alongside the original three. Following the runtime coverage discussed above, I tested 32-record views starting at bytes 12, 24 and 36 through victory-gpu. The RTX reported 10 records and read incorrect data through those views. The SRV correction restored all 32 records and preserved writes through overlapping views. The four opt-in runtime tests checked 3,424 values per adapter. Runtime results and reproducer

For the middle row I used the exact #2177/#2178 integration plus #2323 at 9c6e094. The last row adds the SRV read fix. These runs used synthetic inputs.

**@⁠steven-seagull27** on GitHub · 2026-11-25 10:55 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7160345982) I ran the three original tests in this issue together on an RTX 5080 (621.40) and built-in WARP (10.0.26100.10068), Windows 11 build 26300.10075. The tests cover the missing heap slot, reading a structured view by element, and the level-zero gather. Each passing test completed a device readback in the isolated adapter run. | Same build for all three tests | RTX 5080 | WARP | |---|---:|---:| | Pristine `main` at `940d32f` | 0/3 passed | 3/3 passed | | #2177 with Venom2054’s heap correction, #2178, and #2323 | 3/3 passed | 3/3 passed | | Same combination with the structured-subview SRV correction | 3/3 passed | 3/3 passed | On pristine main the RTX missing-slot case stopped before readback. The other two returned data and failed their value assertions. On the combined build all three completed their assertions on both devices. The #2323 change is one test-host input-view change. On the RTX it restored all 32 input records and all 64 gather comparisons while the generated gather shader stayed byte-identical. [Gather input/output comparison](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2323) · [Heap allocation A/B](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2177) There is a separate subview case worth keeping for release testing alongside the original three. Following the runtime coverage discussed above, I tested 32-record views starting at bytes 12, 24 and 36 through `victory-gpu`. The RTX reported 10 records and read incorrect data through those views. The SRV correction restored all 32 records and preserved writes through overlapping views. The four opt-in runtime tests checked 3,424 values per adapter. [Runtime results and reproducer](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2178) For the middle row I used [the exact #2177/#2178 integration](https://github.com/steven-seagull27/VIctory/commit/7c2e21c26f1a74d0191a094fd975f6dd65152e27) plus [#2323 at 9c6e094](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2323/commits/9c6e094241315666e1e11cb3c6ece627f649f8cd). The last row adds [the SRV read fix](https://github.com/steven-seagull27/VIctory/commit/bb066b8a0a2e753efb172a0233dad18a90f2dd73). These runs used synthetic inputs.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:48 UTC · original · edited 2026-11-26 03:45 UTC

Automated triage for the maintainers.

Confirmed on main (63bcca4). Comments show it fails on WARP and other NVIDIA cards too:

  • Cause 1: HEAP_VIEWS is 1 << 21 in crates/victory-shader/src/emit/shader.rs, and NULL_BUFFER_VIEW is HEAP_VIEWS - 2. Both are above the 1,000,000 shader-visible heap limit. The runtime side (no room for the null buffer views on a capped heap, HostHeap::new in crates/victory-gpu/src/descriptor/host.rs) is the capped-heap problem tracked in #747 and #1760.
  • Causes 2 and 3: the tests bind Stride::Structured(12) / (16) views, and the test host in crates/victory-shader/src/emit/host.rs still creates them as structured SRVs while the shader reads them raw. The runtime's buffer_srv can keep a title's structured view the same way, so the by-element read may also be wrong in the runtime on NVIDIA, not only in the test.

Open pull requests:

Measurements so far:

  • RTX 4060, main f3578e3: #2357 together with #1943 or #2177 clears all five NVIDIA failures (with the #2571 crash test skipped). Since #2357 is closed, the open equivalent for the stride part is #2178 or #2885. #1887, #2461, #1779 and #1777 conflict with current main, and #2121 no longer builds there.
  • Windows 10 22H2, RTX 3080: these tests first need the Agility runtime for the test binaries (#486, open). draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view fails there because there is no ID3D12Device10. #1765 or #2251 fixes it, as in #1999.
  • The victory-shader test target now aborts at heap_direct_texture_reads_mark_their_heap_index on NVIDIA before it reaches these tests. That crash is #2571, so lower failure counts on 13f91ca and later are tests that never ran, not fixes.

The latest comment (zero lighting on an RTX 4090 because compute bad01f53f53248e5 needs 64-lane waves) is a separate problem from these tests. On main a console wave64 compute program is emitted with WaveSize(64) (crates/victory-shader/src/emit/mod.rs), which NVIDIA's 32-lane hosts refuse. That is the wave64 work tracked with #264 and the open PRs #233, #2633 and #2176.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7162885126) · edited 2026-11-26 03:45 UTC <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-26T03:35:10Z at=2026-11-26T03:51:00Z --> Automated triage for the maintainers. Confirmed on main (`63bcca4`). Comments show it fails on WARP and other NVIDIA cards too: - **Cause 1:** `HEAP_VIEWS` is `1 << 21` in `crates/victory-shader/src/emit/shader.rs`, and `NULL_BUFFER_VIEW` is `HEAP_VIEWS - 2`. Both are above the 1,000,000 shader-visible heap limit. The runtime side (no room for the null buffer views on a capped heap, `HostHeap::new` in `crates/victory-gpu/src/descriptor/host.rs`) is the capped-heap problem tracked in #747 and #1760. - **Causes 2 and 3:** the tests bind `Stride::Structured(12)` / `(16)` views, and the test host in `crates/victory-shader/src/emit/host.rs` still creates them as structured SRVs while the shader reads them raw. The runtime's `buffer_srv` can keep a title's structured view the same way, so the by-element read may also be wrong in the runtime on NVIDIA, not only in the test. Open pull requests: - **Test host views made raw:** #1887, #2357 and #2322 were all closed without merging. None of them is in `main`. - **Runtime structured views made raw:** #2178, #2885 and #2464. On an RTX 4070, #2178 and #2885 pass the by-element stride test. #2323 fixes the gather test's input view. - **Capped heap / null views:** #2461, #1779, #2121, #2177, #1943, #1751 and #1777. Measurements so far: - **RTX 4060, main `f3578e3`:** #2357 together with #1943 or #2177 clears all five NVIDIA failures (with the #2571 crash test skipped). Since #2357 is closed, the open equivalent for the stride part is #2178 or #2885. #1887, #2461, #1779 and #1777 conflict with current main, and #2121 no longer builds there. - **Windows 10 22H2, RTX 3080:** these tests first need the Agility runtime for the test binaries (#486, open). `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view` fails there because there is no `ID3D12Device10`. #1765 or #2251 fixes it, as in #1999. - The `victory-shader` test target now aborts at `heap_direct_texture_reads_mark_their_heap_index` on NVIDIA before it reaches these tests. That crash is #2571, so lower failure counts on `13f91ca` and later are tests that never ran, not fixes. The latest comment (zero lighting on an RTX 4090 because compute `bad01f53f53248e5` needs 64-lane waves) is a separate problem from these tests. On main a console wave64 compute program is emitted with `WaveSize(64)` (`crates/victory-shader/src/emit/mod.rs`), which NVIDIA's 32-lane hosts refuse. That is the wave64 work tracked with #264 and the open PRs #233, #2633 and #2176. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fyernald on GitHub · 2026-11-25 15:57 UTC · original

Windows 10: the open fixes on an RTX 3080

RTX 3080 10 GB, driver 617.42, Windows 10 Pro 22H2 (19045), Rust 1.98.1 MSVC, main at 940d32f. I haven't seen a Windows 10 run in this thread yet, so here's that picture. Command: cargo test -p <crate> --lib --locked -- --test-threads=1. Each PR is merged alone onto the base unless the table says otherwise.

On Windows 10 these tests need #486 first. The in-box D3D12 runtime has no SM 6.6, so on plain main, victory-shader gives 172 passed, 75 failed. The hardware tests panic with "neither hardware nor WARP SM 6.6 device available" / "no SM 6.6 device" instead of skipping. With #486 and the Agility SDK 1.620 runtime in target/debug/D3D12/, it's 244 / 3, the three tracked here. Every row below is main + #486.

Build (main + #486) victory-shader passed / failed victory-gpu passed / failed
base 244 / 3 (all three here) 140 / 3
#2357 dd25e37 246 / 1 (no_buffer_view left) 140 / 3
#2322 6847047 248 / 1 (no_buffer_view left) 140 / 3
#1887 0172e6b 246 / 2 (no_buffer_view, plus its new ..._through_the_runtimes_structured_view) 140 / 3
#2323 9c6e094 245 / 2 (gather fixed; by_element and no_buffer_view left) 140 / 3
#2461 9921b93 245 / 2 (no_buffer_view fixed) 142 / 1
#2177 d15c68b 245 / 2 (no_buffer_view fixed) 143 / 1
#1777 318b877 245 / 2 (no_buffer_view fixed) 143 / 1
#2315 43aa1b2 245 / 2 (no_buffer_view fixed) 143 / 1
#2251 519a820 244 / 3 143 / 0
#1765 d02e007 244 / 3 141 / 2 (castable test fixed; the two heap-cap tests left)
#2357 + #2461 247 / 0 142 / 1
#2322 + #2461 249 / 0 142 / 1
#1765 + #2357 + #2461 247 / 0 143 / 0

The victory-gpu base failures are descriptor::host::tests::dynamic_slots_are_held_until_released and memory::tests::lists_share_a_table_and_copies_keep_their_views (the heap cap, FIND-9), plus draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view.

That last one is specific to Windows 10. It is still there after every heap-cap PR: round 0: one host texture (left: false, right: true, draw.rs:2185). The in-box Windows 10 runtime has no ID3D12Device10, so make_texture (resource.rs:1194) skips the castable-format creation, and the R32_UINT / R9G9B9E5 pair gets two host textures. This matches #1999 (Windows 10, RX 7800 XT). #1765 and #2251 each fix it. #486 doesn't, because it only opts in the victory-shader test binaries.

#2251 conflicts with #2461, so I couldn't test that pair together.

The numbers come from local test logs, which I can share.

**@⁠fyernald** on GitHub · 2026-11-25 15:57 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7167466405) ### Windows 10: the open fixes on an RTX 3080 RTX 3080 10 GB, driver 617.42, **Windows 10 Pro 22H2 (19045)**, Rust 1.98.1 MSVC, `main` at `940d32f`. I haven't seen a Windows 10 run in this thread yet, so here's that picture. Command: `cargo test -p <crate> --lib --locked -- --test-threads=1`. Each PR is merged alone onto the base unless the table says otherwise. **On Windows 10 these tests need #486 first.** The in-box D3D12 runtime has no SM 6.6, so on plain `main`, `victory-shader` gives **172 passed, 75 failed**. The hardware tests panic with "neither hardware nor WARP SM 6.6 device available" / "no SM 6.6 device" instead of skipping. With #486 and the Agility SDK 1.620 runtime in `target/debug/D3D12/`, it's 244 / 3, the three tracked here. Every row below is `main` + #486. | Build (`main` + #486) | `victory-shader` passed / failed | `victory-gpu` passed / failed | |---|---|---| | base | 244 / 3 (all three here) | 140 / 3 | | #2357 `dd25e37` | 246 / 1 (`no_buffer_view` left) | 140 / 3 | | #2322 `6847047` | 248 / 1 (`no_buffer_view` left) | 140 / 3 | | #1887 `0172e6b` | 246 / 2 (`no_buffer_view`, plus its new `..._through_the_runtimes_structured_view`) | 140 / 3 | | #2323 `9c6e094` | 245 / 2 (gather fixed; `by_element` and `no_buffer_view` left) | 140 / 3 | | #2461 `9921b93` | 245 / 2 (`no_buffer_view` fixed) | 142 / 1 | | #2177 `d15c68b` | 245 / 2 (`no_buffer_view` fixed) | 143 / 1 | | #1777 `318b877` | 245 / 2 (`no_buffer_view` fixed) | 143 / 1 | | #2315 `43aa1b2` | 245 / 2 (`no_buffer_view` fixed) | 143 / 1 | | #2251 `519a820` | 244 / 3 | **143 / 0** | | #1765 `d02e007` | 244 / 3 | 141 / 2 (castable test fixed; the two heap-cap tests left) | | #2357 + #2461 | **247 / 0** | 142 / 1 | | #2322 + #2461 | **249 / 0** | 142 / 1 | | **#1765 + #2357 + #2461** | **247 / 0** | **143 / 0** | The `victory-gpu` base failures are `descriptor::host::tests::dynamic_slots_are_held_until_released` and `memory::tests::lists_share_a_table_and_copies_keep_their_views` (the heap cap, `FIND-9`), plus `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view`. **That last one is specific to Windows 10.** It is still there after every heap-cap PR: `round 0: one host texture` (`left: false`, `right: true`, `draw.rs:2185`). The in-box Windows 10 runtime has no `ID3D12Device10`, so `make_texture` (`resource.rs:1194`) skips the castable-format creation, and the R32_UINT / R9G9B9E5 pair gets two host textures. This matches #1999 (Windows 10, RX 7800 XT). #1765 and #2251 each fix it. #486 doesn't, because it only opts in the `victory-shader` test binaries. #2251 conflicts with #2461, so I couldn't test that pair together. The numbers come from local test logs, which I can share.
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-25 22:19 UTC · original

Follow-up on 13f91cae: a unit test now crashes the whole victory-shader test target

Summary

On main at 13f91caee25f2fdf2c062be5f7a27f058e51cbca, cargo test --workspace no longer finishes. The victory-shader library test binary dies with an access violation partway through, so every test after that point never runs.

$ cargo test --workspace --locked --no-fail-fast -- --test-threads=1
...
test emit::lower::tests::waterfall_loops_over_per_lane_descriptors_sample_with_each_lanes_own ... ok
test emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index ... <process dies>

Caused by:
  process didn't exit successfully: victory_shader-<hash>.exe --test-threads=1
  (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

It reproduces when that one test is run alone:

$ cargo test -p victory-shader --lib --locked -- --exact \
    emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture
running 1 test
error: test failed ...
  (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

So it is not an ordering or --test-threads problem.

Where it comes from

  • The test (crates/victory-shader/src/emit/memory_tests.rs:635) was added by 2d6c0dfc ("Shader: read marks only for texture views taken from the heap itself").
  • 67e8ae14 ("Shader tests: the compute harness zeroes its UAVs") touched the same file just before this run (+145/−6).

The body builds a resource-heap-rooted compute program, lowers it, then runs it for real through Host::new(warp) → compute_pipeline → dispatch for both the hardware and the WARP device, and asserts on the read-mark bits.

Why it matters beyond the crash

The aggregate count moves in a way that looks like an improvement but is not:

before (940d32f6) at 13f91cae
passed 696 571
failed 5 2
ignored 10 7

The drop is entirely the aborted target: about 120 assertions never execute. The three failures that disappeared (emit::stride_tests::*, emit::synthetic_tests::gathers_at_a_level_match_the_hardware) are not fixed, they are simply unreached. Anyone reading only the totals would draw the wrong conclusion.

The two failures still reached are descriptor::host::tests::dynamic_slots_are_held_until_released and memory::tests::lists_share_a_table_and_copies_keep_their_views.

Reproduction

cargo build --profile diag -p victory --features diagnostics
cargo test -p victory-shader --lib --locked -- --exact \
  emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture

The machine has a D3D12 device at feature level 12.2 with SM 6.6, so the hardware branch is taken; the WARP branch is also present in the loop.

Machine: NVIDIA RTX 3080 10 GB, driver 32.0.16.1742; AMD Ryzen 7 7700; 31.1 GB RAM; Windows 11 build 26300; Rust 1.98.1.

Written with AI assistance: the builds, runs and log analysis were carried out by an AI agent on the author's machine.

**@⁠MoonYueya** on GitHub · 2026-11-25 22:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7176212514) Follow-up on `13f91cae`: a unit test now crashes the whole `victory-shader` test target ## Summary On `main` at `13f91caee25f2fdf2c062be5f7a27f058e51cbca`, `cargo test --workspace` no longer finishes. The `victory-shader` library test binary dies with an access violation partway through, so every test after that point never runs. ``` $ cargo test --workspace --locked --no-fail-fast -- --test-threads=1 ... test emit::lower::tests::waterfall_loops_over_per_lane_descriptors_sample_with_each_lanes_own ... ok test emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index ... <process dies> Caused by: process didn't exit successfully: victory_shader-<hash>.exe --test-threads=1 (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) ``` It reproduces when that one test is run alone: ``` $ cargo test -p victory-shader --lib --locked -- --exact \ emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture running 1 test error: test failed ... (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) ``` So it is not an ordering or `--test-threads` problem. ## Where it comes from * The test (`crates/victory-shader/src/emit/memory_tests.rs:635`) was added by `2d6c0dfc` ("Shader: read marks only for texture views taken from the heap itself"). * `67e8ae14` ("Shader tests: the compute harness zeroes its UAVs") touched the same file just before this run (+145/−6). The body builds a resource-heap-rooted compute program, lowers it, then runs it for real through `Host::new(warp)` → `compute_pipeline` → `dispatch` for both the hardware and the WARP device, and asserts on the read-mark bits. ## Why it matters beyond the crash The aggregate count moves in a way that looks like an improvement but is not: | | before (`940d32f6`) | at `13f91cae` | |---|---|---| | passed | 696 | **571** | | failed | 5 | **2** | | ignored | 10 | **7** | The drop is entirely the aborted target: about 120 assertions never execute. The three failures that disappeared (`emit::stride_tests::*`, `emit::synthetic_tests::gathers_at_a_level_match_the_hardware`) are **not fixed**, they are simply unreached. Anyone reading only the totals would draw the wrong conclusion. The two failures still reached are `descriptor::host::tests::dynamic_slots_are_held_until_released` and `memory::tests::lists_share_a_table_and_copies_keep_their_views`. ## Reproduction ```bash cargo build --profile diag -p victory --features diagnostics cargo test -p victory-shader --lib --locked -- --exact \ emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture ``` The machine has a D3D12 device at feature level 12.2 with SM 6.6, so the hardware branch is taken; the WARP branch is also present in the loop. Machine: NVIDIA RTX 3080 10 GB, driver 32.0.16.1742; AMD Ryzen 7 7700; 31.1 GB RAM; Windows 11 build 26300; Rust 1.98.1. *Written with AI assistance: the builds, runs and log analysis were carried out by an AI agent on the author's machine.*
Author
Owner

@⁠potatoe0100 on GitHub · 2026-11-25 23:17 UTC · original

RTX 4060 (8 GB): the open fixes on main f3578e3

RTX 4060 (Ada, 8 GB), driver 621.14, Windows 11 Pro 26300, Rust 1.98.1, VS 2022 Build Tools, VICTORY_DXIL not set. No game files. Each PR head was merged onto main f3578e3 and tested with cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index. That test is skipped because it kills the process here too (#2571).

Short names: dyn = dynamic_slots_are_held_until_released, lists = lists_share_a_table_and_copies_keep_their_views, stride = a_heap_buffer_read_by_element_takes_the_views_stride, null = a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gather = gathers_at_a_level_match_the_hardware.

Build Still failing
main dyn, lists, stride, null, gather
#2357 dyn, lists, null
#1751 stride, null, gather
#1943, #2177 stride, gather
#2178 dyn, lists, null, gather
#2323 dyn, lists, stride, null
#2357 + #1943 none (228 + 301 passed)
#2357 + #2177 none (229 + 301 passed)

#2357 with either #1943 or #2177 clears all five on this card. Adding #2178 or #2323 on top of #2357 + #1943 keeps it at zero failures. #1887, #2461, #1779 and #1777 conflict with current main, so they weren't tested. #2121 doesn't build on current main (missing field view_pages in draw.rs).

Unit tests only. Nothing here measures the title.

AI-assisted (Claude).

**@⁠potatoe0100** on GitHub · 2026-11-25 23:17 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7177361471) ### RTX 4060 (8 GB): the open fixes on main f3578e3 RTX 4060 (Ada, 8 GB), driver 621.14, Windows 11 Pro 26300, Rust 1.98.1, VS 2022 Build Tools, `VICTORY_DXIL` not set. No game files. Each PR head was merged onto `main` f3578e3 and tested with `cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index`. That test is skipped because it kills the process here too (#2571). Short names: dyn = `dynamic_slots_are_held_until_released`, lists = `lists_share_a_table_and_copies_keep_their_views`, stride = `a_heap_buffer_read_by_element_takes_the_views_stride`, null = `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, gather = `gathers_at_a_level_match_the_hardware`. | Build | Still failing | |---|---| | main | dyn, lists, stride, null, gather | | #2357 | dyn, lists, null | | #1751 | stride, null, gather | | #1943, #2177 | stride, gather | | #2178 | dyn, lists, null, gather | | #2323 | dyn, lists, stride, null | | #2357 + #1943 | none (228 + 301 passed) | | #2357 + #2177 | none (229 + 301 passed) | #2357 with either #1943 or #2177 clears all five on this card. Adding #2178 or #2323 on top of #2357 + #1943 keeps it at zero failures. #1887, #2461, #1779 and #1777 conflict with current main, so they weren't tested. #2121 doesn't build on current main (`missing field view_pages` in `draw.rs`). Unit tests only. Nothing here measures the title. AI-assisted (Claude).
Author
Owner

@⁠latentdev on GitHub · 2026-11-26 03:35 UTC · original

RTX 4090: the lighting is zero because NVIDIA can't run the tile classifier as wave64

RTX 4090, driver 621.24, Windows 11, title 1.0.2.1, diag build, opening cutscene. Tree: main 63bcca4 + #1630 + #1832 + #2332 + #2178 + #2121.

With the fixes in this thread, this card draws and textures the G-buffer, but the lighting outputs stay at zero and the frame blows out. One refused program causes it:

  1. The tiled lighting is three indirect dispatches: compute 2dc364df5d3278b8, 63381c3250b287fa and dce085c07b9414b6. With them traced (VICTORY_TRACE_SHADERS), the indirect readback logs each one as 0 of 1 records with work ... first [[0, 1, 1]], so none of them runs a single group. That holds in every frame I logged, on 940d32f, 67e8ae1 and 63bcca4.
  2. Compute 3e7c51f5a390d0f0 (1x1x1) resets their records to [0, 1, 1] each frame (two 32-byte records at 0xd9358ffc0). The program that raises the counts is compute bad01f53f53248e5. It's dispatched 160x90 (one group per 16x16 tile of the 2560x1440 render) with 8x8 threads, so one console wave64 per group. Its table holds the argument block. Lane 0 adds the tile's count with buffer_atomic_add after a whole-wave sum, then appends the tile.
  3. NVIDIA never runs it:
    • On main, it's emitted with WaveSize(64) and the driver refuses the pipeline (E_INVALIDARG).
    • With #233, the translator refuses it (console wave64 lanes on a host without 64-lane waves). It shares LDS within the wave without barriers and has whole-wave sections (DPP, v_permlanex16, v_readlane 32).
  4. In fxceless/victory-fork, which translates it and lights this cutscene on the same card, skipping only bad01f53f53248e5 (VICTORY_SKIP_PIPELINES) turns the shot flat and washed out, as on main here.
  5. I translated it for 32-lane waves with a local change: two host waves per console wave, a group barrier after each LDS access, and whole-wave sections combined across the halves. The three passes then get work and the cutscene is lit: the sunlit yard through the window, the room, and normal exposure. There was no device removal in 9 minutes.

#439 (on #320 and #233) does the same and translates bad01f53f53248e5 here too (validator and pipeline OK on the 4090). neonbyte1 reported the same pattern with #439 under Linux (#439 comment): the material-tile classifiers run and the tiled lighting gets work. AMD runs wave64 natively, which would explain why the README's RX 6700 XT run is lit.

Still wrong on this card with the change:

  • 2dc364df5d3278b8 asks for more than 65,535 groups in x in most frames, and the clamp cuts the rest (#2256).
  • Hair renders as black blocks.
**@⁠latentdev** on GitHub · 2026-11-26 03:35 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7181847736) ### RTX 4090: the lighting is zero because NVIDIA can't run the tile classifier as wave64 RTX 4090, driver 621.24, Windows 11, title 1.0.2.1, diag build, opening cutscene. Tree: `main` 63bcca4 + #1630 + #1832 + #2332 + #2178 + #2121. With the fixes in this thread, this card draws and textures the G-buffer, but the lighting outputs stay at zero and the frame blows out. One refused program causes it: 1. The tiled lighting is three indirect dispatches: compute `2dc364df5d3278b8`, `63381c3250b287fa` and `dce085c07b9414b6`. With them traced (`VICTORY_TRACE_SHADERS`), the indirect readback logs each one as `0 of 1 records with work ... first [[0, 1, 1]]`, so none of them runs a single group. That holds in every frame I logged, on `940d32f`, `67e8ae1` and `63bcca4`. 2. Compute `3e7c51f5a390d0f0` (1x1x1) resets their records to `[0, 1, 1]` each frame (two 32-byte records at `0xd9358ffc0`). The program that raises the counts is compute `bad01f53f53248e5`. It's dispatched 160x90 (one group per 16x16 tile of the 2560x1440 render) with 8x8 threads, so one console wave64 per group. Its table holds the argument block. Lane 0 adds the tile's count with `buffer_atomic_add` after a whole-wave sum, then appends the tile. 3. NVIDIA never runs it: - On `main`, it's emitted with `WaveSize(64)` and the driver refuses the pipeline (`E_INVALIDARG`). - With #233, the translator refuses it (`console wave64 lanes on a host without 64-lane waves`). It shares LDS within the wave without barriers and has whole-wave sections (DPP, `v_permlanex16`, `v_readlane` 32). 4. In fxceless/victory-fork, which translates it and lights this cutscene on the same card, skipping only `bad01f53f53248e5` (`VICTORY_SKIP_PIPELINES`) turns the shot flat and washed out, as on `main` here. 5. I translated it for 32-lane waves with a local change: two host waves per console wave, a group barrier after each LDS access, and whole-wave sections combined across the halves. The three passes then get work and the cutscene is lit: the sunlit yard through the window, the room, and normal exposure. There was no device removal in 9 minutes. #439 (on #320 and #233) does the same and translates `bad01f53f53248e5` here too (validator and pipeline OK on the 4090). neonbyte1 reported the same pattern with #439 under Linux ([#439 comment](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439)): the material-tile classifiers run and the tiled lighting gets work. AMD runs wave64 natively, which would explain why the README's RX 6700 XT run is lit. Still wrong on this card with the change: - `2dc364df5d3278b8` asks for more than 65,535 groups in x in most frames, and the clamp cuts the rest (#2256). - Hair renders as black blocks.
Author
Owner

@⁠brkunld on GitHub · 2026-11-26 13:52 UTC · original

RTX 3080 Laptop (Ampere): #2596 + #2885 + #1777 on main 63bcca4 clear all five, nothing skipped

RTX 3080 Laptop GPU (Ampere, 8 GB), driver 32.0.16.2101, Windows 11 Home 26200, Rust 1.98.1 as pinned. No game files. Command: cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast, with no --skip.

tree victory-gpu victory-shader
main 63bcca4 2 failed (dyn, lists) aborts at the #2571 test
+ #2596 577839a – 299 passed, 3 failed (stride, null, gather)
+ #2596 + #2885 767f228 231 passed, 2 failed (dyn, lists) 303 passed, 1 failed (null)
+ #2596 + #2885 + #1777 cbb9d78 235 passed, 0 failed 304 passed, 0 failed

(Short names as in the RTX 4060 table above.) Each PR clears its own part: #2596 the #2571 abort, #2885 stride and gather, #1777 dyn, lists and null. #2178 alone cleared stride but not gather here.

On merging: #1777 and #2885 each merge cleanly onto 63bcca4 (git merge-tree). They only conflict with each other, in one hunk: the pub use shader::{…} list in crates/victory-shader/src/emit/mod.rs. Keeping both sides' names (#1777's HEAP_VIEWS_MAX, HEAP_VIEWS_PORTABLE, heap_views, null_buffer_view, set_heap_views, and #2885's VIEW_RAW_OFFSET_BITS, VIEW_RAW_OFFSET_SHIFT) builds and gives the results above.

No display driver reset was logged during any of these runs. Unit tests only; nothing here measures the title.

AI-assisted (Claude Code); the numbers are from runs on my machine.

**@⁠brkunld** on GitHub · 2026-11-26 13:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/1835#issuecomment-7193960927) ### RTX 3080 Laptop (Ampere): #2596 + #2885 + #1777 on `main` `63bcca4` clear all five, nothing skipped RTX 3080 Laptop GPU (Ampere, 8 GB), driver 32.0.16.2101, Windows 11 Home 26200, Rust 1.98.1 as pinned. No game files. Command: `cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast`, with no `--skip`. | tree | victory-gpu | victory-shader | |---|---|---| | `main` `63bcca4` | 2 failed (dyn, lists) | aborts at the #2571 test | | + #2596 `577839a` | – | 299 passed, 3 failed (stride, null, gather) | | + #2596 + #2885 `767f228` | 231 passed, 2 failed (dyn, lists) | 303 passed, 1 failed (null) | | + #2596 + #2885 + #1777 `cbb9d78` | **235 passed, 0 failed** | **304 passed, 0 failed** | (Short names as in the RTX 4060 table above.) Each PR clears its own part: #2596 the #2571 abort, #2885 stride and gather, #1777 dyn, lists and null. #2178 alone cleared stride but not gather here. On merging: #1777 and #2885 each merge cleanly onto `63bcca4` (`git merge-tree`). They only conflict with each other, in one hunk: the `pub use shader::{…}` list in `crates/victory-shader/src/emit/mod.rs`. Keeping both sides' names (#1777's `HEAP_VIEWS_MAX`, `HEAP_VIEWS_PORTABLE`, `heap_views`, `null_buffer_view`, `set_heap_views`, and #2885's `VIEW_RAW_OFFSET_BITS`, `VIEW_RAW_OFFSET_SHIFT`) builds and gives the results above. No display driver reset was logged during any of these runs. Unit tests only; nothing here measures the title. AI-assisted (Claude Code); the numbers are from runs on my machine.
This discussion has been locked. Commenting is limited to contributors.
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#1835
No description provided.