Shaders: query a buffer's size through a handle of its own #2122

Open
github-bot wants to merge 1 commit from github-bot/gh-2122 into main AGit
Owner

@⁠imjustprism on GitHub · 2026-11-25 05:31 UTC · original
imjustprism:shader/rdna4-compiler-crash → main · +275 −2 · 3 files · 1 commits · open

amd's driver 32.0.32029.2010 on an rx 9070 xt faults in its shader compiler
when one buffer handle feeds both a size query whose result is used and a
load. a buffer's size query now always takes a handle of its own, from caches
of its own, so no load shares it. a query nothing reads is dropped by the
writer together with its handle.

rewritten on 13f91ca: with 850b66f's entry-block handle cache the old branch
no longer compiled against main, and the size query was back on the loads'
handle. the uses analysis is gone, the writer's liveness does that job now.

rebased again onto 63bcca4 (bf526d7). the lowering change is the one from
6ff2361, line for line. the five unit tests moved to
emit/lower/tests/size_handles.rs, unchanged: with them in lower.rs the file
was 528,047 bytes on the new main, over the 524,288 of cargo xtask policy.
it is 522,494 now.

the new gpu test runs on hardware and warp. with the size query forced back
onto the loads' handle it kills the test process on the 9070 xt at pipeline
creation. translate --cache --pipelines and the title were not run on this
head.

the extra handle is emitted on every host, so this is how far it reaches:

emitted dxil main this branch change
programs translated 26,177 26,177
programs emitted 25,752 25,752
dump files that differ 666 of 25,734 2.6% of them
bytes of those 666 files 85,965,845 86,015,013 +49,168, about 74 each

translate --list with VICTORY_EMIT_DUMP, release builds of 13f91ca and
6ff2361, one run each, dumps compared file by file. 25,752 programs make
25,734 files because some share a dump file name. the other 25,068 files are
byte for byte the same, and refusals are the same on both, reason by reason.
the shader cache is keyed by the translator's source, so every program is
translated again once, as after any translator change.

fixes #1783
fixes #1785
refs #2124
refs #2517

**@⁠imjustprism** on GitHub · 2026-11-25 05:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122) `imjustprism:shader/rdna4-compiler-crash` → `main` · +275 −2 · 3 files · 1 commits · open amd's driver 32.0.32029.2010 on an rx 9070 xt faults in its shader compiler when one buffer handle feeds both a size query whose result is used and a load. a buffer's size query now always takes a handle of its own, from caches of its own, so no load shares it. a query nothing reads is dropped by the writer together with its handle. rewritten on 13f91ca: with 850b66f's entry-block handle cache the old branch no longer compiled against main, and the size query was back on the loads' handle. the uses analysis is gone, the writer's liveness does that job now. rebased again onto 63bcca4 (bf526d7). the lowering change is the one from 6ff2361, line for line. the five unit tests moved to emit/lower/tests/size_handles.rs, unchanged: with them in lower.rs the file was 528,047 bytes on the new main, over the 524,288 of cargo xtask policy. it is 522,494 now. the new gpu test runs on hardware and warp. with the size query forced back onto the loads' handle it kills the test process on the 9070 xt at pipeline creation. translate --cache --pipelines and the title were not run on this head. the extra handle is emitted on every host, so this is how far it reaches: | emitted dxil | main | this branch | change | |---|---|---|---| | programs translated | 26,177 | 26,177 | | | programs emitted | 25,752 | 25,752 | | | dump files that differ | | 666 of 25,734 | 2.6% of them | | bytes of those 666 files | 85,965,845 | 86,015,013 | +49,168, about 74 each | translate --list with VICTORY_EMIT_DUMP, release builds of 13f91ca and 6ff2361, one run each, dumps compared file by file. 25,752 programs make 25,734 files because some share a dump file name. the other 25,068 files are byte for byte the same, and refusals are the same on both, reason by reason. the shader cache is keyed by the translator's source, so every program is translated again once, as after any translator change. fixes #1783 fixes #1785 refs #2124 refs #2517
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:29 +00:00
github-bot force-pushed github-bot/gh-2122 from 6ff236148b to bf526d765f 2026-11-26 06:55:13 +00:00 Compare
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 05:36 UTC · original · edited 2026-11-25 21:33 UTC

Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at e14ee3d. victory-shader: 250 passed, 3 failed, 3 ignored. The 6 new stride_tests pass (a_buffers_size_query_does_not_share_its_handle_with_the_loads, a_buffers_unread_size_shares_the_handle_of_the_loads, a_buffers_size_read_as_its_loads_offset_has_a_handle_of_its_own, an_images_size_read_as_data_shares_the_handle_of_its_sample, a_buffers_base_in_a_scalar_load_is_not_a_read_of_its_size, a_raw_buffer_is_sized_and_read_through_one_descriptor_load). The 3 failures are #1744's NVIDIA failures on main. Two of them are in the same file, a_heap_buffer_read_by_element_takes_the_views_stride and a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, and they still fail here, so this PR doesn't change them. Same as main on this hardware.


