Shader: key every heap handle cache by element type (#177 on main, fixes the NVIDIA compute-pipeline crash) #2721

Open
andyeox-systemd wants to merge 1 commit from upstream-pr/2723 into main
andyeox-systemd commented 2026-11-25 18:50:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andyeox-systemd on 2026-11-25T18:50:30Z.


Builds on #177 (Ortomanic's fix and gingertonik's test, credited as co-authors), resolved against current main (13f91ca), and extended to the two handle caches main added since.

The bug

When a UAV is read as float and is also the target of an atomic, the lowering reused one float-typed handle for both. After conversion to SPIR-V, the atomic is invalid (AtomicOr / AtomicUMax: expected Result Type to be integer scalar type), and NVIDIA's compiler crashes in vkCreateComputePipelines (0xc0000005 / 0xc000001d in the Unix call). This is the crash in #144.

#177 added the element type (props.1) to the handles key. main has since added entry_handles and join_handles, which had the same problem, so this PR keys those by both property words as well. #177's test is included, with view_marks added for the current Parts.

Testing

RTX 4070 Ti, Arch Linux, nvidia-open-dkms 620.73.04, Wine 11.22, vkd3d-proton built from master (71cae09, dxil-spirv b540c8a). Shaders were dumped with VKD3D_SHADER_DUMP_PATH and checked with spirv-val --target-env vulkan1.3. I used fresh caches for both runs.

main (13f91ca) this PR
Crash in vkCreateComputePipelines yes (0xc0000005) no
Shaders translated 345 831+
Invalid SPIR-V 2 (AtomicOr, AtomicUMax on a non-integer) 0 of 1,277
Reached loading screen the first cutscene (subtitles, lights; the 3D scene is black as in other reports), at 0.2 to 0.7 fps

cargo test -p victory-shader --lib on Linux (with the Windows-only validator blocks compiled out locally): 159 passed, 0 failed, against 158 on main. The extra one is #177's test.

Separate vkd3d-proton issue

On vkd3d-proton 3.1 and earlier, the title crashes earlier for a different reason. dxil-spirv's old structurizer emits invalid control flow for three shaders ("Function end cannot be called in blocks", "block exits the loop headed by…"). Microsoft's dxv accepts our DXIL for all three, so that's not a VIctory bug. It is fixed by dxil-spirv's structurizer rewrite, which is in vkd3d-proton master and not in 3.1. NVIDIA under Wine needs both fixes.

AI-assisted. No game data is included.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5497226564 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723). Originally posted by [andyeox-systemd](https://github.com/andyeox-systemd) on 2026-11-25T18:50:30Z. --- Builds on #177 (Ortomanic's fix and gingertonik's test, credited as co-authors), resolved against current `main` (`13f91ca`), and extended to the two handle caches `main` added since. ## The bug When a UAV is read as float and is also the target of an atomic, the lowering reused one float-typed handle for both. After conversion to SPIR-V, the atomic is invalid (`AtomicOr` / `AtomicUMax: expected Result Type to be integer scalar type`), and NVIDIA's compiler crashes in `vkCreateComputePipelines` (`0xc0000005` / `0xc000001d` in the Unix call). This is the crash in #144. #177 added the element type (`props.1`) to the `handles` key. `main` has since added `entry_handles` and `join_handles`, which had the same problem, so this PR keys those by both property words as well. #177's test is included, with `view_marks` added for the current `Parts`. ## Testing RTX 4070 Ti, Arch Linux, `nvidia-open-dkms` 620.73.04, Wine 11.22, **vkd3d-proton built from master** (`71cae09`, dxil-spirv `b540c8a`). Shaders were dumped with `VKD3D_SHADER_DUMP_PATH` and checked with `spirv-val --target-env vulkan1.3`. I used fresh caches for both runs. | | `main` (`13f91ca`) | this PR | |---|---|---| | Crash in `vkCreateComputePipelines` | yes (`0xc0000005`) | **no** | | Shaders translated | 345 | 831+ | | Invalid SPIR-V | 2 (`AtomicOr`, `AtomicUMax` on a non-integer) | **0 of 1,277** | | Reached | loading screen | the first cutscene (subtitles, lights; the 3D scene is black as in other reports), at 0.2 to 0.7 fps | `cargo test -p victory-shader --lib` on Linux (with the Windows-only validator blocks compiled out locally): 159 passed, 0 failed, against 158 on `main`. The extra one is #177's test. ## Separate vkd3d-proton issue On vkd3d-proton 3.1 and earlier, the title crashes earlier for a different reason. dxil-spirv's old structurizer emits invalid control flow for three shaders ("Function end cannot be called in blocks", "block exits the loop headed by…"). Microsoft's `dxv` accepts our DXIL for all three, so that's not a VIctory bug. It is fixed by dxil-spirv's structurizer rewrite, which is in vkd3d-proton master and not in 3.1. NVIDIA under Wine needs both fixes. AI-assisted. No game data is included.
kotekompotek commented 2026-11-25 19:06:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:59:20Z.


Correct root cause and fix: one UAV read as float and targeted by an atomic legitimately needs two annotated handles (atomic requires integer component type), and caching by props.0 alone collapsed them. Extending the key to props.1 across all three caches (handles, entry_handles, join_handles) is the complete version of #177's fix. The test constructs the exact shape (image_load + image_atomic_umin, same descriptor) and asserts the two distinct annotations. Hardware-verified against the actual crash.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171671132 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7171671132). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T18:59:20Z. --- Correct root cause and fix: one UAV read as float and targeted by an atomic legitimately needs two annotated handles (atomic requires integer component type), and caching by props.0 alone collapsed them. Extending the key to props.1 across all three caches (handles, entry_handles, join_handles) is the complete version of #177's fix. The test constructs the exact shape (image_load + image_atomic_umin, same descriptor) and asserts the two distinct annotations. Hardware-verified against the actual crash.
DrDarkDK commented 2026-11-25 19:06:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T19:06:10Z.


The float-load/atomic regression uses one fixed table entry, so it exercises entry_handles. The fixture would still pass if props.1 were removed from the handles or join_handles key.

Could you add a uniform dynamic-offset case for handles and a case where the descriptor is selected at a control-flow join for join_handles? Each should fail if only its corresponding cache key drops props.1.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171821526 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7171821526). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T19:06:10Z. --- The float-load/atomic regression uses one fixed table entry, so it exercises `entry_handles`. The fixture would still pass if `props.1` were removed from the `handles` or `join_handles` key. Could you add a uniform dynamic-offset case for `handles` and a case where the descriptor is selected at a control-flow join for `join_handles`? Each should fail if only its corresponding cache key drops `props.1`. *AI-assisted with Codex.*
fuzeofficlal commented 2026-11-25 20:06:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:32:19Z.


Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP + dxil.dll verification and code review of 235c48c6 (on 13f91ca):

