Shaders: bind a zero dword for empty root-constant slices #2585

Open
fuzeofficlal wants to merge 1 commit from upstream-pr/2587 into main
fuzeofficlal commented 2026-11-25 16:18:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T16:18:20Z.


Summary

Host::root_signature_for in crates/victory-shader/src/emit/host.rs always declares Num32BitValues: s.user_data_dwords().max(1) for each shader stage, even when a shader reads zero user-data dwords.

When a test passes an empty Root::Constants(Vec::new()), Vec::new().as_ptr() is a dangling aligned pointer (0x4). Passing 0x4 with count 0 to SetComputeRoot32BitConstants / SetGraphicsRoot32BitConstants crashes NVIDIA's D3D12 driver (nvwgf2umx.dll) with STATUS_ACCESS_VIOLATION (0xc0000005) (reproducing on emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index). Skipping the call avoids the crash, but leaves the declared 1-dword root parameter unbound.

Changes

  • crates/victory-shader/src/emit/host.rs: when Root::Constants(data) is empty, bind &[0u32] (let words = if data.is_empty() { &[0u32][..] } else { data.as_slice() };) in both Host::draw (SetGraphicsRoot32BitConstants) and Host::dispatch (SetComputeRoot32BitConstants), keeping every declared root parameter defined with a valid pointer.
  • crates/victory-shader/src/emit/synthetic_tests.rs: add empty_root_constants_bind_zero_in_draw_and_dispatch verifying both Host::dispatch and Host::draw with empty Root::Constants(Vec::new()) on hardware and WARP.

Verification

  • cargo test -p victory-shader --lib emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch -- --exact — pass on RTX 5090 and WARP.
  • cargo test -p victory-shader --lib emit::memory_tests — 4/4 pass on RTX 5090 (previously crashed with 0xc0000005).
  • cargo clippy -p victory-shader --all-targets -- -D warnings — pass (0 warnings).
  • cargo xtask policy — pass (184 files ok).
<!-- greyfinch-sync:Marvisak/VIctory:issue:5494944375 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T16:18:20Z. --- ## Summary `Host::root_signature_for` in `crates/victory-shader/src/emit/host.rs` always declares `Num32BitValues: s.user_data_dwords().max(1)` for each shader stage, even when a shader reads zero user-data dwords. When a test passes an empty `Root::Constants(Vec::new())`, `Vec::new().as_ptr()` is a dangling aligned pointer (`0x4`). Passing `0x4` with count `0` to `SetComputeRoot32BitConstants` / `SetGraphicsRoot32BitConstants` crashes NVIDIA's D3D12 driver (`nvwgf2umx.dll`) with `STATUS_ACCESS_VIOLATION (0xc0000005)` (reproducing on `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index`). Skipping the call avoids the crash, but leaves the declared 1-dword root parameter unbound. ## Changes - `crates/victory-shader/src/emit/host.rs`: when `Root::Constants(data)` is empty, bind `&[0u32]` (`let words = if data.is_empty() { &[0u32][..] } else { data.as_slice() };`) in both `Host::draw` (`SetGraphicsRoot32BitConstants`) and `Host::dispatch` (`SetComputeRoot32BitConstants`), keeping every declared root parameter defined with a valid pointer. - `crates/victory-shader/src/emit/synthetic_tests.rs`: add `empty_root_constants_bind_zero_in_draw_and_dispatch` verifying both `Host::dispatch` and `Host::draw` with empty `Root::Constants(Vec::new())` on hardware and WARP. ## Verification - `cargo test -p victory-shader --lib emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch -- --exact` — pass on RTX 5090 and WARP. - `cargo test -p victory-shader --lib emit::memory_tests` — 4/4 pass on RTX 5090 (previously crashed with `0xc0000005`). - `cargo clippy -p victory-shader --all-targets -- -D warnings` — pass (0 warnings). - `cargo xtask policy` — pass (`184 files ok`).
fyernald commented 2026-11-25 16:41:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fyernald on 2026-11-25T16:41:24Z.