Added 21:33Z: re-run at the current head 6ff2361 (base 13f91ca), same RTX 3070, driver 616.56, debug, cargo test --locked -p victory-shader with heap_direct_texture_reads_mark_their_heap_index skipped (it crashes the test process on this card on main, #2571): 272 passed, 3 failed, no SKIPPED lines. The PR's six new tests all pass: a_buffers_size_query_does_not_share_its_handle_with_the_loads, a_buffer_at_a_computed_table_offset_is_sized_through_its_own_handle, a_buffer_sized_at_each_of_its_reloads_has_one_size_handle, a_buffers_unread_size_query_writes_no_handle, an_images_size_read_as_data_shares_the_handle_of_its_sample (lower::tests) and stride_tests::a_raw_buffers_size_beside_its_loads_reads_its_byte_count. The 3 failures are the #1744 NVIDIA ones that fail on main on this card too (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).

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠upipibi** on GitHub · 2026-11-25 05:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7153958562) · edited 2026-11-25 21:33 UTC Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `e14ee3d`. `victory-shader`: 250 passed, 3 failed, 3 ignored. The 6 new `stride_tests` pass (`a_buffers_size_query_does_not_share_its_handle_with_the_loads`, `a_buffers_unread_size_shares_the_handle_of_the_loads`, `a_buffers_size_read_as_its_loads_offset_has_a_handle_of_its_own`, `an_images_size_read_as_data_shares_the_handle_of_its_sample`, `a_buffers_base_in_a_scalar_load_is_not_a_read_of_its_size`, `a_raw_buffer_is_sized_and_read_through_one_descriptor_load`). The 3 failures are #1744's NVIDIA failures on `main`. Two of them are in the same file, `a_heap_buffer_read_by_element_takes_the_views_stride` and `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, and they still fail here, so this PR doesn't change them. Same as `main` on this hardware. --- **Added 21:33Z: re-run at the current head `6ff2361`** (base `13f91ca`), same RTX 3070, driver 616.56, debug, `cargo test --locked -p victory-shader` with `heap_direct_texture_reads_mark_their_heap_index` skipped (it crashes the test process on this card on `main`, #2571): 272 passed, 3 failed, no SKIPPED lines. The PR's six new tests all pass: `a_buffers_size_query_does_not_share_its_handle_with_the_loads`, `a_buffer_at_a_computed_table_offset_is_sized_through_its_own_handle`, `a_buffer_sized_at_each_of_its_reloads_has_one_size_handle`, `a_buffers_unread_size_query_writes_no_handle`, `an_images_size_read_as_data_shares_the_handle_of_its_sample` (`lower::tests`) and `stride_tests::a_raw_buffers_size_beside_its_loads_reads_its_byte_count`. The 3 failures are the #1744 NVIDIA ones that fail on `main` on this card too (`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`). AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 06:16 UTC · original

Verified the "census is unchanged" claim here, and two things I would add before it lands

Measured on this machine (RTX 4090, 32.0.16.2124, release build, local 1.0.2.1 archive, 26,503 containers, validator SDK 10.0.26100 dxil.dll 1.9):

validated 23,918   (main 940d32f: 23,918)

So the claim holds, and it is the right claim for this change — the fix is about what the driver's compiler is handed, not about whether modules validate.

First, the workaround should carry the reason in the code. The description names it precisely — AMD's 32.0.32029.2010 on an RX 9070 XT faults when one buffer heap handle feeds both a size query whose result is used and a load — but a reader of lower.rs in six months will see an extra handle and no way to know it is not redundant. A comment naming the driver version, the card and the crash is what stops it being removed by someone tidying up, and this repository has already lost time this week to a missing line of explanation.