Verification (rustc 1.98.1 MSVC, Windows SDK 10.0.26100.0 dxil.dll)

  • cargo xtask policy: 184 files ok.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings and --features host: 0 warnings.
  • cargo test --locked -p victory-shader --features host --lib -- an_image_read_as_float_and_by_an_atomic_is_annotated_twice: 1 passed, 0 failed.
  • cargo test --locked -p victory-shader --features host --lib -- emit::valu_tests --test-threads=1 (RTX 5090 hardware + WARP + dxil.dll): 30 passed, 0 failed.

Review Notes

  • All three descriptor heap handle caches (entry_handles, handles, and join_handles) now include props.1 (component type/count), avoiding redundant handle creation for raw/structured/CBV/sampler handles (props.1 == 0) while splitting mixed float/integer typed accesses on the same descriptor.
  • Cleanly non-overlapping with #2610 and #2668. (Echoing @DrDarkDK's minor test note: adding cases that hit handles and join_handles would pin all three caches, though the production code already updates all three.)
<!-- greyfinch-sync:Marvisak/VIctory:comment:7172435333 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7172435333). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T19:32:19Z. --- Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP + `dxil.dll` verification and code review of `235c48c6` (on `13f91ca`): ### Verification (`rustc 1.98.1` MSVC, Windows SDK `10.0.26100.0` `dxil.dll`) - `cargo xtask policy`: **184 files ok**. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` and `--features host`: **0 warnings**. - `cargo test --locked -p victory-shader --features host --lib -- an_image_read_as_float_and_by_an_atomic_is_annotated_twice`: **1 passed, 0 failed**. - `cargo test --locked -p victory-shader --features host --lib -- emit::valu_tests --test-threads=1` (RTX 5090 hardware + WARP + `dxil.dll`): **30 passed, 0 failed**. ### Review Notes - All three descriptor heap handle caches (`entry_handles`, `handles`, and `join_handles`) now include `props.1` (component type/count), avoiding redundant handle creation for raw/structured/CBV/sampler handles (`props.1 == 0`) while splitting mixed float/integer typed accesses on the same descriptor. - Cleanly non-overlapping with #2610 and #2668. (Echoing @DrDarkDK's minor test note: adding cases that hit `handles` and `join_handles` would pin all three caches, though the production code already updates all three.)
pablogonz12 commented 2026-11-25 20:06:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-25T19:41:11Z.


AMD/RADV offline check of the head commit (no game run).

  • Hardware / stack: RX 9070 XT, Mesa 26.3.1 RADV, GE-Proton11-14; base = origin/main 13f91caee.
  • Method: the 751-program world-shader dump, translated by each tree's own victory-shader --example retranslate, then dxil-spirv (master), spirv-val --target-env vulkan1.3, and a real vkCreateCompute/GraphicsPipelines on RADV (vkpipe, one process per program, so a driver crash or hang is recorded per program rather than stopping the batch).
  • Offline only: pipelines are created, never bound or drawn, so wrong pixels and ISA-level miscompiles are out of reach here.
    Result, base 13f91caee vs head 235c48c68: both translate 749 / 751 (the same 2 refused in both trees, a lane mask read as data is not supported).

18 programs' DXIL bytes change — 12 pixel, 6 compute — and this PR is the difference between "the host rejects the shader" and a working pipeline:

base 13f91caee head 235c48c68
spirv-val on those 18 fails, OpAtomicUMax/OpAtomicIAdd with a %float result type passes
RADV pipeline none created ok, 30.8–445.9 ms each

Examples: compute-11bbed94ee7a3243 base error: line 352: AtomicUMax: expected Result Type to be integer scalar type %297 = OpAtomicUMax %float ...; pixel-15c34c906ac8b908 base AtomicIAdd: expected Result Type to be integer scalar type. Head translates the same programs into integer atomics and all 18 build.

The other 731 translated programs are byte-identical to main, so nothing else moves. Worth mentioning in the description: on main these 18 shaders produce SPIR-V that validation refuses, i.e. any pipeline that uses them cannot be created at all.

Not tested in a game run; not tested on NVIDIA.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172633137 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7172633137). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-25T19:41:11Z. --- AMD/RADV offline check of the head commit (no game run). - Hardware / stack: RX 9070 XT, Mesa 26.3.1 RADV, GE-Proton11-14; base = `origin/main` 13f91caee. - Method: the 751-program world-shader dump, translated by each tree's own `victory-shader --example retranslate`, then dxil-spirv (master), `spirv-val --target-env vulkan1.3`, and a real `vkCreateCompute/GraphicsPipelines` on RADV (`vkpipe`, one process per program, so a driver crash or hang is recorded per program rather than stopping the batch). - Offline only: pipelines are created, never bound or drawn, so wrong pixels and ISA-level miscompiles are out of reach here. **Result, base 13f91caee vs head 235c48c68:** both translate **749 / 751** (the same 2 refused in both trees, `a lane mask read as data is not supported`). **18 programs' DXIL bytes change** — 12 pixel, 6 compute — and this PR is the difference between "the host rejects the shader" and a working pipeline: | | base 13f91caee | head 235c48c68 | |---|---|---| | spirv-val on those 18 | fails, `OpAtomicUMax`/`OpAtomicIAdd` with a `%float` result type | passes | | RADV pipeline | none created | ok, 30.8–445.9 ms each | Examples: `compute-11bbed94ee7a3243` base `error: line 352: AtomicUMax: expected Result Type to be integer scalar type %297 = OpAtomicUMax %float ...`; `pixel-15c34c906ac8b908` base `AtomicIAdd: expected Result Type to be integer scalar type`. Head translates the same programs into integer atomics and all 18 build. The other 731 translated programs are byte-identical to main, so nothing else moves. Worth mentioning in the description: on main these 18 shaders produce SPIR-V that validation refuses, i.e. any pipeline that uses them cannot be created at all. Not tested in a game run; not tested on NVIDIA.
oni-swr commented 2026-11-25 20:06:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T19:41:37Z.


Independent WARP/CPU verification for head 235c48c682 against origin/main 13f91caee2. State check: open, non-draft, clean merge-tree; no oni-swr comment found.

Environment: Windows x64, Rust 1.98.1 (48a229cea 2026-09-01), Windows SDK dxil.dll 10.0.26100.0 (file version 1.8.2502.11); WARP/D3D12 WARP env vars set; CARGO_TARGET_DIR=D:\victory-warp-2720-target.

Commands/results:

  • Baseline: cargo test --locked -p victory-shader --lib — 267 passed, 3 failed, 3 ignored; cargo clippy --locked -p victory-shader --all-targets -- -D warnings — pass.
  • PR: cargo test --locked -p victory-shader emit::lower::tests::an_image_read_as_float_and_by_an_atomic_is_annotated_twice — 1 passed; cargo test --locked -p victory-shader --lib — 268 passed, 3 failed, 3 ignored; strict Clippy — pass.
  • The same three pre-existing WARP failures occur on baseline and PR: a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_read_the_lane_named_and_zero_from_lanes_left_out.
  • Negative control: reverted the properties from all three cache keys (handles, entry_handles, join_handles); the regression test failed because the atomic U32 annotation disappeared.

