Shaders: propagate written heap UAVs and mark glc UAV handles globally coherent #1271

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

@⁠fuzeofficlal on GitHub · 2026-11-24 16:58 UTC · original
fuzeofficlal:fix/shader-uav-globally-coherent-725 → main · +667 −36 · 4 files · 1 commits · open

Fixes #724.
Part of #725.

Summary

  • Written heap-descriptor UAV propagation (#724): Pre-scan Role::Resource descriptor leaves by tracked (param, offset + 4 * first, dynamic) address (written_uavs) so any heap descriptor accessed with a store or atomic operation lowers consistently as a UAV across vector loads, scalar s_buffer_load_dword*, descriptor_data, and separate reloads of the same heap address. Read-only heap descriptors (including glc-only reads without stores or atomics) remain SRVs.
  • IsGloballyCoherent (0x4000) on glc UAV handles (#725): Set 0x1000 | 0x4000 in dx.types.ResourceProperties word 0 whenever uav && cache.glc across buffer (raw, structured, typed), image (image_load, image_store, image_atomic_*), and smem (s_buffer_load_dword*).

Verification

  • emit::lower::tests::heap_uav_inference_and_glc_coherence_set_handle_properties and glc_only_heap_reads_stay_srv_and_table_uavs_are_globally_coherent (dxil.dll validated): verify written-UAV reload propagation, 0x500B / 0x500C / 0x500A / 0x5002 IsGloballyCoherent handle properties, and that read-only glc heap descriptors stay SRVs (0x000B / 0x0002).
  • emit::valu_tests::glc_heap_uav_loads_stores_and_atomics_execute_on_gpu: multi-group ([2, 1, 1]) synthetic compute readback on NVIDIA GeForce RTX 5090 and D3D12 WARP.
  • cargo clippy -p victory-shader --tests --locked -- -D warnings and cargo xtask policy: passed.
**@⁠fuzeofficlal** on GitHub · 2026-11-24 16:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271) `fuzeofficlal:fix/shader-uav-globally-coherent-725` → `main` · +667 −36 · 4 files · 1 commits · open Fixes #724. Part of #725. ### Summary - **Written heap-descriptor UAV propagation (`#724`)**: Pre-scan `Role::Resource` descriptor leaves by tracked `(param, offset + 4 * first, dynamic)` address (`written_uavs`) so any heap descriptor accessed with a `store` or `atomic` operation lowers consistently as a UAV across vector loads, scalar `s_buffer_load_dword*`, `descriptor_data`, and separate reloads of the same heap address. Read-only heap descriptors (including `glc`-only reads without stores or atomics) remain SRVs. - **`IsGloballyCoherent` (`0x4000`) on `glc` UAV handles (`#725`)**: Set `0x1000 | 0x4000` in `dx.types.ResourceProperties` word 0 whenever `uav && cache.glc` across `buffer` (raw, structured, typed), `image` (`image_load`, `image_store`, `image_atomic_*`), and `smem` (`s_buffer_load_dword*`). ### Verification - `emit::lower::tests::heap_uav_inference_and_glc_coherence_set_handle_properties` and `glc_only_heap_reads_stay_srv_and_table_uavs_are_globally_coherent` (`dxil.dll` validated): verify written-UAV reload propagation, `0x500B` / `0x500C` / `0x500A` / `0x5002` `IsGloballyCoherent` handle properties, and that read-only `glc` heap descriptors stay SRVs (`0x000B` / `0x0002`). - `emit::valu_tests::glc_heap_uav_loads_stores_and_atomics_execute_on_gpu`: multi-group (`[2, 1, 1]`) synthetic compute readback on **NVIDIA GeForce RTX 5090** and **D3D12 WARP**. - `cargo clippy -p victory-shader --tests --locked -- -D warnings` and `cargo xtask policy`: passed.
Pre-scan resource descriptors by tracked heap address so any heap descriptor accessed with a store or atomic lowers consistently as a UAV across vector loads, scalar s_buffer_load_dword, and descriptor_data queries, including across reloads (#724). OR IsGloballyCoherent (0x4000) into UAV handle properties when cache.glc is set on buffer, image, or scalar buffer accesses, while keeping read-only glc heap descriptors as SRVs (#725).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:50 +00:00
Author
Owner

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

Setup: Linux, RX 9070 XT, RADV (Mesa 26.3.1), dxil-spirv master, spirv-val 1.3. Your head folded onto a base of origin/main ffe310e plus #1017 (main's host build fails without it: E0425 host_resource), then the four-stage offline check over 768 programs (751-program world dump + 52-program BVH capture, 35 duplicate containers skipped).

translate valid SPIR-V RADV pipeline
base 666 / 768 656 656
your head 666 / 768 656 656

No program gained or lost and the failure table is identical to the base, reason for reason: nothing in this capture reaches the class you handle, so this is a no-regression result only (same 10 SPIR-V validation failures as the base).

Not tested: in-game.

**@⁠pablogonz12** on GitHub · 2026-11-24 17:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7139219646) Setup: Linux, RX 9070 XT, RADV (Mesa 26.3.1), dxil-spirv master, spirv-val 1.3. Your head folded onto a base of origin/main `ffe310e` plus #1017 (main's host build fails without it: `E0425 host_resource`), then the four-stage offline check over 768 programs (751-program world dump + 52-program BVH capture, 35 duplicate containers skipped). | | translate | valid SPIR-V | RADV pipeline | |---|---|---|---| | base | 666 / 768 | 656 | 656 | | your head | 666 / 768 | 656 | 656 | No program gained or lost and the failure table is identical to the base, reason for reason: nothing in this capture reaches the class you handle, so this is a no-regression result only (same 10 SPIR-V validation failures as the base). Not tested: in-game.
Author
Owner

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

#1271 and #1354 compared: same output on a retail dump, small differences in scope

Both PRs fix #724 and #725 (heap UAV inference, IsGloballyCoherent on glc UAV access) and both are based on main ffe310e. I'm not the author of either. I measured them the same way so review can pick one.

Setup: Windows 11, RTX 5080 (driver 32.0.16.2124), Rust 1.98.1 MSVC, dxil.dll 10.0.26100. Offline translation only (no title run, no world).

Retail dump (victory translate --validate --list, plus VICTORY_EMIT_DUMP to keep every emitted shader)

validated vs main DXIL changed vs main
main ffe310e 21,736
#1271 21,736 0 / 0 176 compute programs
#1354 21,736 0 / 0 176 compute programs
  • The two PRs emit byte-identical DXIL for all 21,882 emitted programs. The 176 they change are the same 176, all compute; no vertex, pixel or mesh program changes.
  • In those 176 programs (disassembled with dxc -dumpbin): 0 → 310 handles with IsGloballyCoherent (0x4000); 1,306 → 1,474 handles with IsUAV (0x1000), i.e. 168 SRV handles become UAVs; barrier counts unchanged.
  • Validation counts don't move, as expected: the change is in handle properties, not in which programs are accepted.

Tests

  • cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings: clean on both.
  • cargo test -p victory-shader -p victory-gpu: main 170 passed; #1271 173; #1354 173 (0 failed, 2 ignored each).
  • Cross-check: each PR's new tests run against the other PR's lowering, and all pass:
    • #1354's code + #1271's tests (two DXIL-property tests, and glc_heap_uav_loads_stores_and_atomics_execute_on_gpu on the GPU): 5 of 5 pass.
    • #1271's code + #1354's three DXIL tests: all pass.

Differences the dump doesn't show

None of these changes a program in this title. They matter only for code the dump doesn't contain.

  1. Which glc accesses count. #1271 infers a UAV from glc on untyped buffer access, image_load/stores/atomics without a sampler, and s_buffer_load*, and drops any address that is also sampled. #1354 takes glc from any buffer, image or SMEM instruction, unless a used-resource entry declares the view SRV or CBV. So a glc typed-buffer load, or a sample with glc on an undeclared heap descriptor, would make a UAV in #1354 and not in #1271.
  2. Barrier fence. #1271 also counts inferred UAVs (written or glc) when deciding whether a compute s_barrier gets the global UAV fence. #1354 leaves that decision as it is on main. In the dump every changed program already had the global fence, so the output is the same. A compute program that only spin-waits on a glc heap load, with no declared UAV, would get the fence from #1271 only.
  3. Size. #1271 is +558/−31 with a GPU execution test. #1354 is +299/−71: it also moves used_kind out to a free function, and its tests are DXIL-only.

Taken together: on this title either one gives the same shaders. #1271 was opened first, covers the barrier case and has a hardware test. #1354's refactor of used_kind is neutral. Merging one and closing the other seems the cleanest; whatever #1354 has that #1271 lacks (typed-buffer glc) can be a follow-up if a title needs it.

No game data, shader bytes or shader names are included here; counts come from a local dump. I haven't run either in the world yet. If useful, I can run the 9ef9a9d818b27236 loop-hang A/B from #725 on the 5080.

AI-assisted (Claude Code).

**@⁠wildheathen** on GitHub · 2026-11-24 18:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7140481206) ## #1271 and #1354 compared: same output on a retail dump, small differences in scope Both PRs fix #724 and #725 (heap UAV inference, `IsGloballyCoherent` on `glc` UAV access) and both are based on main `ffe310e`. I'm not the author of either. I measured them the same way so review can pick one. Setup: Windows 11, RTX 5080 (driver 32.0.16.2124), Rust 1.98.1 MSVC, dxil.dll 10.0.26100. Offline translation only (no title run, no world). ### Retail dump (`victory translate --validate --list`, plus `VICTORY_EMIT_DUMP` to keep every emitted shader) | | validated | vs main | DXIL changed vs main | |---|---:|---:|---:| | main `ffe310e` | 21,736 | | | | #1271 | 21,736 | 0 / 0 | 176 compute programs | | #1354 | 21,736 | 0 / 0 | 176 compute programs | - **The two PRs emit byte-identical DXIL for all 21,882 emitted programs.** The 176 they change are the same 176, all compute; no vertex, pixel or mesh program changes. - In those 176 programs (disassembled with `dxc -dumpbin`): 0 → 310 handles with `IsGloballyCoherent` (`0x4000`); 1,306 → 1,474 handles with `IsUAV` (`0x1000`), i.e. 168 SRV handles become UAVs; barrier counts unchanged. - Validation counts don't move, as expected: the change is in handle properties, not in which programs are accepted. ### Tests - `cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings`: clean on both. - `cargo test -p victory-shader -p victory-gpu`: main 170 passed; #1271 173; #1354 173 (0 failed, 2 ignored each). - **Cross-check:** each PR's new tests run against the other PR's lowering, and all pass: - #1354's code + #1271's tests (two DXIL-property tests, and `glc_heap_uav_loads_stores_and_atomics_execute_on_gpu` on the GPU): 5 of 5 pass. - #1271's code + #1354's three DXIL tests: all pass. ### Differences the dump doesn't show None of these changes a program in this title. They matter only for code the dump doesn't contain. 1. **Which `glc` accesses count.** #1271 infers a UAV from `glc` on untyped buffer access, `image_load`/stores/atomics without a sampler, and `s_buffer_load*`, and drops any address that is also sampled. #1354 takes `glc` from any buffer, image or SMEM instruction, unless a used-resource entry declares the view SRV or CBV. So a `glc` typed-buffer load, or a sample with `glc` on an undeclared heap descriptor, would make a UAV in #1354 and not in #1271. 2. **Barrier fence.** #1271 also counts inferred UAVs (written or `glc`) when deciding whether a compute `s_barrier` gets the global UAV fence. #1354 leaves that decision as it is on main. In the dump every changed program already had the global fence, so the output is the same. A compute program that only spin-waits on a `glc` heap load, with no declared UAV, would get the fence from #1271 only. 3. **Size.** #1271 is +558/−31 with a GPU execution test. #1354 is +299/−71: it also moves `used_kind` out to a free function, and its tests are DXIL-only. Taken together: on this title either one gives the same shaders. #1271 was opened first, covers the barrier case and has a hardware test. #1354's refactor of `used_kind` is neutral. Merging one and closing the other seems the cleanest; whatever #1354 has that #1271 lacks (typed-buffer `glc`) can be a follow-up if a title needs it. No game data, shader bytes or shader names are included here; counts come from a local dump. I haven't run either in the world yet. If useful, I can run the `9ef9a9d818b27236` loop-hang A/B from #725 on the 5080. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:20 UTC · original · edited 2026-11-26 00:25 UTC