Second, the number I would want in the description: how many programs' emitted DXIL changes. The extra handle is emitted wherever the pattern occurs, on every host, not only on the one with the faulty compiler — so:

  • the shader cache invalidates for those programs once (expected, worth saying);
  • any before/after of translation time or module size that someone measures next week has to know the baseline moved;
  • and if the pattern turns out to be common, the "one extra createHandleFromHeap per program" is worth a sentence on cost, because this is the path that runs for every buffer size query in the title.

Your heap_handles counter under #[cfg(test)] suggests you already have that number — it just is not in the description, and "census unchanged" does not cover it, because a module can validate identically while its code differs.

Two smaller things I checked and like:

  • the pattern is detected from what an instruction reads as data, with the descriptor-naming registers excluded and the soffset case handled — that is the part that would have been easy to get subtly wrong, and the helper is written so it can be tested on its own;
  • heap_handles is test-only, so nothing in a release build pays for the instrumentation.

What I could not check: the crash itself, since this machine has neither the card nor that driver. The evidence for the fix's purpose is yours, and I am reviewing the shape of it rather than re-running your failure.

No game data is involved: counts, a driver version and code.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 06:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7154622373) **Verified the "census is unchanged" claim here, and two things I would add before it lands** Measured on this machine (RTX 4090, `32.0.16.2124`, release build, local 1.0.2.1 archive, 26,503 containers, validator SDK 10.0.26100 `dxil.dll` 1.9): ``` validated 23,918 (main 940d32f: 23,918) ``` So the claim holds, and it is the right claim for this change — the fix is about what the driver's compiler is handed, not about whether modules validate. **First, the workaround should carry the reason in the code.** The description names it precisely — AMD's `32.0.32029.2010` on an RX 9070 XT faults when one buffer heap handle feeds both a size query whose result is used and a load — but a reader of `lower.rs` in six months will see an extra handle and no way to know it is not redundant. A comment naming the driver version, the card and the crash is what stops it being removed by someone tidying up, and this repository has already lost time this week to a missing line of explanation. **Second, the number I would want in the description: how many programs' emitted DXIL changes.** The extra handle is emitted wherever the pattern occurs, on **every** host, not only on the one with the faulty compiler — so: - the shader cache invalidates for those programs once (expected, worth saying); - any before/after of translation time or module size that someone measures next week has to know the baseline moved; - and if the pattern turns out to be common, the "one extra `createHandleFromHeap` per program" is worth a sentence on cost, because this is the path that runs for every buffer size query in the title. Your `heap_handles` counter under `#[cfg(test)]` suggests you already have that number — it just is not in the description, and "census unchanged" does not cover it, because a module can validate identically while its code differs. Two smaller things I checked and like: - **the pattern is detected from what an instruction reads as data**, with the descriptor-naming registers excluded and the `soffset` case handled — that is the part that would have been easy to get subtly wrong, and the helper is written so it can be tested on its own; - **`heap_handles` is test-only**, so nothing in a release build pays for the instrumentation. What I could not check: the crash itself, since this machine has neither the card nor that driver. The evidence for the fix's purpose is yours, and I am reviewing the shape of it rather than re-running your failure. No game data is involved: counts, a driver version and code. Written with an AI assistant.
Author
Owner

@⁠imjustprism on GitHub · 2026-11-25 07:30 UTC · original

thanks for running the census on the 4090. the reason is already in the code: the rustdoc on the size query in lower.rs names the driver, the card and the fault, and what does and does not trip it. the count was missing, it is in the description now: 333 of 25,678 emitted programs change, about 100 bytes each. the cache is keyed by the translator's source, so it retranslates once like after any translator change.

**@⁠imjustprism** on GitHub · 2026-11-25 07:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7155930070) thanks for running the census on the 4090. the reason is already in the code: the rustdoc on the size query in lower.rs names the driver, the card and the fault, and what does and does not trip it. the count was missing, it is in the description now: 333 of 25,678 emitted programs change, about 100 bytes each. the cache is keyed by the translator's source, so it retranslates once like after any translator change.
Author
Owner

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

Offline measurement on a retail dump