Review: no production blocker found. The regression test proves the float/U32 annotations coexist. It exercises the fixture’s actual cache path; the three cache-key edits are otherwise not independently isolated by separate fixtures.

Not tested: physical GPU, retail title/game behavior, release build. AI disclosure: Codex (gpt-6-luna).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172642381 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7172642381). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T19:41:37Z. --- Independent WARP/CPU verification for head 235c48c6827171084ec7215de92f974c9f1a7c5b against origin/main 13f91caee25f2fdf2c062be5f7a27f058e51cbca. State check: open, non-draft, clean merge-tree; no oni-swr comment found. Environment: Windows x64, Rust 1.98.1 (48a229cea 2026-09-01), Windows SDK dxil.dll 10.0.26100.0 (file version 1.8.2502.11); WARP/D3D12 WARP env vars set; CARGO_TARGET_DIR=D:\victory-warp-2720-target. Commands/results: - Baseline: cargo test --locked -p victory-shader --lib — 267 passed, 3 failed, 3 ignored; cargo clippy --locked -p victory-shader --all-targets -- -D warnings — pass. - PR: cargo test --locked -p victory-shader emit::lower::tests::an_image_read_as_float_and_by_an_atomic_is_annotated_twice — 1 passed; cargo test --locked -p victory-shader --lib — 268 passed, 3 failed, 3 ignored; strict Clippy — pass. - The same three pre-existing WARP failures occur on baseline and PR: a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_read_the_lane_named_and_zero_from_lanes_left_out. - Negative control: reverted the properties from all three cache keys (handles, entry_handles, join_handles); the regression test failed because the atomic U32 annotation disappeared. Review: no production blocker found. The regression test proves the float/U32 annotations coexist. It exercises the fixture’s actual cache path; the three cache-key edits are otherwise not independently isolated by separate fixtures. Not tested: physical GPU, retail title/game behavior, release build. AI disclosure: Codex (gpt-6-luna).
Kajanos commented 2026-11-25 21:03:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Kajanos on 2026-11-25T20:43:28Z.


NVIDIA + vkd3d-proton unit-test run, head 235c48c682 merged onto main 13f91caee2.

Setup: Linux (Gentoo) / wine-proton 11.0.3 / vkd3d-proton 3.1, RTX 5080, NVIDIA 620.73.04; cross-built with cargo-xwin, rustc 1.98.1, dxil.dll from DXC v1.9.2609.

  • cargo xwin test -p victory-shader: 268 passed, 3 failed, 3 ignored. main gives 267 passed with the same 3 failures, so the new test passes and nothing else changed.
  • The 3 failures also fail on main in this environment, so they come from vkd3d-proton/Wine and not from this PR:
    • emit::tests::stub_pipeline_is_created (a zero digest is accepted)
    • semantics_tests::rounding_matches_the_hardware (v_fract_f32 on negative denormals)
    • stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros (dispatch fails with "Invalid parameter")

Not run: the retail title. The #144 world-load crash itself is not reproduced or verified here.

AI-assisted (Claude Code)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174097916 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7174097916). Originally posted by [Kajanos](https://github.com/Kajanos) on 2026-11-25T20:43:28Z. --- **NVIDIA + vkd3d-proton unit-test run**, head `235c48c682` merged onto `main` `13f91caee2`. Setup: Linux (Gentoo) / wine-proton 11.0.3 / vkd3d-proton 3.1, RTX 5080, NVIDIA 620.73.04; cross-built with cargo-xwin, rustc 1.98.1, `dxil.dll` from DXC v1.9.2609. - `cargo xwin test -p victory-shader`: 268 passed, 3 failed, 3 ignored. `main` gives 267 passed with the same 3 failures, so the new test passes and nothing else changed. - The 3 failures also fail on `main` in this environment, so they come from vkd3d-proton/Wine and not from this PR: - `emit::tests::stub_pipeline_is_created` (a zero digest is accepted) - `semantics_tests::rounding_matches_the_hardware` (`v_fract_f32` on negative denormals) - `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` (dispatch fails with "Invalid parameter") Not run: the retail title. The #144 world-load crash itself is not reproduced or verified here. AI-assisted (Claude Code)
neonbyte1 commented 2026-11-25 23:06:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-25T22:35:44Z.


Tested on an RTX 5090 (driver 620.73.04) under Linux: Wine 11.22, vkd3d-proton 3.1-83 (GE-Proton11-14) and vkd3d-proton master ec207194, DXVK dxgi, diagnostics build.

Base: main at 13f91ca with this PR, #1129 (pipeline worker stack), the one-line #747 heap change, and a constant-table fix equivalent to #2143.

  • With this PR: three runs of 6–7 minutes each, no device loss and no crash. All three reach gameplay (frames 1497, 1659 and 1734): two on vkd3d-proton 3.1-83, one on master. Lit windows and lines show on screen.
  • Without it: with only my earlier single-cache fix from #177, on main 940d32f with the same other fixes, the run hits an NVIDIA MMU fault (Xid 13) at world entry, at frame 1349. The two bases differ by 83 main commits besides this PR, so that comparison isn't fully isolated.
  • Pipeline creation: with this PR, vkCreateComputePipelines no longer crashes on 76c35de1c2444e67 (CS_Primary_EstimateProbeShadingChange), on either vkd3d-proton.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176556635 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7176556635). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-25T22:35:44Z. --- Tested on an RTX 5090 (driver 620.73.04) under Linux: Wine 11.22, vkd3d-proton 3.1-83 (GE-Proton11-14) and vkd3d-proton master `ec207194`, DXVK `dxgi`, diagnostics build. Base: `main` at `13f91ca` with this PR, #1129 (pipeline worker stack), the one-line #747 heap change, and a constant-table fix equivalent to #2143. - **With this PR:** three runs of 6–7 minutes each, no device loss and no crash. All three reach gameplay (frames 1497, 1659 and 1734): two on vkd3d-proton 3.1-83, one on master. Lit windows and lines show on screen. - **Without it:** with only my earlier single-cache fix from #177, on `main` `940d32f` with the same other fixes, the run hits an NVIDIA MMU fault (Xid 13) at world entry, at frame 1349. The two bases differ by 83 `main` commits besides this PR, so that comparison isn't fully isolated. - **Pipeline creation:** with this PR, `vkCreateComputePipelines` no longer crashes on `76c35de1c2444e67` (`CS_Primary_EstimateProbeShadingChange`), on either vkd3d-proton. _AI-assisted (Claude); measured on my machine, no game data shared._