Review: CHANGES_REQUESTED


This fixes the crash here too: RTX 3080 (617.42), Windows 10 (19045), main 67e8ae1 + #486. main dies with 0xc0000005 after 65 tests; with this PR it's 268 passed, 3 failed (the #1835 ones), and the new test passes.

One problem with skipping the call, though. The root signature declares at least one constant whatever the shader uses: Num32BitValues: s.user_data_dwords().max(1) at host.rs:162. If Set*Root32BitConstants isn't called, that declared parameter is never set in the list, and root arguments are undefined until they are set. It doesn't matter for this shader, which reads no user data, but the harness then dispatches with an unset root parameter that the signature declares. #2596 fixes the same crash by setting that one constant to 0, which keeps every declared parameter defined.

Could this set [0] for an empty list instead of skipping, or be closed in favour of #2596? The new empty_root_constants_are_skipped_in_draw_and_dispatch test is worth keeping either way, renamed to match.

<!-- greyfinch-sync:Marvisak/VIctory:review:6061364700 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#pullrequestreview-6061364700). Originally posted by [fyernald](https://github.com/fyernald) on 2026-11-25T16:41:24Z. **Review:** CHANGES_REQUESTED --- This fixes the crash here too: **RTX 3080 (617.42), Windows 10 (19045)**, `main` `67e8ae1` + #486. `main` dies with `0xc0000005` after 65 tests; with this PR it's 268 passed, 3 failed (the #1835 ones), and the new test passes. One problem with skipping the call, though. The root signature declares at least one constant whatever the shader uses: `Num32BitValues: s.user_data_dwords().max(1)` at `host.rs:162`. If `Set*Root32BitConstants` isn't called, that declared parameter is never set in the list, and root arguments are undefined until they are set. It doesn't matter for this shader, which reads no user data, but the harness then dispatches with an unset root parameter that the signature declares. #2596 fixes the same crash by setting that one constant to 0, which keeps every declared parameter defined. Could this set `[0]` for an empty list instead of skipping, or be closed in favour of #2596? The new `empty_root_constants_are_skipped_in_draw_and_dispatch` test is worth keeping either way, renamed to match.
DrDarkDK commented 2026-11-25 17:05:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T16:40:52Z.


#2596 addresses the same crash in #2571 by writing one zero. root_signature_for still declares one DWORD for a stage with no user data because it uses user_data_dwords().max(1). With the skip here, that slot stays unset. Microsoft’s D3D12 guidance says to populate the slots declared by the current root signature before draw or dispatch.

Could we keep this PR’s synthetic draw/dispatch coverage and use the one-zero binding from #2596? That would preserve the regression test and populate the declared slot.

Static review only. I didn’t run either patch.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168366323 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7168366323). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T16:40:52Z. --- #2596 addresses the same crash in #2571 by writing one zero. `root_signature_for` still declares one DWORD for a stage with no user data because it uses `user_data_dwords().max(1)`. With the skip here, that slot stays unset. [Microsoft’s D3D12 guidance](https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-a-root-signature#command-list-semantic) says to populate the slots declared by the current root signature before draw or dispatch. Could we keep this PR’s synthetic draw/dispatch coverage and use the one-zero binding from #2596? That would preserve the regression test and populate the declared slot. Static review only. I didn’t run either patch. *AI-assisted with Codex.*
fuzeofficlal commented 2026-11-25 17:05:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T16:49:39Z.


Thanks @fyernald and @DrDarkDK — good catch on the declared user_data_dwords().max(1) slot!

Updated (df8ee8ef, rebased onto 67e8ae14) to bind &[0u32] for empty Root::Constants slices in both Host::draw (SetGraphicsRoot32BitConstants) and Host::dispatch (SetComputeRoot32BitConstants), keeping every declared root parameter defined while avoiding the dangling Vec::new().as_ptr() (0x4) dereference, and renamed the synthetic draw/dispatch regression test to empty_root_constants_bind_zero_in_draw_and_dispatch.