Result: no count change against main.

I merged head e14ee3d8 onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 08:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7157123894) ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head e14ee3d8 onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 10:46 UTC · original · edited 2026-11-26 07:21 UTC

Automated triage for the maintainers.

Merge candidate. Thanks for answering the request. Head bf526d7 is rebased onto 63bcca4 with the same lowering as 6ff2361. Lower::descriptor_data (crates/victory-shader/src/emit/lower.rs) makes a buffer's size handle through swap_size_caches, so no load shares it, and image handles stay shared. The five unit tests moved unchanged into emit/lower/tests/size_handles.rs, which the mod size_handles; inside lower.rs's test module points to. That keeps lower.rs at 522,494 bytes, under the 524,288-byte policy limit.

The RX 9070 XT check I asked for is covered twice. MeMako's independent run at 6ff2361 created 25,665 of 25,665 pipelines with no amdxc64.dll fault, and your run on this head passed. Linking #2124 and #2517 as refs rather than fixes is the right call. A structured-buffer case in the GPU test would still be a useful follow-up, but it shouldn't block this.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 10:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7160158778) · edited 2026-11-26 07:21 UTC <!-- victory-triage v1 head=bf526d765fc16ac3ae190deee355fb83acdafd77 verdict=merge-candidate at=2026-11-26T07:21:50Z --> Automated triage for the maintainers. **Merge candidate.** Thanks for answering the request. Head `bf526d7` is rebased onto `63bcca4` with the same lowering as `6ff2361`. `Lower::descriptor_data` (`crates/victory-shader/src/emit/lower.rs`) makes a buffer's size handle through `swap_size_caches`, so no load shares it, and image handles stay shared. The five unit tests moved unchanged into `emit/lower/tests/size_handles.rs`, which the `mod size_handles;` inside `lower.rs`'s test module points to. That keeps `lower.rs` at 522,494 bytes, under the 524,288-byte policy limit. The RX 9070 XT check I asked for is covered twice. MeMako's independent run at `6ff2361` created 25,665 of 25,665 pipelines with no `amdxc64.dll` fault, and your run on this head passed. Linking #2124 and #2517 as refs rather than fixes is the right call. A structured-buffer case in the GPU test would still be a useful follow-up, but it shouldn't block this. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠MeMako on GitHub · 2026-11-26 00:21 UTC · original

Independent RX 9070 XT verification at current head 6ff2361 (AMD Radeon RX 9070 XT adapter 0, driver 32.0.32029.2010, Windows 11 10.0.26200 x64, SDK 10.0.26100.0 dxil.dll).

Tests & CI checks on 6ff2361:

  • cargo clippy --workspace --all-targets --locked -- -D warnings: pass
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: pass
  • cargo test --workspace --locked: pass (victory-shader: 276 passed, 0 failed, 3 ignored — all 6 new tests pass on RX 9070 XT, WARP, and dxil.dll)

Offline pipeline stress test on 6ff2361 (release build, translate --validate --pipelines --jobs 8 on the 1.0.2.1 shader pack, 26,503 containers, 1,134 s):

  • Vertex & pixel: 14,242 / 14,242 pipelines created (14,242 validated)
  • Compute: 2,658 / 2,658 pipelines created (1,910 validated)
  • Mesh: 8,765 / 8,765 pipelines created (8,694 validated)
  • Total: 25,665 / 25,665 emitted shaders compiled into host D3D12 pipelines across 8 concurrent threads with 0 amdxc64.dll+0x861b9f crashes.

Not run on 6ff2361: translate --cache --pipelines library pre-build or a live title run.

Notes before landing on current main (63bcca4):

  • 512 KiB policy limit on lower.rs: A dry-run merge of 6ff2361 with main (63bcca4) auto-merges cleanly, but grows crates/victory-shader/src/emit/lower.rs from 520,563 B to 528,047 B, exceeding xtask/src/policy.rs's 524,288 B limit (repository_passes_policy will fail once rebased/merged). Moving the 5 new unit tests out of lower.rs into a test submodule (leaving the 6th test in stride_tests.rs) would keep it under 512 KiB.
  • Optional test coverage: stride_tests.rs currently tests a raw buffer (Stride::Raw); adding a structured-buffer size+load case (e.g., stride 60) would also cover structured buffers, which hit the same amdxc64.dll+0x861b9f fault on this driver.
  • Related issues: #2124 and #2517 both report the same amdxc64.dll+0x861b9f crash on RX 9070 XT (32.0.32029.2010) and look like candidates to link alongside #1783 and #1785.