Marvisak commented 2026-11-26 00:03:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T23:19:59Z.


Automated triage for the maintainers.

Merge candidate. Now merges cleanly. The element type (props.1) joins the keys of all three handle caches in emit/lower.rs (handles, entry_handles, join_handles), so a UAV read as float and used by an atomic gets its own integer-typed annotation, matching D3D12's rule that atomics need integer UAVs; raw, structured, CBV and sampler handles have props.1 == 0 and are unchanged, consistent with 731 of 749 programs coming out byte-identical. The test covers only entry_handles; the handles/join_handles cases offered on your fork would be worth folding in. This supersedes #177.

CI: not run yet on this head.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7177419281 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7177419281). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T23:19:59Z. --- <!-- victory-triage v1 head=38f3697801be71060ed2dd1fa65f37c56386e779 verdict=merge-candidate at=2026-11-26T04:23:55Z --> Automated triage for the maintainers. **Merge candidate.** Now merges cleanly. The element type (`props.1`) joins the keys of all three handle caches in `emit/lower.rs` (`handles`, `entry_handles`, `join_handles`), so a UAV read as float and used by an atomic gets its own integer-typed annotation, matching D3D12's rule that atomics need integer UAVs; raw, structured, CBV and sampler handles have `props.1 == 0` and are unchanged, consistent with 731 of 749 programs coming out byte-identical. The test covers only `entry_handles`; the `handles`/`join_handles` cases offered on your fork would be worth folding in. This supersedes #177. CI: not run yet on this head. --- _Generated by [Claude Code](https://claude.ai/code)_
Anzymanz commented 2026-11-26 01:04:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-26T00:40:00Z.


From a tester working with Claude (AI-assisted, Claude Code). Two things: a crash this fixes on AMD/Linux that isn't in the description yet, and a rebase onto main.

Crash. Under vkd3d-proton (GE's 3.2 and master 71cae09) on an RX 9070 XT, the title ends with terminate called without an active exception about 90 s into the world. A colleague traced it to dxil-spirv: fixup_load_type_typed (opcode 66, TextureLoad) sees an image it has marked 64-bit, because of an atomicBinOp.i64 on the same handle, loaded as float, and cast<IntegerType> aborts the whole process. In the dumped DXIL, one handle annotated RWTexture2D<4xF32> (props 0x1002, 0x409) takes both the textureLoad.f32 and the 64-bit image atomic. That's this PR's bug: the atomic's 0x105 handle collapses into the load's.

Whole-corpus check (all 25,889 distinct containers of the title's shader archive, translated offline through translate_with, main + this change against main):

  • translated / refused: 25,669 / 220 on both sides, so nothing new refused;
  • 1,025 programs' output changes, 679 of them with 64-bit typed atomics;
  • every changed program's DXIL through native dxil-spirv (master): before, 2 fail with exactly that error (b6df66af105d8b2d, edc43d3e658a4b9d, both compute, the dump's shape; master with a local guard reports Typed load of a 64-bit resource into a non-integer type is not supported where 3.2 aborts); after, all 1,025 convert.

Rebase. The conflict with main is only test-side: Lowered's #[cfg(test)] fields and the test module, where main added uses_lane_index, has_half_wave_mask and ds_bpermute_wave64_preserves_32_lane_half next to this PR's additions. Keeping both sides resolves it. I have it as one commit on main 63bcca4: https://github.com/Anzymanz/VIctory/tree/handle-key-2723-on-main (8281e38). Its diff is line for line yours. cargo check is clean and an_image_read_as_float_and_by_an_atomic_is_annotated_twice passes. @andyeox-systemd, feel free to take it as is or redo it yourself.

No game data: hashes, counts and error text only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7178991312 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7178991312). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-26T00:40:00Z. --- From a tester working with Claude (AI-assisted, Claude Code). Two things: a crash this fixes on AMD/Linux that isn't in the description yet, and a rebase onto main. **Crash.** Under vkd3d-proton (GE's 3.2 and master `71cae09`) on an RX 9070 XT, the title ends with `terminate called without an active exception` about 90 s into the world. A colleague traced it to dxil-spirv: `fixup_load_type_typed` (opcode 66, TextureLoad) sees an image it has marked 64-bit, because of an `atomicBinOp.i64` on the same handle, loaded as float, and `cast<IntegerType>` aborts the whole process. In the dumped DXIL, one handle annotated `RWTexture2D<4xF32>` (props `0x1002`, `0x409`) takes both the `textureLoad.f32` and the 64-bit image atomic. That's this PR's bug: the atomic's `0x105` handle collapses into the load's. **Whole-corpus check** (all 25,889 distinct containers of the title's shader archive, translated offline through `translate_with`, main + this change against main): - translated / refused: 25,669 / 220 on both sides, so nothing new refused; - 1,025 programs' output changes, 679 of them with 64-bit typed atomics; - every changed program's DXIL through native dxil-spirv (master): before, 2 fail with exactly that error (`b6df66af105d8b2d`, `edc43d3e658a4b9d`, both compute, the dump's shape; master with a local guard reports `Typed load of a 64-bit resource into a non-integer type is not supported` where 3.2 aborts); after, all 1,025 convert. **Rebase.** The conflict with main is only test-side: `Lowered`'s `#[cfg(test)]` fields and the test module, where main added `uses_lane_index`, `has_half_wave_mask` and `ds_bpermute_wave64_preserves_32_lane_half` next to this PR's additions. Keeping both sides resolves it. I have it as one commit on main `63bcca4`: https://github.com/Anzymanz/VIctory/tree/handle-key-2723-on-main (`8281e38`). Its diff is line for line yours. `cargo check` is clean and `an_image_read_as_float_and_by_an_atomic_is_annotated_twice` passes. @andyeox-systemd, feel free to take it as is or redo it yourself. No game data: hashes, counts and error text only.
necrobytes commented 2026-11-26 02:07:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by necrobytes on 2026-11-26T01:28:16Z.


I sent the two requested regression tests directly to this branch in andyeox-systemd/VIctory#1. All 30 shader-lowering tests passed on this PR head. Removing the element type from either cache key made just its corresponding test fail.

I tested the cache-key change on an RX 9060 XT with RADV 26.2.7 and vkd3d-proton 3.2.0. I compared 63bcca43 with the same revision plus the production changes from 235c48c6. One input came from the compiler abort discussed above. The other corresponds to the Strix Halo report on #714. Each isolated test used one compute shader, one worker and a fresh driver cache. I checked that the baseline DXIL matched the bytes cached by the failing game runs.

D3D12 compute pipelines created Stock Proton Experimental wineserver Same client, view-lookup-patched wineserver
Main, two affected inputs 0/2 0/2
Main + this PR, same inputs 2/2 2/2
Main + this PR, two controls 2/2 2/2

Main exited with code 3 in all four affected cases. Microsoft’s DXIL validator accepted both affected shaders before and after the change. The difference showed up during D3D12 pipeline creation.