Re-verified on RTX 5090 + WARP (emit::memory_tests 4/4 pass, empty_root_constants_bind_zero_in_draw_and_dispatch pass, clippy -D warnings and cargo xtask policy pass).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168591521 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7168591521). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T16:49:39Z. --- Thanks @fyernald and @DrDarkDK — good catch on the declared `user_data_dwords().max(1)` slot! Updated (`df8ee8ef`, rebased onto `67e8ae14`) to bind `&[0u32]` for empty `Root::Constants` slices in both `Host::draw` (`SetGraphicsRoot32BitConstants`) and `Host::dispatch` (`SetComputeRoot32BitConstants`), keeping every declared root parameter defined while avoiding the dangling `Vec::new().as_ptr()` (`0x4`) dereference, and renamed the synthetic draw/dispatch regression test to `empty_root_constants_bind_zero_in_draw_and_dispatch`. Re-verified on RTX 5090 + WARP (`emit::memory_tests` 4/4 pass, `empty_root_constants_bind_zero_in_draw_and_dispatch` pass, `clippy -D warnings` and `cargo xtask policy` pass).
oni-swr commented 2026-11-25 17:05:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T16:50:30Z.


Verification of df8ee8e (CPU-only; D3D12 tests deliberately not run)

  • Merges cleanly onto origin/main (67e8ae1).
  • cargo test -p victory-shader --lib --no-run: builds. cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • Not run: the new test empty_root_constants_bind_zero_in_draw_and_dispatch. victory-shader's test host (emit/host.rs) does not honor VICTORY_D3D12_WARP. It picks the first hardware adapter unless VICTORY_WARP=1 is set, and this test loops over ("hardware", false) first, so running it opens the physical GPU. I did not run it on this machine, so nothing here shows the test passing on WARP or hardware.
  • Diff review: the fix binds [0] for an empty slice, which matches the root signature's user_data_dwords().max(1) (host.rs ~L162). Every root parameter is still set. (I first reviewed 8ceeb01, which skipped the call. The head moved to this approach while I was verifying, and this comment covers df8ee8e only.) The PR description still says the call is guarded with if !data.is_empty(), which no longer matches the code.

Overlap with #2596 (same issue, #2571): the two PRs now make the same code change, setting [0] in the same two Root::Constants arms of emit/host.rs (graphics and compute). They are duplicates, and git merge-tree of the two heads reports a conflict in that file. #2587 adds a regression test, which is unrun here for the reason above. #2596 is the fix alone. A maintainer should land one and close or rebase the other.