No game data, shader names, or screenshots are included, per docs/asset-policy.md. Hardware runs and dry-run merge were performed by me on my RX 9070 XT; comment drafted with Antigravity.

**@⁠MeMako** on GitHub · 2026-11-26 00:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7178674027) Independent RX 9070 XT verification at current head `6ff2361` (AMD Radeon RX 9070 XT adapter 0, driver `32.0.32029.2010`, Windows 11 `10.0.26200` x64, SDK `10.0.26100.0` `dxil.dll`). **Tests & CI checks on `6ff2361`:** - `cargo clippy --workspace --all-targets --locked -- -D warnings`: pass - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: pass - `cargo test --workspace --locked`: pass (`victory-shader`: 276 passed, 0 failed, 3 ignored — all 6 new tests pass on RX 9070 XT, WARP, and `dxil.dll`) **Offline pipeline stress test on `6ff2361`** (release build, `translate --validate --pipelines --jobs 8` on the 1.0.2.1 shader pack, 26,503 containers, 1,134 s): - Vertex & pixel: 14,242 / 14,242 pipelines created (14,242 validated) - Compute: 2,658 / 2,658 pipelines created (1,910 validated) - Mesh: 8,765 / 8,765 pipelines created (8,694 validated) - Total: **25,665 / 25,665** emitted shaders compiled into host D3D12 pipelines across 8 concurrent threads with **0 `amdxc64.dll+0x861b9f` crashes**. Not run on `6ff2361`: `translate --cache --pipelines` library pre-build or a live title run. **Notes before landing on current `main` (`63bcca4`):** - **512 KiB policy limit on `lower.rs`:** A dry-run merge of `6ff2361` with `main` (`63bcca4`) auto-merges cleanly, but grows `crates/victory-shader/src/emit/lower.rs` from `520,563` B to **`528,047` B**, exceeding `xtask/src/policy.rs`'s `524,288` B limit (`repository_passes_policy` will fail once rebased/merged). Moving the 5 new unit tests out of `lower.rs` into a test submodule (leaving the 6th test in `stride_tests.rs`) would keep it under 512 KiB. - **Optional test coverage:** `stride_tests.rs` currently tests a raw buffer (`Stride::Raw`); adding a structured-buffer size+load case (e.g., stride 60) would also cover structured buffers, which hit the same `amdxc64.dll+0x861b9f` fault on this driver. - **Related issues:** #2124 and #2517 both report the same `amdxc64.dll+0x861b9f` crash on RX 9070 XT (`32.0.32029.2010`) and look like candidates to link alongside #1783 and #1785. No game data, shader names, or screenshots are included, per `docs/asset-policy.md`. Hardware runs and dry-run merge were performed by me on my RX 9070 XT; comment drafted with Antigravity.
Author
Owner

@⁠imjustprism on GitHub · 2026-11-26 07:09 UTC · original

rebased onto 63bcca4, the head is bf526d7 now. the five unit tests moved
unchanged to emit/lower/tests/size_handles.rs, so lower.rs is 522,494 bytes
and cargo xtask policy passes. the lowering change is the one from 6ff2361,
line for line. both clippy runs, cargo test --workspace and the policy check
are green on the new head on an rx 9070 xt.

@⁠MeMako thanks for the pipeline run and for catching the size limit. #2124
and #2517 show the same fault address on the same driver, so the description
names them now, as refs and not fixes: i have not checked that they are this
cause. the gpu test still covers a raw buffer only, no structured one.

**@⁠imjustprism** on GitHub · 2026-11-26 07:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#issuecomment-7185163767) rebased onto 63bcca4, the head is bf526d7 now. the five unit tests moved unchanged to emit/lower/tests/size_handles.rs, so lower.rs is 522,494 bytes and cargo xtask policy passes. the lowering change is the one from 6ff2361, line for line. both clippy runs, cargo test --workspace and the policy check are green on the new head on an rx 9070 xt. @⁠MeMako thanks for the pipeline run and for catching the size limit. #2124 and #2517 show the same fault address on the same driver, so the description names them now, as refs and not fixes: i have not checked that they are this cause. the gpu test still covers a raw buffer only, no structured one.
github-bot changed title from query a buffer's size through a handle of its own to Shaders: query a buffer's size through a handle of its own 2026-11-26 09:03:10 +00:00
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 06:40 UTC · original · approved these changes

Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p victory-shader --locked.