I also ran the game with #1722 and this change together. It created the second affected pipeline and presented another 35 frames. The run completed the planned 110 seconds after the world marker and reached the opening credits. The first affected pipeline was exercised only in the isolated test.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179804197 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7179804197). Originally posted by [necrobytes](https://github.com/necrobytes) on 2026-11-26T01:28:16Z. --- I sent the two requested regression tests directly to this branch in [andyeox-systemd/VIctory#1](https://github.com/andyeox-systemd/VIctory/pull/1). All 30 shader-lowering tests passed on this PR head. Removing the element type from either cache key made just its corresponding test fail. I tested the cache-key change on an RX 9060 XT with RADV 26.2.7 and vkd3d-proton 3.2.0. I compared `63bcca43` with the same revision plus the production changes from `235c48c6`. One input came from the compiler abort discussed above. The other corresponds to [the Strix Halo report on #714](https://github.com/Marvisak/VIctory/issues/714#issuecomment-7168484625). Each isolated test used one compute shader, one worker and a fresh driver cache. I checked that the baseline DXIL matched the bytes cached by the failing game runs. | D3D12 compute pipelines created | Stock Proton Experimental wineserver | Same client, view-lookup-patched wineserver | |---|---:|---:| | Main, two affected inputs | 0/2 | 0/2 | | Main + this PR, same inputs | 2/2 | 2/2 | | Main + this PR, two controls | 2/2 | 2/2 | Main exited with code 3 in all four affected cases. Microsoft’s DXIL validator accepted both affected shaders before and after the change. The difference showed up during D3D12 pipeline creation. I also ran the game with #1722 and this change together. It created the second affected pipeline and presented another 35 frames. The run completed the planned 110 seconds after the world marker and reached the opening credits. The first affected pipeline was exercised only in the isolated test. AI-assisted with Codex.
Dukestar69 commented 2026-11-26 04:26:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T04:26:59Z.

Review: COMMENTED


Tested merged onto origin/main (63bcca4) on Windows 11 x64:

  • cargo test -p victory-shader --lib emit::lower::tests: 34 passed, 0 failed (including new an_image_read_as_float_and_by_an_atomic_is_annotated_twice).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: FAIL — adding the new test inline in lower.rs pushes it 282 bytes past the 512 KiB policy limit on current main (63bcca4):
    POLICY: crates/victory-shader/src/emit/lower.rs: 524570 bytes exceeds the 524288-byte limit
    

Moving the new test into a submodule under crates/victory-shader/src/emit/lower/ will clear the xtask policy gate cleanly.

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

<!-- greyfinch-sync:Marvisak/VIctory:review:6068547526 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#pullrequestreview-6068547526). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T04:26:59Z. **Review:** COMMENTED --- Tested merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - `cargo test -p victory-shader --lib emit::lower::tests`: **34 passed, 0 failed** (including new `an_image_read_as_float_and_by_an_atomic_is_annotated_twice`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: **FAIL** — adding the new test inline in `lower.rs` pushes it 282 bytes past the 512 KiB policy limit on current `main` (`63bcca4`): ``` POLICY: crates/victory-shader/src/emit/lower.rs: 524570 bytes exceeds the 524288-byte limit ``` Moving the new test into a submodule under `crates/victory-shader/src/emit/lower/` will clear the `xtask policy` gate cleanly. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
ntgata1-dotcom commented 2026-11-26 06:03:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ntgata1-dotcom on 2026-11-26T05:19:48Z.


This head fails the asset-policy check. cargo xtask policy on 38f3697:

POLICY: crates/victory-shader/src/emit/lower.rs: 524570 bytes exceeds the 524288-byte limit

main's copy is 520,563 bytes, so this PR's additions take it 282 bytes over. CI hasn't run on this PR yet, which is probably why it hasn't shown. cargo test runs the same check (repository_passes_policy).

Moving an_image_read_as_float_and_by_an_atomic_is_annotated_twice and its mimg_2d helper into a test module of their own under emit/ (as the *_tests.rs modules there are) brings the file back under, with room for necrobytes' tests from andyeox-systemd/VIctory#1. #2977 also grows lower.rs: with both, it comes to 527,667 bytes.