Independent verification by Claude Code (Claude Sonnet 5.5), an AI assistant, run for oni-swr. No game files, dumps, or shader names were used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168612853 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7168612853). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T16:50:30Z. --- **Verification of `df8ee8e` (CPU-only; D3D12 tests deliberately not run)** - Merges cleanly onto `origin/main` (`67e8ae1`). - `cargo test -p victory-shader --lib --no-run`: builds. `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - **Not run:** the new test `empty_root_constants_bind_zero_in_draw_and_dispatch`. `victory-shader`'s test host (`emit/host.rs`) does not honor `VICTORY_D3D12_WARP`. It picks the first hardware adapter unless `VICTORY_WARP=1` is set, and this test loops over `("hardware", false)` first, so running it opens the physical GPU. I did not run it on this machine, so nothing here shows the test passing on WARP or hardware. - Diff review: the fix binds `[0]` for an empty slice, which matches the root signature's `user_data_dwords().max(1)` (`host.rs` ~L162). Every root parameter is still set. (I first reviewed `8ceeb01`, which skipped the call. The head moved to this approach while I was verifying, and this comment covers `df8ee8e` only.) The PR description still says the call is guarded with `if !data.is_empty()`, which no longer matches the code. **Overlap with #2596 (same issue, #2571):** the two PRs now make the same code change, setting `[0]` in the same two `Root::Constants` arms of `emit/host.rs` (graphics and compute). They are duplicates, and `git merge-tree` of the two heads reports a conflict in that file. #2587 adds a regression test, which is unrun here for the reason above. #2596 is the fix alone. A maintainer should land one and close or rebase the other. _Independent verification by Claude Code (Claude Sonnet 5.5), an AI assistant, run for oni-swr. No game files, dumps, or shader names were used._
fyernald commented 2026-11-25 17:38:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fyernald on 2026-11-25T17:38:47Z.

Review: APPROVED


Thanks for the change. Retested df8ee8e on the same RTX 3080 (617.42), Windows 10 (19045), main 67e8ae1 + #486 (without #2596): main still crashes after 65 tests (0xc0000005). With this head, cargo test -p victory-shader --lib --locked -- --test-threads=1 gives 268 passed, 3 failed (the #1835 ones). Every declared constant is now defined.

It now does the same thing as #2596, so only one of the two needs to land. This one adds the dedicated test.

<!-- greyfinch-sync:Marvisak/VIctory:review:6062211266 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#pullrequestreview-6062211266). Originally posted by [fyernald](https://github.com/fyernald) on 2026-11-25T17:38:47Z. **Review:** APPROVED --- Thanks for the change. Retested `df8ee8e` on the same **RTX 3080 (617.42), Windows 10 (19045)**, `main` `67e8ae1` + #486 (without #2596): `main` still crashes after 65 tests (`0xc0000005`). With this head, `cargo test -p victory-shader --lib --locked -- --test-threads=1` gives 268 passed, 3 failed (the #1835 ones). Every declared constant is now defined. It now does the same thing as #2596, so only one of the two needs to land. This one adds the dedicated test.
Vedoxdev123 commented 2026-11-25 19:06:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Vedoxdev123 on 2026-11-25T18:42:53Z.


RTX 4060 test (AI-assisted)
Windows 64-bit, Ryzen 5 5600X, GeForce RTX 4060 (8 GB), on main 13f91ca + this PR (df8ee8e).

  • cargo test -p victory-shader: main aborts with 0xc0000005 at emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index and prints no summary. With this PR the run completes: 268 passed, 3 failed, 3 ignored. The 3 failures are the known NVIDIA ones from #1835 (a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gathers_at_a_level_match_the_hardware).
  • cargo test -p victory-gpu --lib: 193 passed, 2 failed, 1 ignored, identical to main (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views). No change from this PR.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7171293371 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7171293371). Originally posted by [Vedoxdev123](https://github.com/Vedoxdev123) on 2026-11-25T18:42:53Z. --- **RTX 4060 test (AI-assisted)** Windows 64-bit, Ryzen 5 5600X, GeForce RTX 4060 (8 GB), on `main` `13f91ca` + this PR (`df8ee8e`). - `cargo test -p victory-shader`: `main` aborts with `0xc0000005` at `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` and prints no summary. With this PR the run completes: **268 passed, 3 failed, 3 ignored**. The 3 failures are the known NVIDIA ones from #1835 (`a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `gathers_at_a_level_match_the_hardware`). - `cargo test -p victory-gpu --lib`: **193 passed, 2 failed, 1 ignored**, identical to `main` (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). No change from this PR.
qtLkz commented 2026-11-25 21:03:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by qtLkz on 2026-11-25T20:23:18Z.


Tested on NVIDIA Ada: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR merged onto main 13f91ca (clean merge).