Automated triage for the maintainers.

Merge candidate. The written-UAV propagation (written_uavs / Lower::is_uav) and IsGloballyCoherent on glc UAV handles (uav_bits) in crates/victory-shader/src/emit/lower.rs are unchanged from the head judged sound before. The second-look point is fixed: Shader::heap_handle (emit/shader.rs) now records texture_index for texture kinds 1-9 whether or not IsUAV is set, and Lower::image sets read marks only for instructions that are not image_store* / image_atomic_*. As a result, a heap-direct image_load of a written descriptor keeps its read mark, and a texture that is only stored gets none. heap_direct_image_load_and_store_keeps_view_read_marks in the new emit/lower/glc_tests.rs covers both cases.

On your reply: confirmed. The branch merges cleanly with current main, and with this PR merged emit/lower.rs is 523,001 bytes, under the 524,288-byte limit in xtask/src/policy.rs. The margin is only about 1.3 KB. #1540 and #1315 also grow this file, so whichever of them lands second will need lower.rs split first. That is a note for ordering, not a blocker for this PR. A blank line was left before the closing } of mod tests. It is cosmetic.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7149447081) · edited 2026-11-26 00:25 UTC <!-- victory-triage v1 head=0dc4320cb315a33a995829f1958db6fe83d7b4c7 verdict=merge-candidate at=2026-11-26T00:25:23Z --> Automated triage for the maintainers. **Merge candidate.** The written-UAV propagation (`written_uavs` / `Lower::is_uav`) and `IsGloballyCoherent` on `glc` UAV handles (`uav_bits`) in `crates/victory-shader/src/emit/lower.rs` are unchanged from the head judged sound before. The second-look point is fixed: `Shader::heap_handle` (`emit/shader.rs`) now records `texture_index` for texture kinds 1-9 whether or not IsUAV is set, and `Lower::image` sets read marks only for instructions that are not `image_store*` / `image_atomic_*`. As a result, a heap-direct `image_load` of a written descriptor keeps its read mark, and a texture that is only stored gets none. `heap_direct_image_load_and_store_keeps_view_read_marks` in the new `emit/lower/glc_tests.rs` covers both cases. On your reply: confirmed. The branch merges cleanly with current `main`, and with this PR merged `emit/lower.rs` is 523,001 bytes, under the 524,288-byte limit in `xtask/src/policy.rs`. The margin is only about 1.3 KB. #1540 and #1315 also grow this file, so whichever of them lands second will need `lower.rs` split first. That is a note for ordering, not a blocker for this PR. A blank line was left before the closing `}` of `mod tests`. It is cosmetic. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 09:50 UTC · original