149 passed / 0 failed / 2 ignored. Buffer size queried through its own handle (+5 tests) — descriptor-handle-based sizing; biggest test addition of this wave.

**@⁠catminou4** on GitHub · 2026-11-25 06:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#pullrequestreview-6052991725) · **approved these changes** Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p victory-shader --locked`. 149 passed / 0 failed / 2 ignored. Buffer size queried through its own handle (+5 tests) — descriptor-handle-based sizing; biggest test addition of this wave.
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-25 06:46 UTC · original · approved these changes

Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-shader --lib a_buffers_ — 4 passed, 0 failed (a_buffers_size_query_does_not_share_its_handle_with_the_loads, a_buffers_unread_size_shares_the_handle_of_the_loads, etc.)
  • cargo clippy -p victory-shader --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean separation of buffer size-query handles when the buffer size is read as data. Looks good.

AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-25 06:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#pullrequestreview-6053038646) · **approved these changes** Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-shader --lib a_buffers_` — **4 passed, 0 failed** (`a_buffers_size_query_does_not_share_its_handle_with_the_loads`, `a_buffers_unread_size_shares_the_handle_of_the_loads`, etc.) - `cargo clippy -p victory-shader --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean separation of buffer size-query handles when the buffer size is read as data. Looks good. AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 12:40 UTC · original · approved these changes

Reviewed and verified bf526d76:

  • swap_size_caches (crates/victory-shader/src/emit/lower.rs:4256-4262, 4404-4426) cleanly separates size_handles and size_entry_handles for buffer size queries and restores both caches before propagating errors, while keeping image queries on the access handle. Because descriptor_data constructs Source::Loaded, queries stay within those two caches rather than join_handles.
  • emit/lower.rs is 522,494 bytes (1,794 bytes under the 524,288-byte limit).

Local verification: xtask policy (192 files ok), cargo clippy -p victory-shader --all-targets -- -D warnings (default & --all-features), emit::lower::tests (38 passed, including all 5 size_handles tests), and emit::stride_tests (9 passed on VICTORY_WARP=1; 7 passed, 2 failed on RTX 5090 with a_raw_buffers_size_beside_its_loads_reads_its_byte_count passing and the two pre-existing NVIDIA 1M view-heap-cap failures). Adding a structured-buffer GPU readback later would cover element-count queries too. Approve.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 12:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2122#pullrequestreview-6074283233) · **approved these changes** Reviewed and verified `bf526d76`: - `swap_size_caches` (`crates/victory-shader/src/emit/lower.rs:4256-4262, 4404-4426`) cleanly separates `size_handles` and `size_entry_handles` for buffer size queries and restores both caches before propagating errors, while keeping image queries on the access handle. Because `descriptor_data` constructs `Source::Loaded`, queries stay within those two caches rather than `join_handles`. - `emit/lower.rs` is 522,494 bytes (1,794 bytes under the 524,288-byte limit). Local verification: `xtask policy` (`192 files ok`), `cargo clippy -p victory-shader --all-targets -- -D warnings` (default & `--all-features`), `emit::lower::tests` (`38 passed`, including all 5 `size_handles` tests), and `emit::stride_tests` (`9 passed` on `VICTORY_WARP=1`; `7 passed, 2 failed` on RTX 5090 with `a_raw_buffers_size_beside_its_loads_reads_its_byte_count` passing and the two pre-existing NVIDIA 1M view-heap-cap failures). Adding a structured-buffer GPU readback later would cover element-count queries too. Approve.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2122/head:github-bot/gh-2122'
git switch 'github-bot/gh-2122'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2122'
git switch 'github-bot/gh-2122'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2122'
git switch 'github-bot/gh-2122'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2122'
git switch 'main'
git merge --squash 'github-bot/gh-2122'
git switch 'main'
git merge --ff-only 'github-bot/gh-2122'
git switch 'main'
git merge 'github-bot/gh-2122'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

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