Plain main 13f91ca on this card: the victory-shader lib run dies with STATUS_ACCESS_VIOLATION (0xc0000005) at emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index (#2571). The test passes on its own with VICTORY_WARP=1.

With this PR: cargo test -p victory-shader --lib --locked -- --test-threads=1

  • heap_direct_texture_reads_mark_their_heap_index ... ok, on the hardware adapter
  • The new synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch ... ok
  • The suite runs to the end: 268 passed, 3 failed, 3 ignored. The 3 failures are the known NVIDIA ones (stride_tests ×2, gathers_at_a_level_match_the_hardware; #2317, fixed by #2315 + #2322), not from this PR.

#2596 fixes the crash on this card as well. This PR also covers the draw path and adds a regression test.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7173595822 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7173595822). Originally posted by [qtLkz](https://github.com/qtLkz) on 2026-11-25T20:23:18Z. --- Tested on NVIDIA Ada: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR merged onto main `13f91ca` (clean merge). **Plain main `13f91ca` on this card:** the victory-shader lib run dies with `STATUS_ACCESS_VIOLATION` (0xc0000005) at `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` (#2571). The test passes on its own with `VICTORY_WARP=1`. **With this PR:** `cargo test -p victory-shader --lib --locked -- --test-threads=1` - `heap_direct_texture_reads_mark_their_heap_index ... ok`, on the hardware adapter - The new `synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch ... ok` - The suite runs to the end: 268 passed, 3 failed, 3 ignored. The 3 failures are the known NVIDIA ones (`stride_tests` ×2, `gathers_at_a_level_match_the_hardware`; #2317, fixed by #2315 + #2322), not from this PR. #2596 fixes the crash on this card as well. This PR also covers the draw path and adds a regression test. AI-assisted (Claude).
Marvisak commented 2026-11-25 23:06:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:15:08Z.


Automated triage for the maintainers.

Verdict: merge candidate. Re-reviewed at 8aae7ab, which now merges cleanly into main. In crates/victory-shader/src/emit/host.rs, Host::draw and Host::dispatch now bind a single zero dword when Root::Constants is empty. This matches the user_data_dwords().max(1) slot that root_signature_for declares, and it no longer passes the dangling Vec::new() pointer that crashes NVIDIA's driver (#2571). The new empty_root_constants_bind_zero_in_draw_and_dispatch covers both paths. Testers in this thread report it fails on main and passes with the PR on several NVIDIA cards. #2596 makes the same code change without a test, and the two conflict, so only one should land.

CI: passing. Recommending a look, not approving.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176127274 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7176127274). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:15:08Z. --- <!-- victory-triage v1 head=8aae7ab3fa997e7fb618b1439f12bf3d6a6ffaf9 verdict=merge-candidate at=2026-11-26T03:19:29Z --> Automated triage for the maintainers. **Verdict: merge candidate.** Re-reviewed at `8aae7ab`, which now merges cleanly into `main`. In `crates/victory-shader/src/emit/host.rs`, `Host::draw` and `Host::dispatch` now bind a single zero dword when `Root::Constants` is empty. This matches the `user_data_dwords().max(1)` slot that `root_signature_for` declares, and it no longer passes the dangling `Vec::new()` pointer that crashes NVIDIA's driver (#2571). The new `empty_root_constants_bind_zero_in_draw_and_dispatch` covers both paths. Testers in this thread report it fails on `main` and passes with the PR on several NVIDIA cards. #2596 makes the same code change without a test, and the two conflict, so only one should land. CI: passing. Recommending a look, not approving. --- _Generated by [Claude Code](https://claude.ai/code)_
KainanP commented 2026-11-25 23:06:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T22:53:50Z.


Measured against the other #2571 PRs on an RTX 4060 (where main crashes), Intel UHD and WARP. This one passes the test 3 of 3, its host-level test fails on main and passes here, and it adds no suite failure. Recommended in the comparison: https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7176908308 (AI-assisted)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176912841 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7176912841). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-25T22:53:50Z. --- Measured against the other #2571 PRs on an RTX 4060 (where `main` crashes), Intel UHD and WARP. This one passes the test 3 of 3, its host-level test fails on `main` and passes here, and it adds no suite failure. Recommended in the comparison: https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7176908308 (AI-assisted)
liandraraiane commented 2026-11-26 03:05:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by liandraraiane on 2026-11-26T02:48:14Z.


Confirmed on an RTX 3060 (Ampere, driver 610.88, Windows 11 26200). On f3578e3, heap_direct_texture_reads_mark_their_heap_index kills the test binary with STATUS_ACCESS_VIOLATION in the hardware dispatch (7/7 runs; WARP passes), and this PR's empty_root_constants_bind_zero_in_draw_and_dispatch, applied alone on main, does the same. With this PR (8aae7ab) both pass, and the whole victory-shader suite runs to the end: 300 passed, 3 failed, 5/5 runs. The three left are the capped-heap failures of #1835 (a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gathers_at_a_level_match_the_hardware). #2596 also fixes the crash here. Not tested: AMD, other NVIDIA generations.

AI use: Claude Code ran the tests on this machine and drafted this comment.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181133000 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7181133000). Originally posted by [liandraraiane](https://github.com/liandraraiane) on 2026-11-26T02:48:14Z. --- Confirmed on an RTX 3060 (Ampere, driver 610.88, Windows 11 26200). On `f3578e3`, `heap_direct_texture_reads_mark_their_heap_index` kills the test binary with STATUS_ACCESS_VIOLATION in the hardware dispatch (7/7 runs; WARP passes), and this PR's `empty_root_constants_bind_zero_in_draw_and_dispatch`, applied alone on main, does the same. With this PR (`8aae7ab`) both pass, and the whole `victory-shader` suite runs to the end: 300 passed, 3 failed, 5/5 runs. The three left are the capped-heap failures of #1835 (`a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `gathers_at_a_level_match_the_hardware`). #2596 also fixes the crash here. Not tested: AMD, other NVIDIA generations. AI use: Claude Code ran the tests on this machine and drafted this comment.
kalberts0089-hash commented 2026-11-27 05:09:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kalberts0089-hash on 2026-11-27T05:09:11Z.


NVIDIA test report: RTX 4060 (driver 610.88), Windows 11 Pro, rustc 1.98.1. Head 8aae7ab as fetched (base f3578e3), cargo test -p victory-shader --no-fail-fast.

  • emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index: passes. On main 63bcca4 it kills the test process with 0xc0000005 on this card.
  • The new empty_root_constants_bind_zero_in_draw_and_dispatch passes.
  • Lib suite: 300 passed, 3 failed, 3 ignored. The 3 failures are the known NVIDIA ones and unrelated to this change: a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gathers_at_a_level_match_the_hardware.

Synthetic tests only, no game files. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7210392963 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2587#issuecomment-7210392963). Originally posted by [kalberts0089-hash](https://github.com/kalberts0089-hash) on 2026-11-27T05:09:11Z. --- NVIDIA test report: RTX 4060 (driver 610.88), Windows 11 Pro, rustc 1.98.1. Head `8aae7ab` as fetched (base `f3578e3`), `cargo test -p victory-shader --no-fail-fast`. - `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index`: passes. On main `63bcca4` it kills the test process with `0xc0000005` on this card. - The new `empty_root_constants_bind_zero_in_draw_and_dispatch` passes. - Lib suite: 300 passed, 3 failed, 3 ignored. The 3 failures are the known NVIDIA ones and unrelated to this change: `a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `gathers_at_a_level_match_the_hardware`. Synthetic tests only, no game files. AI-assisted (Claude Code).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2587:upstream-pr/2587'
git switch 'upstream-pr/2587'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2587'
git switch 'upstream-pr/2587'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2587'
git switch 'upstream-pr/2587'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2587'
git switch 'main'
git merge --squash 'upstream-pr/2587'
git switch 'main'
git merge --ff-only 'upstream-pr/2587'
git switch 'main'
git merge 'upstream-pr/2587'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2585
No description provided.