Updated in 1db404e0 per triage feedback:

  • Removed the unconfirmed glc_uavs rule so untyped heap descriptors that are only read with glc (never stored to or used atomically) stay SRVs instead of risking an SRV/UAV descriptor mismatch at runtime (deferred to a separate follow-up once runtime view evidence is available; updated PR link from Fixes #725 to Part of #725).
  • Kept the two confirmed parts intact: written_uavs propagation across reloads of heap descriptors with stores/atomics (#724) and IsGloballyCoherent (0x4000) on UAV handles accessed with glc.
  • Inverted the glc-only heap test (glc_only_heap_reads_stay_srv_and_table_uavs_are_globally_coherent) to assert that read-only buffer_load_dword glc, s_buffer_load_dword glc, and image_load glc heap handles remain SRVs.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 09:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7158863744) Updated in `1db404e0` per triage feedback: - Removed the unconfirmed `glc_uavs` rule so untyped heap descriptors that are only read with `glc` (never stored to or used atomically) stay SRVs instead of risking an SRV/UAV descriptor mismatch at runtime (deferred to a separate follow-up once runtime view evidence is available; updated PR link from `Fixes #725` to `Part of #725`). - Kept the two confirmed parts intact: `written_uavs` propagation across reloads of heap descriptors with stores/atomics (`#724`) and `IsGloballyCoherent` (`0x4000`) on UAV handles accessed with `glc`. - Inverted the `glc`-only heap test (`glc_only_heap_reads_stay_srv_and_table_uavs_are_globally_coherent`) to assert that read-only `buffer_load_dword glc`, `s_buffer_load_dword glc`, and `image_load glc` heap handles remain SRVs.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:01 UTC · original

Automated triage for the maintainers, second look (a review against main, with the PR built and tested).

This is right (written heap UAVs are propagated, and glc handles are marked globally coherent). The review was of 1db404e0; at the current head the test expectation is already the one main needs. One change is still needed before it can be merged: heap-direct texture loads that now get a UAV handle lose the read mark main gives them (in a probe, view_marks was true on main and false with this PR). In Shader::heap_handle (emit/shader.rs), note texture_index for texture kinds 1-9 whatever the IsUAV bit, or push the mark for UAV texture handles in Lower::image's load path, and add a test that a heap-direct image_load plus image_store of one descriptor still sets view_marks.

Two more things to know. It conflicts with main again in emit/valu_tests.rs after today's merges. And emit/lower.rs is now within a few kilobytes of the repository's 512 KiB file limit (cargo xtask policy), while this PR adds about 12 KB to it, so it can only land once that file has been split.

Push the change and it will be reviewed again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7175841994) Automated triage for the maintainers, second look (a review against `main`, with the PR built and tested). This is right (written heap UAVs are propagated, and `glc` handles are marked globally coherent). The review was of 1db404e0; at the current head the test expectation is already the one `main` needs. One change is still needed before it can be merged: heap-direct texture loads that now get a UAV handle lose the read mark `main` gives them (in a probe, `view_marks` was true on `main` and false with this PR). In `Shader::heap_handle` (`emit/shader.rs`), note `texture_index` for texture kinds 1-9 whatever the IsUAV bit, or push the mark for UAV texture handles in `Lower::image`'s load path, and add a test that a heap-direct `image_load` plus `image_store` of one descriptor still sets `view_marks`. Two more things to know. It conflicts with `main` again in `emit/valu_tests.rs` after today's merges. And `emit/lower.rs` is now within a few kilobytes of the repository's 512 KiB file limit (`cargo xtask policy`), while this PR adds about 12 KB to it, so it can only land once that file has been split. Push the change and it will be reviewed again. Thank you for the contribution.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 22:35 UTC · original