AI-assisted (Claude Code); checked on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7183388654 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7183388654). Originally posted by [ntgata1-dotcom](https://github.com/ntgata1-dotcom) on 2026-11-26T05:19:48Z. --- **This head fails the asset-policy check.** `cargo xtask policy` on `38f3697`: ``` POLICY: crates/victory-shader/src/emit/lower.rs: 524570 bytes exceeds the 524288-byte limit ``` `main`'s copy is 520,563 bytes, so this PR's additions take it 282 bytes over. CI hasn't run on this PR yet, which is probably why it hasn't shown. `cargo test` runs the same check (`repository_passes_policy`). Moving `an_image_read_as_float_and_by_an_atomic_is_annotated_twice` and its `mimg_2d` helper into a test module of their own under `emit/` (as the `*_tests.rs` modules there are) brings the file back under, with room for necrobytes' tests from andyeox-systemd/VIctory#1. #2977 also grows `lower.rs`: with both, it comes to 527,667 bytes. AI-assisted (Claude Code); checked on my machine.
ClosetPie107 commented 2026-11-26 09:06:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ClosetPie107 on 2026-11-26T09:04:23Z.


Tested on the retail title under Proton: this PR fixes the dxil-spirv abort from #3101, both offline and in-game.

Stack

  • AMD Radeon RX 9070 (RDNA4, gfx1201), Ryzen 5 9600X, 32 GB RAM
  • CachyOS, kernel 7.3.5, Mesa 26.3.1 (RADV)
  • Proton Experimental experimental-11.0-20261112 (Wine 11, ntsync), DXVK 3.1.1 dxgi
  • vkd3d-proton master ec207194 (3.2.0) with dxil-spirv master b540c8a2, built locally (-Db_ndebug=true)
  • Microsoft d3dcompiler_47 in the prefix (the indirect clamp still needs it on main, #170)
  • VIctory main 63bcca4, merged with this PR (38f3697), cross-built for x86_64-pc-windows-gnu; Series X files, 1.0.2.1

Offline (dxil-spirv b540c8a2 CLI, --bindless --enable-shader-demote --ssbo-uav --ssbo-srv --bindless-typed-buffer-offsets, run on every module translate --list emits)

main main + #2723
modules that abort 2: smh_draw_64 and smh_draw_128 CS_VisHair_969c6f85 (Invalid type ID in cast<T> in fixup_load_type_typed, exit 134) 0
CS_VisHair UAV handles one {4098, 1033} used by textureLoad.f32 and atomicBinOp.i64 {4098, 1033} for the load, {4098, 261} for the atomic
DXC 1.9 dxil.dll validator 24,937 validated 24,937 validated

In-game

  • translate --cache --pipelines completes: 27,135 pipelines made in 219 s, no abort (on main it dies around pipeline 1,200, as in #3101).
  • World run without any VICTORY_SKIP_PIPELINES, warm caches: CS_VisHair (b6df66af105d8b2d) gets its host pipeline and runs. The intro cutscene plays and the run reaches the prologue (prison scene), lit, with characters and hair. 25 minutes, ended by my time cap, with no crash or device removal. About 1 fps in the cutscene, a steady 2.9–3.3 fps in the prologue, about 12.7 GB of VRAM.
  • On main, the same setup ended about 10 minutes in when vkd3d-proton hit this abort (terminate called without an active exception, exit 3). With VICTORY_SKIP_PIPELINES=b6df66af105d8b2d instead, the title crashed about 8 minutes in at +0xb6fb9, reading 0xffffffffffffffff, with f16 infinities in rax. That did not happen with this PR, so it may have come from the skipped hair pass. Unconfirmed.

Still visible with this PR: blocky bands over the lower part of some shots, and 76–264 draws a frame dropped for untranslated shaders. These look unrelated.

No game files attached. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7187377830 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7187377830). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-26T09:04:23Z. --- Tested on the retail title under Proton: this PR fixes the dxil-spirv abort from #3101, both offline and in-game. **Stack** - AMD Radeon RX 9070 (RDNA4, gfx1201), Ryzen 5 9600X, 32 GB RAM - CachyOS, kernel 7.3.5, Mesa 26.3.1 (RADV) - Proton Experimental `experimental-11.0-20261112` (Wine 11, ntsync), DXVK 3.1.1 `dxgi` - vkd3d-proton master `ec207194` (3.2.0) with dxil-spirv master `b540c8a2`, built locally (`-Db_ndebug=true`) - Microsoft `d3dcompiler_47` in the prefix (the indirect clamp still needs it on `main`, #170) - VIctory `main` `63bcca4`, merged with this PR (`38f3697`), cross-built for `x86_64-pc-windows-gnu`; Series X files, 1.0.2.1 **Offline (dxil-spirv `b540c8a2` CLI, `--bindless --enable-shader-demote --ssbo-uav --ssbo-srv --bindless-typed-buffer-offsets`, run on every module `translate --list` emits)** | | `main` | `main` + #2723 | |---|---|---| | modules that abort | 2: `smh_draw_64` and `smh_draw_128` `CS_VisHair_969c6f85` (`Invalid type ID in cast<T>` in `fixup_load_type_typed`, exit 134) | 0 | | `CS_VisHair` UAV handles | one `{4098, 1033}` used by `textureLoad.f32` and `atomicBinOp.i64` | `{4098, 1033}` for the load, `{4098, 261}` for the atomic | | DXC 1.9 `dxil.dll` validator | 24,937 validated | 24,937 validated | **In-game** - `translate --cache --pipelines` completes: 27,135 pipelines made in 219 s, no abort (on `main` it dies around pipeline 1,200, as in #3101). - World run without any `VICTORY_SKIP_PIPELINES`, warm caches: `CS_VisHair` (`b6df66af105d8b2d`) gets its host pipeline and runs. The intro cutscene plays and the run reaches the prologue (prison scene), lit, with characters and hair. 25 minutes, ended by my time cap, with no crash or device removal. About 1 fps in the cutscene, a steady 2.9–3.3 fps in the prologue, about 12.7 GB of VRAM. - On `main`, the same setup ended about 10 minutes in when vkd3d-proton hit this abort (`terminate called without an active exception`, exit 3). With `VICTORY_SKIP_PIPELINES=b6df66af105d8b2d` instead, the title crashed about 8 minutes in at `+0xb6fb9`, reading `0xffffffffffffffff`, with f16 infinities in `rax`. That did not happen with this PR, so it may have come from the skipped hair pass. Unconfirmed. Still visible with this PR: blocky bands over the lower part of some shots, and 76–264 draws a frame dropped for untranslated shaders. These look unrelated. No game files attached. AI-assisted (Claude Code).
fuzeofficlal commented 2026-11-26 12:26:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T12:26:17Z.

Review: CHANGES_REQUESTED


Keying entry_handles, handles, and join_handles on both (props.0, props.1) (crates/victory-shader/src/emit/lower.rs:220-228, 5376, 5392, 5501) matches what Shader::annotate receives and preserves non-typed raw/structured/CBV/sampler sharing (props.1 == 0).

However, crates/victory-shader/src/emit/lower.rs on 38f36978 is 524,570 bytes—282 bytes over the repository's 524,288-byte asset-policy limit—causing cargo run --locked -p xtask -- policy to fail (exit 1).

Please move mimg_2d and an_image_read_as_float_and_by_an_atomic_is_annotated_twice (emit/lower.rs:12220-12309, ~3,513 bytes) into a separate test module so lower.rs passes xtask policy cleanly. (Optional follow-up: the new regression currently hits entry_handles; adding a dynamic Source::Loaded and a uniform Source::Phi property-mismatch case would directly exercise handles and join_handles too.)

Local checks on 38f36978:

  • cargo run --locked -p xtask -- policy: failed (524570 bytes exceeds the 524288-byte limit).
  • cargo clippy -p victory-shader --all-targets -- -D warnings (default & --all-features): clean.
  • emit::lower::tests 34 passed, emit::shader::tests 1 passed; on VICTORY_WARP=1, emit::memory_tests 5 passed and emit::stride_tests 8 passed; on RTX 5090, emit::memory_tests 4 passed (skipping pre-existing Blackwell heap_direct_texture_reads_mark_their_heap_index) and emit::stride_tests 6 passed (2 pre-existing NVIDIA 1M view-heap-cap failures).
<!-- greyfinch-sync:Marvisak/VIctory:review:6074097390 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#pullrequestreview-6074097390). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T12:26:17Z. **Review:** CHANGES_REQUESTED --- Keying `entry_handles`, `handles`, and `join_handles` on both `(props.0, props.1)` (`crates/victory-shader/src/emit/lower.rs:220-228, 5376, 5392, 5501`) matches what `Shader::annotate` receives and preserves non-typed raw/structured/CBV/sampler sharing (`props.1 == 0`). However, `crates/victory-shader/src/emit/lower.rs` on `38f36978` is **524,570 bytes**—282 bytes over the repository's 524,288-byte asset-policy limit—causing `cargo run --locked -p xtask -- policy` to fail (`exit 1`). Please move `mimg_2d` and `an_image_read_as_float_and_by_an_atomic_is_annotated_twice` (`emit/lower.rs:12220-12309`, ~3,513 bytes) into a separate test module so `lower.rs` passes `xtask policy` cleanly. (Optional follow-up: the new regression currently hits `entry_handles`; adding a dynamic `Source::Loaded` and a uniform `Source::Phi` property-mismatch case would directly exercise `handles` and `join_handles` too.) Local checks on `38f36978`: - `cargo run --locked -p xtask -- policy`: failed (`524570 bytes exceeds the 524288-byte limit`). - `cargo clippy -p victory-shader --all-targets -- -D warnings` (default & `--all-features`): clean. - `emit::lower::tests` `34 passed`, `emit::shader::tests` `1 passed`; on `VICTORY_WARP=1`, `emit::memory_tests` `5 passed` and `emit::stride_tests` `8 passed`; on RTX 5090, `emit::memory_tests` `4 passed` (skipping pre-existing Blackwell `heap_direct_texture_reads_mark_their_heap_index`) and `emit::stride_tests` `6 passed` (2 pre-existing NVIDIA 1M view-heap-cap failures).
pickles976 commented 2026-11-27 03:38:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T03:38:08Z.


Verified the complete typed-handle correction from 38f3697801 on Linux/Wine/NVIDIA, including a previously failing retail compute PSO. This is a dirty local integration, not a pristine PR-head or whole-scene certification.

Machine/stack: i7-13620H, 16 GiB RAM, RTX 4060 Laptop 8 GiB, NVIDIA 590.48.01, Wine 11.0, Rust 1.98.1/MSVC target. vkd3d-proton is the local diagnostic-relaxed 2576c0b4adfae4a+ build, not stock certification. Integration base 3ed7d725f6895fe1a235eb6fa8ff2485261ca151 retains the previously verified Wave64/paging/memory changes. This trial also adds #1722's empty-library bootstrap; no pipeline skips, forced Wave32, loop-limit changes or raised resource limits.

Isolated failure before the typed-handle correction

  • Title compute 2f03a2df10503cef, cached DXIL SHA256 d08fe76e6fb088886a14fe6c69db694fd8b8df8030be1c37ac084a2f07603bd3 (47,072 bytes), native DXIL hash f81e0913a65db639, root signature 0bdbe03c9f406cc7.
  • Replayed through the production root-signature/compute-PSO path without dispatch or title loading. The #1722 bootstrap was already present. Explicit 2 MiB and 64 MiB compiler-thread stacks both failed identically (NVVM compilation failed: 1, Vulkan -13). GPU usage peaked at 166 MiB, available RAM stayed above 11 GiB. This failure does not require loading-time RAM pressure, and the larger stack does not fix it.
  • Microsoft's dxv reports Validation succeeded on that unchanged DXIL. Its integer atomicBinOp.i32 nevertheless uses a handle annotated RWTexture2D<4xF32> (4098,1033). The generated SPIR-V fails spirv-val --target-env vulkan1.3 --scalar-block-layout: AtomicOr: expected Result Type to be integer scalar type, with OpAtomicOr %float and an OpImageTexelPointer into float image data.
  • Source trace matches this PR: the atomic asks for (kind|0x1000, 0x105), but the caches omit props.1 and return the previous float handle.

After the complete three-cache correction

  • Ported the owner's float-read/integer-atomic annotation regression, adapting the integration's Options API: 1 passed, 0 failed/ignored, fresh intended-tree compilation 6.28 s. CPU translation fixture, not GPU execution. An initial local fixture transcription failed to compile; it was corrected before this passing run and is not a PR failure.
  • Fresh diagnostics release 42.51 s, then an unchanged 180 s guard, account input at 20 s, scoped file-backed XMem with in-place disabled. New shader-cache build 8b1206a5e0625f40; the selected shader was freshly translated (cached=false).
  • 2f03a2df10503cef now creates a host pipeline. All four compute PSOs refused in the preceding run now create: 2f03a2df10503cef, 5d113aa6830760b6, a3d1a26ad0c8c2cd, 11bbed94ee7a3243. Two previously refused vertex/pixel pairs also create. Seven other previously refused graphics/mesh combinations have no completed creation in this bounded run; their outcome is unresolved, not passed.
  • Zero observed native pipeline refusals / NVVM failures in this run. This does not certify every requested PSO: translation refusals and substantial work still being compiled remain.
  • Host library creation/serialization now operates (last save 104,696 bytes, 545 made / 56 loaded); these are in-run counts, not a warm-start cache measurement.

Visual/runtime limit: loading artwork at 45/90 s, black frames at 120/150 s. The user heard the first cinematic's audio while the screen stayed black. The guard time-stopped normally (180 s / exit 137), not on memory: GPU peak 5,503 MiB, minimum available RAM 4,307.4 MiB, scope peak 8,414.3 MiB, disk minimum 11.904 GiB. No controllable gameplay, scene-rendering or FPS success claimed. Thirty-nine unsupported Wave64 translations remain in the observed portion; their count is not comparable as an improvement against a different compile/progress window. Root-offset dispatch drops also remain (#2699/#2703); that thread's NVIDIA partial-BVH hang evidence rules out trialing #2703 alone.

Local evidence:

  • .compat-runtime/logs/verify-rendering-library-native-2m-20261127T031417Z/
  • verify-native-compute-64m-20261127T031518Z/
  • verify-native-compute-dxil-validation-20261127T031609Z/
  • verify-native-compute-spirv-capture-20261127T031741Z/
  • verify-pr2723-integrated-handle-types-corrected-20261127T032745Z/
  • verify-pr2723-rendering-release-20261127T032812Z/
  • 20261127T032946Z-{console.log,resources.csv,rendering-causality.json}; selected PSO creation at console line 3549.

No game assets, shader binaries or imagery attached. Useful regression extension: native PSO creation for the synthetic float-read/integer-atomic program on Wine/NVIDIA, because DXIL validation alone accepts the bad handle pairing. This PR fixes a demonstrated native pipeline blocker here; it does not by itself produce a visible scene.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7209148722 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7209148722). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T03:38:08Z. --- Verified the complete typed-handle correction from **38f3697801be71060ed2dd1fa65f37c56386e779** on Linux/Wine/NVIDIA, including a previously failing retail compute PSO. This is a **dirty local integration**, not a pristine PR-head or whole-scene certification. **Machine/stack:** i7-13620H, 16 GiB RAM, RTX 4060 Laptop 8 GiB, NVIDIA 590.48.01, Wine 11.0, Rust 1.98.1/MSVC target. vkd3d-proton is the local **diagnostic-relaxed 2576c0b4adfae4a+ build**, not stock certification. Integration base `3ed7d725f6895fe1a235eb6fa8ff2485261ca151` retains the previously verified Wave64/paging/memory changes. This trial also adds #1722's empty-library bootstrap; no pipeline skips, forced Wave32, loop-limit changes or raised resource limits. ### Isolated failure before the typed-handle correction - Title compute `2f03a2df10503cef`, cached DXIL SHA256 `d08fe76e6fb088886a14fe6c69db694fd8b8df8030be1c37ac084a2f07603bd3` (47,072 bytes), native DXIL hash `f81e0913a65db639`, root signature `0bdbe03c9f406cc7`. - Replayed through the production root-signature/compute-PSO path **without dispatch or title loading**. The #1722 bootstrap was already present. Explicit **2 MiB and 64 MiB** compiler-thread stacks both failed identically (`NVVM compilation failed: 1`, Vulkan -13). GPU usage peaked at 166 MiB, available RAM stayed above 11 GiB. This failure does not require loading-time RAM pressure, and the larger stack does not fix it. - Microsoft's `dxv` reports **Validation succeeded** on that unchanged DXIL. Its integer `atomicBinOp.i32` nevertheless uses a handle annotated `RWTexture2D<4xF32>` (`4098,1033`). The generated SPIR-V fails `spirv-val --target-env vulkan1.3 --scalar-block-layout`: **`AtomicOr: expected Result Type to be integer scalar type`**, with `OpAtomicOr %float` and an `OpImageTexelPointer` into float image data. - Source trace matches this PR: the atomic asks for `(kind|0x1000, 0x105)`, but the caches omit `props.1` and return the previous float handle. ### After the complete three-cache correction - Ported the owner's float-read/integer-atomic annotation regression, adapting the integration's Options API: **1 passed, 0 failed/ignored**, fresh intended-tree compilation 6.28 s. CPU translation fixture, not GPU execution. An initial local fixture transcription failed to compile; it was corrected before this passing run and is not a PR failure. - Fresh diagnostics release **42.51 s**, then an unchanged **180 s guard**, account input at 20 s, scoped file-backed XMem with in-place disabled. New shader-cache build `8b1206a5e0625f40`; the selected shader was freshly translated (`cached=false`). - **`2f03a2df10503cef` now creates a host pipeline.** All four compute PSOs refused in the preceding run now create: `2f03a2df10503cef`, `5d113aa6830760b6`, `a3d1a26ad0c8c2cd`, `11bbed94ee7a3243`. Two previously refused vertex/pixel pairs also create. Seven other previously refused graphics/mesh combinations have no completed creation in this bounded run; their outcome is **unresolved**, not passed. - **Zero observed native pipeline refusals / NVVM failures** in this run. This does not certify every requested PSO: translation refusals and substantial work still being compiled remain. - Host library creation/serialization now operates (last save 104,696 bytes, 545 made / 56 loaded); these are in-run counts, **not a warm-start cache measurement**. **Visual/runtime limit:** loading artwork at 45/90 s, black frames at 120/150 s. The user heard the first cinematic's audio while the screen stayed black. The guard time-stopped normally (180 s / exit 137), not on memory: GPU peak 5,503 MiB, minimum available RAM 4,307.4 MiB, scope peak 8,414.3 MiB, disk minimum 11.904 GiB. No controllable gameplay, scene-rendering or FPS success claimed. Thirty-nine unsupported Wave64 translations remain in the observed portion; their count is not comparable as an improvement against a different compile/progress window. Root-offset dispatch drops also remain (#2699/#2703); that thread's NVIDIA partial-BVH hang evidence rules out trialing #2703 alone. **Local evidence:** - `.compat-runtime/logs/verify-rendering-library-native-2m-20261127T031417Z/` - `verify-native-compute-64m-20261127T031518Z/` - `verify-native-compute-dxil-validation-20261127T031609Z/` - `verify-native-compute-spirv-capture-20261127T031741Z/` - `verify-pr2723-integrated-handle-types-corrected-20261127T032745Z/` - `verify-pr2723-rendering-release-20261127T032812Z/` - `20261127T032946Z-{console.log,resources.csv,rendering-causality.json}`; selected PSO creation at console line 3549. No game assets, shader binaries or imagery attached. Useful regression extension: native PSO creation for the synthetic float-read/integer-atomic program on Wine/NVIDIA, because DXIL validation alone accepts the bad handle pairing. This PR fixes a demonstrated native pipeline blocker here; it does not by itself produce a visible scene.
pablogonz12 commented 2026-11-27 17:05:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-27T17:05:18Z.


I repeated the offline check once per tree on RX 9070 XT, RADV, Mesa 26.3.1-arch3.5. Base was 63bcca43c6a00a758510398fa43096ce7e4f7df0; the second tree was that base merged with PR head 38f3697801be71060ed2dd1fa65f37c56386e779 (local merge cbc4b9e581248f62a13177cd6ada68939482d7f2).

I ran bash build-slot.sh bash offline-check.sh "$TREE" "$SET" on each tree, with the same 751-program input set. The converter checkout was 34f0ff845eb7f1ca76ca8df5d1593d6913f19e9c; I did not independently verify the prebuilt converter binary's provenance. The check translates to DXIL, converts to SPIR-V, runs spirv-val --target-env vulkan1.3, then creates a RADV pipeline for programs reaching that stage.

Result main main + PR
Pipeline created 730 748
Pipeline creation failed 0 0
SPIR-V validation failed before pipeline creation 18 0
Converter crashed before pipeline creation 1 1
Translation refused 2 2

The 18 validation errors on main reported integer atomics with a float result type. This is an offline check only, not a game run; it does not establish rendering correctness. Not tested on NVIDIA hardware.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224011825 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7224011825). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-27T17:05:18Z. --- I repeated the offline check once per tree on RX 9070 XT, RADV, Mesa 26.3.1-arch3.5. Base was `63bcca43c6a00a758510398fa43096ce7e4f7df0`; the second tree was that base merged with PR head `38f3697801be71060ed2dd1fa65f37c56386e779` (local merge `cbc4b9e581248f62a13177cd6ada68939482d7f2`). I ran `bash build-slot.sh bash offline-check.sh "$TREE" "$SET"` on each tree, with the same 751-program input set. The converter checkout was `34f0ff845eb7f1ca76ca8df5d1593d6913f19e9c`; I did not independently verify the prebuilt converter binary's provenance. The check translates to DXIL, converts to SPIR-V, runs `spirv-val --target-env vulkan1.3`, then creates a RADV pipeline for programs reaching that stage. | Result | main | main + PR | |---|---:|---:| | Pipeline created | 730 | 748 | | Pipeline creation failed | 0 | 0 | | SPIR-V validation failed before pipeline creation | 18 | 0 | | Converter crashed before pipeline creation | 1 | 1 | | Translation refused | 2 | 2 | The 18 validation errors on main reported integer atomics with a float result type. This is an offline check only, not a game run; it does not establish rendering correctness. Not tested on NVIDIA hardware.
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/2723:upstream-pr/2723'
git switch 'upstream-pr/2723'

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/2723'
git switch 'upstream-pr/2723'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2723'
git switch 'upstream-pr/2723'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2723'
git switch 'main'
git merge --squash 'upstream-pr/2723'
git switch 'main'
git merge --ff-only 'upstream-pr/2723'
git switch 'main'
git merge 'upstream-pr/2723'
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!2721
No description provided.