Updated and rebased onto main (f3578e3) in 0dc4320 per second-look feedback:

  • Shader::heap_handle (emit/shader.rs) now records texture_index for all texture kinds 1..=9 regardless of IsUAV, and Lower::image (emit/lower.rs) emits read marks for non-store/non-atomic texture operations so heap-direct image_load on a descriptor that is also stored keeps view_marks = true while store-only texture UAVs keep view_marks = false.
  • Added heap_direct_image_load_and_store_keeps_view_read_marks in emit/lower/glc_tests.rs covering both the load+store (view_marks == true) and store-only (view_marks == false) heap-direct 2D cases with DXIL validation.
  • Split the unit tests into crates/victory-shader/src/emit/lower/glc_tests.rs so emit/lower.rs stays under the 512 KiB policy cap (523,001 bytes; cargo xtask policy: 191 files ok).
  • Re-verified emit::lower::glc_tests (3/3), --features host glc (4/4 on RTX 5090 + WARP), and cargo clippy -p victory-shader --all-targets -- -D warnings (0 warnings).
**@⁠fuzeofficlal** on GitHub · 2026-11-25 22:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7176545918) Updated and rebased onto `main` (`f3578e3`) in `0dc4320` per second-look feedback: - `Shader::heap_handle` (`emit/shader.rs`) now records `texture_index` for all texture kinds `1..=9` regardless of `IsUAV`, and `Lower::image` (`emit/lower.rs`) emits read marks for non-store/non-atomic texture operations so heap-direct `image_load` on a descriptor that is also stored keeps `view_marks = true` while store-only texture UAVs keep `view_marks = false`. - Added `heap_direct_image_load_and_store_keeps_view_read_marks` in `emit/lower/glc_tests.rs` covering both the load+store (`view_marks == true`) and store-only (`view_marks == false`) heap-direct 2D cases with DXIL validation. - Split the unit tests into `crates/victory-shader/src/emit/lower/glc_tests.rs` so `emit/lower.rs` stays under the 512 KiB policy cap (`523,001` bytes; `cargo xtask policy`: 191 files ok). - Re-verified `emit::lower::glc_tests` (3/3), `--features host glc` (4/4 on RTX 5090 + WARP), and `cargo clippy -p victory-shader --all-targets -- -D warnings` (0 warnings).
Author
Owner

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

Heap UAV inference: descriptors written/atomically-modified or accessed with glc (and never sampled) get UAV_PROP, glc ones also GLOBALLY_COHERENT_PROP; sampled descriptors are excluded, image glc counts for stores and image_load only. Same family as #1055/#1015 (descriptor-kind inference) — the three touch neighboring hunks in lower.rs, so merge order will need rebases. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, cargo test -p victory-shader --locked. Shader execution tests (valu_tests/host) are #[cfg(all(test, windows))], so macOS covers lowering/decode/unit tests only. 98 passed, 0 failed (2 lowering tests on macOS; the glc load/store/atomic execution test is Windows-gated).

**@⁠catminou4** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#pullrequestreview-6043854616) · **approved these changes** Heap UAV inference: descriptors written/atomically-modified or accessed with glc (and never sampled) get UAV_PROP, glc ones also GLOBALLY_COHERENT_PROP; sampled descriptors are excluded, image glc counts for stores and image_load only. Same family as #1055/#1015 (descriptor-kind inference) — the three touch neighboring hunks in lower.rs, so merge order will need rebases. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, `cargo test -p victory-shader --locked`. Shader execution tests (valu_tests/host) are `#[cfg(all(test, windows))]`, so macOS covers lowering/decode/unit tests only. 98 passed, 0 failed (2 lowering tests on macOS; the glc load/store/atomic execution test is Windows-gated).
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 14:04 UTC · original

I independently verified 0dc4320 combined with current upstream 63bcca4. For the baseline I added the same three test bodies and the test-only heap-property recorder to main.

  • Baseline: 0/3. The coherent UAV property was absent, and the mixed image load/store produced separate SRV and UAV handles.
  • Integrated head: 3/3. Read-only descriptors use SRVs, the written UAV handles carry the requested coherence bit, and the review's mixed image load/store keeps view_marks. A store-only texture stays free of read marks.
  • WARP 1.0.22 with Agility 1.620.2: the two-group load/store/atomic readback passed. All 36 VALU tests and 33 lowerer tests passed, along with strict shader Clippy and policy.

The tests used synthetic shaders and verified the read-mark case on the current tree.

AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 14:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#issuecomment-7194245355) I independently verified `0dc4320` combined with current upstream `63bcca4`. For the baseline I added the same three test bodies and the test-only heap-property recorder to `main`. - Baseline: **0/3**. The coherent UAV property was absent, and the mixed image load/store produced separate SRV and UAV handles. - Integrated head: **3/3**. Read-only descriptors use SRVs, the written UAV handles carry the requested coherence bit, and the review's mixed image load/store keeps `view_marks`. A store-only texture stays free of read marks. - WARP 1.0.22 with Agility 1.620.2: the two-group load/store/atomic readback passed. All 36 VALU tests and 33 lowerer tests passed, along with strict shader Clippy and policy. The tests used synthetic shaders and verified the read-mark case on the current tree. AI-assisted with Codex.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 19:30 UTC · original · approved these changes

LGTM — verified on RTX 5090 and VICTORY_WARP=1 (Windows / D3D12) against origin/main (63bcca4).

  • Propagating written heap UAVs and marking glc UAV handles globally coherent (while keeping glc-only heap reads as SRVs and preserving view read marks) validates cleanly and executes accurately on both discrete NVIDIA hardware and WARP.
  • cargo test -p victory-shader --lib emit::lower::glc_tests:: -- --test-threads=1: 3 passed, 0 failed.
  • cargo test -p victory-shader --lib emit::valu_tests::glc_heap_uav_loads_stores_and_atomics_execute_on_gpu -- --test-threads=1: passed on RTX 5090 and VICTORY_WARP=1.
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 19:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1271#pullrequestreview-6079562341) · **approved these changes** LGTM — verified on RTX 5090 and `VICTORY_WARP=1` (Windows / D3D12) against `origin/main` (`63bcca4`). - Propagating written heap UAVs and marking `glc` UAV handles globally coherent (while keeping `glc`-only heap reads as SRVs and preserving view read marks) validates cleanly and executes accurately on both discrete NVIDIA hardware and WARP. - `cargo test -p victory-shader --lib emit::lower::glc_tests:: -- --test-threads=1`: 3 passed, 0 failed. - `cargo test -p victory-shader --lib emit::valu_tests::glc_heap_uav_loads_stores_and_atomics_execute_on_gpu -- --test-threads=1`: passed on RTX 5090 and `VICTORY_WARP=1`. - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1271/head:github-bot/gh-1271'
git switch 'github-bot/gh-1271'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1271'
git switch 'github-bot/gh-1271'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1271'
git switch 'github-bot/gh-1271'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1271'
git switch 'main'
git merge --squash 'github-bot/gh-1271'
git switch 'main'
git merge --ff-only 'github-bot/gh-1271'
git switch 'main'
git merge 'github-bot/gh-1271'
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!1271
No description provided.