Shaders/GPU: port experimental GTX compute and vertex fallback to current main #2203

Open
github-bot wants to merge 5 commits from github-bot/gh-2203 into main AGit
Owner

@⁠ElSeba0811 on GitHub · 2026-11-25 07:49 UTC · original
ElSeba0811:codex/gtx-upstream-update → main · +4945 −111 · 33 files · 5 commits · draft

This brings our experimental compute + vertex fallback onto 940d32f, so it can work with main's root UAVs, title-memory views and write marks. I'm testing on a GTX 1070 Ti (8 GB, no mesh shaders), i7-9700K and 16 GB RAM.

Related to #3 and the discussion on #961. This is our separate GTX branch, including additional guest-wave and validation work. I'm opening it as a draft because correct world rendering and playable FPS are still unverified.

What changed

  • Port the compute/vertex mesh path, eligible wave64 schedules and bounded indirect argument conversion while retaining upstream's memory/view bindings and helper-lane handling. Private scratch uses space 3 and the pulling vertex shader uses SRV 254.
  • Bound scratch reuse and allow an idle snapshot-pool cap. Match the descriptor heap and shader clamp to the GTX's one-million-view limit; remapping excess title descriptors remains unfinished.
  • Supply texture-view dimensions, mip levels and type through the view metadata table without eagerly creating placed textures. Keep unsupported descriptor-bit reads refused.
  • Fix module UAV flags and use validator 1.8 with matching PSV metadata for compute shaders using implicit derivatives.
  • Refuse unordered views in a format the host stores no typed unordered views of, checking the format the host view actually takes. With this branch's castable formats, the GTX makes a B5G5R5A1_UNORM texture with unordered access that a plain resource could not have, and the title's unordered view in that format removed the device (DXGI_ERROR_INVALID_CALL). Refused views get a null view, so writes through them are dropped. Typed buffer unordered views get the same check.
  • Include handwritten synthetic regression tests and build/test instructions.

The commits keep the fallback port, later shader fixes, documentation, a CI test fix and the device-removal fix separate.

What we actually verified

  • Five new validator tests pass. The old implementation fails the two tests that reproduce the bugs.
  • Unordered-view fix: the new test unordered_views_in_a_format_the_host_cannot_store_are_refused passes on the GTX 1070 Ti and fails with the previous fits(). It skips on hosts that store B5G5R5A1_UNORM. A separate local GTX test reproduced the removal itself: a plain texture with unordered access is refused, the castable one is made, an R16_UINT view of it works, and a view in its own format removes the device with 0x887A0001. The victory-gpu library suite on the GTX gives 158 passed, 0 failed, 4 ignored.
  • Latest shader library run: 274 passed, 2 failed, 11 ignored. Both failures reproduce with identical values on untouched 940d32f: a_heap_buffer_read_by_element_takes_the_views_stride and gathers_at_a_level_match_the_hardware. Their assertions remain unchanged.
  • Explicit image-view and compute-sampling checks pass on GTX 1070 Ti and WARP. Earlier port checks passed four mesh tests, two election tests and four indirect tests on each relevant adapter; the image update was followed by mesh/indirect regressions.
  • Both workspace/all-targets Clippy configurations pass with -D warnings, including on 9b77060; cargo test --workspace --no-run also passes on that exact commit. That last command compiles tests; it does not execute them. The 158/0/4 GPU-library result above is from the earlier tested candidate with the same fix and local diagnostic, not a fresh GPU run on the committed tree. Asset policy passes for all 193 files (and for the staged file of 9b77060), and git diff --check passes. The upstream tree has unrelated formatting differences.
  • Offline census: 14,240/14,240 emitted vertex/pixel programs validate; 2,621/2,621 emitted compute programs validate. There are still 7 vertex/pixel and 58 compute translation refusals. Native-mesh validation is 8,694/8,765. The last validator fixes added 867 vertex + 735 compute passes without changing any other census outcome; the earlier image metadata fix added 35 pixel programs.

Those census counts are validator results, not proof that every shader runs through the GTX fallback. No title pipelines are created by that scan.

Still open

Game trials on this GTX 1070 Ti (16 GB RAM, driver 582.78), with the four variables in the build notes, DRED on, no shader skips and frame capture off:

  • e35c044: the device was removed with DXGI_ERROR_INVALID_CALL after 18-20 s (last logged presentation counter: 128), with empty DRED breadcrumbs. A local diagnostic that checks the device after each host view and texture call (not part of this PR) traced it to the B5G5R5A1_UNORM unordered view fixed in 9b77060.
  • 9b77060: the game ran 163 s and reached logged presentation counter 2048 by 85 s, with no invalid-call removal. It ended when a command list failed to close with E_OUTOFMEMORY, at about 156 s. That followed two 15.7 s submissions whose pipeline sets include 00167d58cc5a78d7; these are whole-submission timings, not an isolated timing or proof of a fault in that pass. Process private commit peaked at 22.4 GiB. Sampled system commit reserve stayed above 2.88 GiB, so our 2 GiB guard did not stop the run. The failing allocation and whether its limit was system memory, GPU memory, or another resource are not identified.
  • From about 70 s, the host refused 45 compute pipelines with E_INVALIDARG, including the BVH builders 28918b7150a7aad5 and caa78b8ca62bc3d6. The cause has not been found yet.

For comparison, L1DRE's tests use the same GTX 1070 Ti 8 GB, but 32 GB RAM and driver 582.53 versus our 16 GB and 582.78. Their additional format/alias-copy fixes, #189 merge and pipeline skips are not in our tested configuration. They report HUD/minimap with #189 and a separate longer run with an additional skip; their 3D world remains black. Those are their observations, not locally reproduced results or a controlled performance comparison. We have requested their exact branch and settings.

No frames were captured in our run, so we have no rendering or FPS improvement to claim. D3D12 debug-layer validation is unavailable on this PC.

Wave64 support is limited to eligible schedules, some programs are still refused, and oversized descriptor heaps still need remapping. This is a reviewable experimental starting point, not a playable-game release.

The 9b77060 trial executable (SHA-256 b822c643424898b4cb3c74dd52ae0996228aeddd4b0201a07898723148028df0) was built from this branch plus the local diagnostic above, which ran enabled in that trial. No game files, extracted shaders, binaries or raw game logs are included.

AI-assisted implementation, review and validation with Codex and Claude.

**@⁠ElSeba0811** on GitHub · 2026-11-25 07:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203) `ElSeba0811:codex/gtx-upstream-update` → `main` · +4945 −111 · 33 files · 5 commits · draft This brings our experimental compute + vertex fallback onto `940d32f`, so it can work with main's root UAVs, title-memory views and write marks. I'm testing on a GTX 1070 Ti (8 GB, no mesh shaders), i7-9700K and 16 GB RAM. Related to #3 and the discussion on #961. This is our separate GTX branch, including additional guest-wave and validation work. I'm opening it as a draft because correct world rendering and playable FPS are still unverified. ## What changed - Port the compute/vertex mesh path, eligible wave64 schedules and bounded indirect argument conversion while retaining upstream's memory/view bindings and helper-lane handling. Private scratch uses space 3 and the pulling vertex shader uses SRV 254. - Bound scratch reuse and allow an idle snapshot-pool cap. Match the descriptor heap and shader clamp to the GTX's one-million-view limit; remapping excess title descriptors remains unfinished. - Supply texture-view dimensions, mip levels and type through the view metadata table without eagerly creating placed textures. Keep unsupported descriptor-bit reads refused. - Fix module UAV flags and use validator 1.8 with matching PSV metadata for compute shaders using implicit derivatives. - Refuse unordered views in a format the host stores no typed unordered views of, checking the format the host view actually takes. With this branch's castable formats, the GTX makes a B5G5R5A1_UNORM texture with unordered access that a plain resource could not have, and the title's unordered view in that format removed the device (`DXGI_ERROR_INVALID_CALL`). Refused views get a null view, so writes through them are dropped. Typed buffer unordered views get the same check. - Include handwritten synthetic regression tests and [build/test instructions](https://github.com/ElSeba0811/VIctory/blob/codex/gtx-upstream-update/docs/mesh-fallback.md). The commits keep the fallback port, later shader fixes, documentation, a CI test fix and the device-removal fix separate. ## What we actually verified - Five new validator tests pass. The old implementation fails the two tests that reproduce the bugs. - Unordered-view fix: the new test `unordered_views_in_a_format_the_host_cannot_store_are_refused` passes on the GTX 1070 Ti and fails with the previous `fits()`. It skips on hosts that store B5G5R5A1_UNORM. A separate local GTX test reproduced the removal itself: a plain texture with unordered access is refused, the castable one is made, an R16_UINT view of it works, and a view in its own format removes the device with `0x887A0001`. The `victory-gpu` library suite on the GTX gives 158 passed, 0 failed, 4 ignored. - Latest shader library run: **274 passed, 2 failed, 11 ignored**. Both failures reproduce with identical values on untouched `940d32f`: `a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware`. Their assertions remain unchanged. - Explicit image-view and compute-sampling checks pass on GTX 1070 Ti and WARP. Earlier port checks passed four mesh tests, two election tests and four indirect tests on each relevant adapter; the image update was followed by mesh/indirect regressions. - Both workspace/all-targets Clippy configurations pass with `-D warnings`, including on `9b77060`; `cargo test --workspace --no-run` also passes on that exact commit. That last command compiles tests; it does not execute them. The 158/0/4 GPU-library result above is from the earlier tested candidate with the same fix and local diagnostic, not a fresh GPU run on the committed tree. Asset policy passes for all 193 files (and for the staged file of `9b77060`), and `git diff --check` passes. The upstream tree has unrelated formatting differences. - Offline census: **14,240/14,240 emitted vertex/pixel programs validate; 2,621/2,621 emitted compute programs validate**. There are still 7 vertex/pixel and 58 compute translation refusals. Native-mesh validation is 8,694/8,765. The last validator fixes added 867 vertex + 735 compute passes without changing any other census outcome; the earlier image metadata fix added 35 pixel programs. Those census counts are validator results, **not** proof that every shader runs through the GTX fallback. No title pipelines are created by that scan. ## Still open Game trials on this GTX 1070 Ti (16 GB RAM, driver 582.78), with the four variables in the build notes, DRED on, no shader skips and frame capture off: - **`e35c044`**: the device was removed with `DXGI_ERROR_INVALID_CALL` after 18-20 s (last logged presentation counter: 128), with empty DRED breadcrumbs. A local diagnostic that checks the device after each host view and texture call (not part of this PR) traced it to the B5G5R5A1_UNORM unordered view fixed in `9b77060`. - **`9b77060`**: the game ran 163 s and reached logged presentation counter 2048 by 85 s, with no invalid-call removal. It ended when a command list failed to close with `E_OUTOFMEMORY`, at about 156 s. That followed two 15.7 s submissions whose pipeline sets include `00167d58cc5a78d7`; these are whole-submission timings, not an isolated timing or proof of a fault in that pass. Process private commit peaked at 22.4 GiB. Sampled system commit reserve stayed above 2.88 GiB, so our 2 GiB guard did not stop the run. The failing allocation and whether its limit was system memory, GPU memory, or another resource are not identified. - From about 70 s, the host refused 45 compute pipelines with `E_INVALIDARG`, including the BVH builders `28918b7150a7aad5` and `caa78b8ca62bc3d6`. The cause has not been found yet. For comparison, [L1DRE's tests](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2203) use the same GTX 1070 Ti 8 GB, but 32 GB RAM and driver 582.53 versus our 16 GB and 582.78. Their additional format/alias-copy fixes, #189 merge and pipeline skips are not in our tested configuration. They report HUD/minimap with #189 and a separate longer run with an additional skip; their 3D world remains black. Those are their observations, not locally reproduced results or a controlled performance comparison. We have requested their exact branch and settings. No frames were captured in our run, so we have no rendering or FPS improvement to claim. D3D12 debug-layer validation is unavailable on this PC. Wave64 support is limited to eligible schedules, some programs are still refused, and oversized descriptor heaps still need remapping. This is a reviewable experimental starting point, not a playable-game release. The `9b77060` trial executable (SHA-256 `b822c643424898b4cb3c74dd52ae0996228aeddd4b0201a07898723148028df0`) was built from this branch plus the local diagnostic above, which ran enabled in that trial. No game files, extracted shaders, binaries or raw game logs are included. AI-assisted implementation, review and validation with Codex and Claude.
Preserve buffer address words while exposing image-view dimensions, mip
levels and type through the view metadata table. Inspect placed textures
without creating host textures; retain conservative descriptor-bit checks.

Declare UAVsAtEveryStage for non-pixel/non-compute module UAVs. Compute
implicit derivatives use validator 1.8 and matching PSV runtime info.
Add handwritten regression fixtures and GTX/WARP sampling checks.

Five validator regressions pass; shader suite 274 passed, two known
upstream GTX failures, 11 ignored. This is not a gameplay claim.
Implemented and reviewed with Claude and Codex assistance.
A texture in a format without typed unordered access (B5G5R5A1_UNORM on
the GTX 1070 Ti) is refused as a plain committed resource with
ALLOW_UNORDERED_ACCESS, but is made when created with castable formats.
An unordered view in its own format then removes the device with
DXGI_ERROR_INVALID_CALL, with no command list in flight. fits() checked
typed-store support only for castable views of another format family.

Check the format the host view actually takes (the view's if the texture
is typeless or castable to it, else the texture's own, also without a
description) for every texture unordered view, and typed buffer
unordered views likewise. Refused views get a null view, so writes
through them are dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:58:20 +00:00
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 10:58 UTC · original

Your census reproduces, and most of the gain overlaps open PRs

I merged head e35c044 onto main 940d32f and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. Compared program by program with main (25,889 programs): +1,637 validated, 0 lost (23,918 → 25,555). That matches your 867 + 735 + 35.

Overlap with other PRs, measured the same way on 940d32f:

Gained here Failure on main Same programs as
867 "Flags must match usage" all 867 that #1989 gains (and #1977, now closed)
735 "Entry function performs some operation that is incompatible with the shader stage" 735 of the 777 that #2091 gains (from its #1065 commit)
35 "a descriptor read only as data" gained only here, among the PRs I have measured

So for the census, the validator fixes in this PR duplicate #1989 and #1065. Only the 35 from the image metadata change are new. #2091 has 42 programs that this PR does not gain.

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

**@⁠sinan-cmyk** on GitHub · 2026-11-25 10:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7160420787) ### Your census reproduces, and most of the gain overlaps open PRs I merged head e35c044 onto `main` 940d32f and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. Compared program by program with `main` (25,889 programs): **+1,637 validated, 0 lost** (23,918 → 25,555). That matches your 867 + 735 + 35. Overlap with other PRs, measured the same way on 940d32f: | Gained here | Failure on `main` | Same programs as | |---|---|---| | 867 | "Flags must match usage" | all 867 that #1989 gains (and #1977, now closed) | | 735 | "Entry function performs some operation that is incompatible with the shader stage" | 735 of the 777 that #2091 gains (from its #1065 commit) | | 35 | "a descriptor read only as data" | gained only here, among the PRs I have measured | So for the census, the validator fixes in this PR duplicate #1989 and #1065. Only the 35 from the image metadata change are new. #2091 has 42 programs that this PR does not gain. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Author
Owner

@⁠L1DRE on GitHub · 2026-11-25 12:02 UTC · original

Tried e35c044 on another GTX 1070 Ti: 8 GB, driver 582.53, i5-12400F, 32 GB RAM, Windows 11 23H2 (22631), title on an HDD. I used the diag build and your four variables (VICTORY_MESH_COMPUTE, VICTORY_MESH_WAVE64_DAG, VICTORY_MESH_INDIRECT, VICTORY_SNAPSHOT_POOL_MIB=128), plus VICTORY_TEXTURE_MIP_DROP=2. Win11 didn't need the Agility opt-in. The D3D12 debug layer and DRED both work on this PC, so here is what they named.

1. The 2560x1440 BGRA render target is refused (E_INVALIDARG, format 86, flags 5). It's the same case as #904. With 85 | 86 | 115 => 28 and 67 => 10 in pc_format, it's created.

2. alias_copy overruns its buffer when the two formats have different texel sizes. The debug layer stops at CopyTextureRegion: the placed footprint needs 8192 bytes (R16G16B16A16_FLOAT, 32x32, RowPitch 256), but the buffer has 8064. The pair is R32 (a=42) aliased to RGBA16F (b=10). Both have RowPitch 256 and 32 rows, so the take_while check passes. The row sizes differ, though (128 vs 256 bytes), and the buffer is sized from a's total. The device was removed ("a host command list did not close", then 0x887A0001). The fix compares the row sizes from GetCopyableFootprints as well, and sizes the buffer to the larger total:

-            host.device
-                .GetCopyableFootprints(d, 0, n, 0, Some(f.as_mut_ptr()), Some(rows.as_mut_ptr()), None, Some(&mut total));
+            host.device.GetCopyableFootprints(d, 0, n, 0, Some(f.as_mut_ptr()), Some(rows.as_mut_ptr()), Some(row_bytes.as_mut_ptr()), Some(&mut total));
...
-    let (fa, ra, total) = footprints(&da, count(&da));
-    let (fb, rb, _) = footprints(&db, count(&db));
+    let (fa, ra, sa, total_a) = footprints(&da, count(&da));
+    let (fb, rb, sb, total_b) = footprints(&db, count(&db));
+    let total = total_a.max(total_b);
...
-            ... && ra[i] == rb[i] && x.Footprint.Depth == y.Footprint.Depth
+            ... && ra[i] == rb[i] && sa[i] == sb[i] && x.Footprint.Depth == y.Footprint.Depth

This code is upstream (texture.rs), not from this PR. #1 just made the mismatch reachable, because 9E5 (4 bytes) became RGBA16F (8 bytes).

3. The world hangs the GPU in the BVH and ray-traced passes. With 1 and 2, the run reaches the world and then gets DEVICE_HUNG after about 30 s, with frames taking 16 s on the GPU. This branch translates all five XboxBvhBuilder programs, including 28918b71 and caa78b8c, the two that moe-miau found hanging on #189. With those two skipped, DRED stops in the ray-traced pass:

a list stopped at command 52 of 74 (op 5): indirect kind 2 max 1 [compute f607780aa8e502d0]

That is presumably walking a BVH that was never built. With VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0, there is no device removal.

Result with 1, 2 and the three skips: 22+ minutes in the world, then I closed it.

before (my old local stack on ffe310e) this PR + fixes + skips
time in world 2:29-3:11, then VRAM exhaustion 22+ min, no removal
peak dedicated VRAM 7.85 GB, pinned 7.4-7.6 GB, stable
title copies per world frame 0.8-1.5 GB about 0.2 GB
draws/frame up to about 1,650 up to 2,265 (2,529 indexing the heap)
ms/frame 1,300-6,500 1,300-20,000
out-of-memory failures hundreds 0

The intro credits render (the pink text over black), and audio plays. The world itself stays black. Process RAM is about 20-21 GB.

Other debug layer messages, which didn't remove the device:

  • ExecuteIndirect and DrawInstanced: a resource in NON_PIXEL_SHADER_RESOURCE|PIXEL_SHADER_RESOURCE is "invalid for use as a depth-read" (expected DEPTH_READ). This came up 30 times.
  • DrawIndexedInstanced: a vertex buffer is still in UNORDERED_ACCESS. This came up once.
  • At submission, a barrier's before state is UNORDERED_ACCESS, but the layer assumed VERTEX_AND_CONSTANT_BUFFER at first use.
  • About 160 CreateComputeShader "wants wave lane count of 64" refusals. That's expected without #189.

One run per configuration, loaded from an HDD. Counts, hashes and times only; no game data attached. The two fixes are local commits on top of e35c044. I can push them to a branch if that's easier.

This comment and the investigation were done with AI assistance (Claude Code), on my own machine.

**@⁠L1DRE** on GitHub · 2026-11-25 12:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7161830752) Tried `e35c044` on another GTX 1070 Ti: 8 GB, driver 582.53, i5-12400F, 32 GB RAM, Windows 11 23H2 (22631), title on an HDD. I used the diag build and your four variables (`VICTORY_MESH_COMPUTE`, `VICTORY_MESH_WAVE64_DAG`, `VICTORY_MESH_INDIRECT`, `VICTORY_SNAPSHOT_POOL_MIB=128`), plus `VICTORY_TEXTURE_MIP_DROP=2`. Win11 didn't need the Agility opt-in. The D3D12 debug layer and DRED both work on this PC, so here is what they named. **1. The 2560x1440 BGRA render target is refused (`E_INVALIDARG`, format 86, flags 5).** It's the same case as #904. With `85 | 86 | 115 => 28` and `67 => 10` in `pc_format`, it's created. **2. `alias_copy` overruns its buffer when the two formats have different texel sizes.** The debug layer stops at `CopyTextureRegion`: the placed footprint needs 8192 bytes (R16G16B16A16_FLOAT, 32x32, RowPitch 256), but the buffer has 8064. The pair is R32 (`a=42`) aliased to RGBA16F (`b=10`). Both have RowPitch 256 and 32 rows, so the `take_while` check passes. The row sizes differ, though (128 vs 256 bytes), and the buffer is sized from `a`'s total. The device was removed ("a host command list did not close", then `0x887A0001`). The fix compares the row sizes from `GetCopyableFootprints` as well, and sizes the buffer to the larger total: ```diff - host.device - .GetCopyableFootprints(d, 0, n, 0, Some(f.as_mut_ptr()), Some(rows.as_mut_ptr()), None, Some(&mut total)); + host.device.GetCopyableFootprints(d, 0, n, 0, Some(f.as_mut_ptr()), Some(rows.as_mut_ptr()), Some(row_bytes.as_mut_ptr()), Some(&mut total)); ... - let (fa, ra, total) = footprints(&da, count(&da)); - let (fb, rb, _) = footprints(&db, count(&db)); + let (fa, ra, sa, total_a) = footprints(&da, count(&da)); + let (fb, rb, sb, total_b) = footprints(&db, count(&db)); + let total = total_a.max(total_b); ... - ... && ra[i] == rb[i] && x.Footprint.Depth == y.Footprint.Depth + ... && ra[i] == rb[i] && sa[i] == sb[i] && x.Footprint.Depth == y.Footprint.Depth ``` This code is upstream (`texture.rs`), not from this PR. #1 just made the mismatch reachable, because 9E5 (4 bytes) became RGBA16F (8 bytes). **3. The world hangs the GPU in the BVH and ray-traced passes.** With 1 and 2, the run reaches the world and then gets `DEVICE_HUNG` after about 30 s, with frames taking 16 s on the GPU. This branch translates all five `XboxBvhBuilder` programs, including `28918b71` and `caa78b8c`, the two that moe-miau found hanging on #189. With those two skipped, DRED stops in the ray-traced pass: ``` a list stopped at command 52 of 74 (op 5): indirect kind 2 max 1 [compute f607780aa8e502d0] ``` That is presumably walking a BVH that was never built. With `VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0`, there is no device removal. **Result with 1, 2 and the three skips:** 22+ minutes in the world, then I closed it. | | before (my old local stack on `ffe310e`) | this PR + fixes + skips | |---|---|---| | time in world | 2:29-3:11, then VRAM exhaustion | 22+ min, no removal | | peak dedicated VRAM | 7.85 GB, pinned | 7.4-7.6 GB, stable | | title copies per world frame | 0.8-1.5 GB | about 0.2 GB | | draws/frame | up to about 1,650 | up to 2,265 (2,529 indexing the heap) | | ms/frame | 1,300-6,500 | 1,300-20,000 | | out-of-memory failures | hundreds | 0 | The intro credits render (the pink text over black), and audio plays. The world itself stays black. Process RAM is about 20-21 GB. **Other debug layer messages, which didn't remove the device:** - `ExecuteIndirect` and `DrawInstanced`: a resource in `NON_PIXEL_SHADER_RESOURCE|PIXEL_SHADER_RESOURCE` is "invalid for use as a depth-read" (expected `DEPTH_READ`). This came up 30 times. - `DrawIndexedInstanced`: a vertex buffer is still in `UNORDERED_ACCESS`. This came up once. - At submission, a barrier's before state is `UNORDERED_ACCESS`, but the layer assumed `VERTEX_AND_CONSTANT_BUFFER` at first use. - About 160 `CreateComputeShader` "wants wave lane count of 64" refusals. That's expected without #189. One run per configuration, loaded from an HDD. Counts, hashes and times only; no game data attached. The two fixes are local commits on top of `e35c044`. I can push them to a branch if that's easier. This comment and the investigation were done with AI assistance (Claude Code), on my own machine.
Author
Owner

@⁠L1DRE on GitHub · 2026-11-25 14:26 UTC · original

Follow-up from the same GTX 1070 Ti. I merged #189 (92778cd) into this branch together with my two fixes from the previous comment, to see what happens to the roughly 160 programs that get refused here with "wants wave lane count of 64".

Merge. There were conflicts in lower.rs, mod.rs and host.rs, and in the tests, all around Parts. I kept your mesh_compute and wave64_dag fields next to #189's options (view_marks moved into Options). In run(), the wave64_dag early return comes before #189's LDS overflow check. In v_readfirstlane_b32, the order is DAG first, then #189's emulated path, then your native_full_elections. pipeline/host.rs needed ..Default::default() on the two Options { view_marks: true } initializers. With that, the shader library tests give 310 passed, 2 failed and 11 ignored. The two failures are the same ones you list on untouched 940d32f.

Runs. All use your four variables plus VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0 (the BVH builder and ray-traced pass from before; moe-miau sees the same two builders hang on #189 in both wave32 and emulate) and VICTORY_D3D12_DRED=1. One run each:

this PR + fixes + #189, Emulate + #189, wave32 + #189, wave32, 00167d58 skipped
refused "wave lane count of 64" (unique) 160 1 1 1
not translated (unique) 18 202 124 124
max draws/frame 4,240 5,292 5,031 4,758
time in world 22+ min, closed 8 min, DEVICE_HUNG 5.5 min, DEVICE_HUNG 1 h 45+ min, closed, no removal
on screen credits text credits, start screen, subtitles, HUD + minimap HUD + minimap credits (still running at about 9.5 s/frame)

The 3D world stays black in every run. 2D and UI now render: the start screen's prompts, the intro subtitles, and the in-game HUD with a working minimap (street layout, player arrow, compass, location name). So with #189 this card gets through the intro into gameplay for the first time.

New hang (both modes). DRED stops at the same dispatch in the Emulate run and in the first wave32 run:

a list stopped at command 58 of 60 (op 6): dispatch 16x16x16 [compute 00167d58cc5a78d7]

Without #189, 00167d58 was already in the 15-16 s submissions but stayed under TDR (TdrDelay=10 here). With #189 it crosses it. Skipping it makes the wave32 run stable: 1 h 50 min from launch with no device removal, then I closed it. Frames still take about 5-10 s on the GPU, so it isn't the only heavy pass.

What Emulate refuses that wave32 doesn't (unique hashes, wave32 run):

reason programs
a cross-lane wave operation in divergent control flow 58
LDS accesses without a uniform LDS fence in split wave64 49
a register joining a lane mask and data, read as data 6
others 11

In Emulate, the extra 78 are mostly v_readfirstlane and 64-lane ballots in divergent control flow. That matches walterwallaceson's and moe-miau's RTX 3070 and 4070 SUPER reports on #189: Emulate refuses programs that wave32 runs. aef200's RTX 4060 Ti table on #189 shows the same split for creation: native gives 116 refusals, while wave32 and emulate give 0.

One run per configuration, from an HDD. Counts, hashes and times only; no game data attached. The merge and the two fixes are local commits. I can push the branch if it's useful to anyone.

This comment and the investigation were done with AI assistance (Claude Code), on my own machine.

**@⁠L1DRE** on GitHub · 2026-11-25 14:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7165282655) Follow-up from the same GTX 1070 Ti. I merged #189 (`92778cd`) into this branch together with my two fixes from the previous comment, to see what happens to the roughly 160 programs that get refused here with "wants wave lane count of 64". **Merge.** There were conflicts in `lower.rs`, `mod.rs` and `host.rs`, and in the tests, all around `Parts`. I kept your `mesh_compute` and `wave64_dag` fields next to #189's `options` (`view_marks` moved into `Options`). In `run()`, the `wave64_dag` early return comes before #189's LDS overflow check. In `v_readfirstlane_b32`, the order is DAG first, then #189's emulated path, then your `native_full_elections`. `pipeline/host.rs` needed `..Default::default()` on the two `Options { view_marks: true }` initializers. With that, the shader library tests give 310 passed, 2 failed and 11 ignored. The two failures are the same ones you list on untouched `940d32f`. **Runs.** All use your four variables plus `VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0` (the BVH builder and ray-traced pass from before; moe-miau sees the same two builders hang on #189 in both `wave32` and `emulate`) and `VICTORY_D3D12_DRED=1`. One run each: | | this PR + fixes | + #189, `Emulate` | + #189, `wave32` | + #189, `wave32`, `00167d58` skipped | |---|---|---|---|---| | refused "wave lane count of 64" (unique) | 160 | 1 | 1 | 1 | | not translated (unique) | 18 | 202 | 124 | 124 | | max draws/frame | 4,240 | 5,292 | 5,031 | 4,758 | | time in world | 22+ min, closed | 8 min, `DEVICE_HUNG` | 5.5 min, `DEVICE_HUNG` | 1 h 45+ min, closed, no removal | | on screen | credits text | credits, start screen, subtitles, **HUD + minimap** | HUD + minimap | credits (still running at about 9.5 s/frame) | The 3D world stays black in every run. 2D and UI now render: the start screen's prompts, the intro subtitles, and the in-game HUD with a working minimap (street layout, player arrow, compass, location name). So with #189 this card gets through the intro into gameplay for the first time. **New hang (both modes).** DRED stops at the same dispatch in the `Emulate` run and in the first `wave32` run: ``` a list stopped at command 58 of 60 (op 6): dispatch 16x16x16 [compute 00167d58cc5a78d7] ``` Without #189, `00167d58` was already in the 15-16 s submissions but stayed under TDR (`TdrDelay=10` here). With #189 it crosses it. Skipping it makes the `wave32` run stable: 1 h 50 min from launch with no device removal, then I closed it. Frames still take about 5-10 s on the GPU, so it isn't the only heavy pass. **What `Emulate` refuses that `wave32` doesn't** (unique hashes, `wave32` run): | reason | programs | |---|---| | a cross-lane wave operation in divergent control flow | 58 | | LDS accesses without a uniform LDS fence in split wave64 | 49 | | a register joining a lane mask and data, read as data | 6 | | others | 11 | In `Emulate`, the extra 78 are mostly `v_readfirstlane` and 64-lane ballots in divergent control flow. That matches walterwallaceson's and moe-miau's RTX 3070 and 4070 SUPER reports on #189: `Emulate` refuses programs that `wave32` runs. aef200's RTX 4060 Ti table on #189 shows the same split for creation: `native` gives 116 refusals, while `wave32` and `emulate` give 0. One run per configuration, from an HDD. Counts, hashes and times only; no game data attached. The merge and the two fixes are local commits. I can push the branch if it's useful to anyone. This comment and the investigation were done with AI assistance (Claude Code), on my own machine.
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-25 17:10 UTC · original · edited 2026-11-25 17:12 UTC

@⁠L1DRE yeah, please push the branch with your two fixes and the #189 merge, plus the exact settings for each run. We're testing the same GTX 1070 Ti 8 GB, so that would give us a useful comparison. You have 32 GB RAM and driver 582.53; ours has 16 GB and driver 582.78, with an i7-9700K. I pushed 9b77060 to this branch: a fix for the invalid-call device removal that ended our runs of e35c044.

What removed the device here. Our guarded runs of e35c044 ended after 18-20 s (last logged presentation counter: 128) with DXGI_ERROR_INVALID_CALL (0x887A0001). DRED breadcrumbs were empty, so they did not identify the failing operation. The debug layer isn't available on this PC, so I used a local diagnostic (not pushed) that checks GetDeviceRemovedReason after each host view and texture call. It named a title create_uav: a 2D unordered view in format 86, B5G5R5A1_UNORM. On this card:

  • B5G5R5A1_UNORM has no TYPED_UNORDERED_ACCESS_VIEW support.
  • A plain committed texture of it with ALLOW_UNORDERED_ACCESS is refused (E_INVALIDARG). That is what main does: no host texture, so no view.
  • With this branch's castable formats (CreateCommittedResource3), the same texture is made.
  • An R16_UINT unordered view of it works. A view in its own format 86 removes the device immediately with 0x887A0001.

fits() checked typed-store support only for castable views of another format family, so the same-format view went through.

Fix (descriptor/host.rs): fits() now checks typed_store on the format the host view actually takes, also when there is no description. That is the view's format if the texture is typeless or castable to it, else the texture's own. Typed buffer unordered views get the same check. Refused views get a null view, so writes through them are dropped. This prevents the invalid view; it does not emulate the missing writes or prove correct rendering. The new test unordered_views_in_a_format_the_host_cannot_store_are_refused passes on the GTX and fails with the previous fits(). It skips on hosts that can store B5G5R5A1.

This is the same format as your #1, from a different direction. Your 85 | 86 | 115 => 28 mapping would avoid this view too, since R8G8B8A8_UNORM can be stored, but it changes the texel size, which is what exposed the alias_copy overrun in your #2. The check here doesn't depend on the mapping and covers any unordered view in a format the host can't store, so the two could go together.

Run with the fix (your four variables, DRED, no skips, no mip drop, no frame capture):

e35c044 9b77060
time 18-20 s 163 s
last logged presentation counter 128 2,048 by 85 s
end INVALID_CALL removal command list failed to close with E_OUTOFMEMORY at about 156 s
process private commit about 13 GiB 22.4 GiB peak

The end came after two 15.7 s submissions whose pipeline sets include 00167d58cc5a78d7, which also appears in your DRED report. These are batch timings, so we haven't isolated that pass as the cause here. Physical memory load was 88-99%, but we didn't measure paging throughput. Sampled system commit reserve stayed above 2.88 GiB, so our 2 GiB guard didn't stop the run. We haven't identified the failed allocation or whether its limit was system memory, GPU memory, or something else.

We haven't reproduced your format remapping, alias_copy fix, #189 merge, pipeline skips or VICTORY_TEXTURE_MIP_DROP setting. The 45 refusals below are host pipeline-creation errors; we haven't established that they're equivalent to your wave-lane-count refusals.

One difference from your card: here the BVH builders 28918b7150a7aad5 and caa78b8ca62bc3d6 didn't run. They were among 45 compute pipelines the host refused with E_INVALIDARG, starting about 70 s in. I haven't found why yet.

The tested candidate gave 158 GPU-library tests passed, 0 failed, 4 ignored; the regression fails with the old check restored. Both Clippy configurations, the asset policy and cargo test --workspace --no-run pass on the exact 9b77060 tree. That last check compiles tests; it isn't another GPU test run.

This is progress over our earlier crash, not evidence that we've surpassed your results. We haven't locally reproduced your reported HUD/minimap or long-run stability, and your report still has a black 3D world. Our frame capture was off, so we have no verified world-rendering or playable-FPS result. Skipping a pass is a diagnostic workaround, not a rendering fix.

The tested EXE is b822c643424898b4cb3c74dd52ae0996228aeddd4b0201a07898723148028df0: the fix now in 9b77060 plus a local diagnostic probe, enabled for the run and not pushed. This is the upstream-based GTX build; separate ZSlayer runs aren't evidence for this PR. Counts, hashes and times only; no game data attached.

AI-assisted investigation and validation with Claude and Codex, on my own machine.

**@⁠ElSeba0811** on GitHub · 2026-11-25 17:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7169104398) · edited 2026-11-25 17:12 UTC @⁠L1DRE yeah, please push the branch with your two fixes and the #189 merge, plus the exact settings for each run. We're testing the same GTX 1070 Ti 8 GB, so that would give us a useful comparison. You have 32 GB RAM and driver 582.53; ours has 16 GB and driver 582.78, with an i7-9700K. I pushed `9b77060` to this branch: a fix for the invalid-call device removal that ended our runs of `e35c044`. **What removed the device here.** Our guarded runs of `e35c044` ended after 18-20 s (last logged presentation counter: 128) with `DXGI_ERROR_INVALID_CALL` (`0x887A0001`). DRED breadcrumbs were empty, so they did not identify the failing operation. The debug layer isn't available on this PC, so I used a local diagnostic (not pushed) that checks `GetDeviceRemovedReason` after each host view and texture call. It named a title `create_uav`: a 2D unordered view in format 86, B5G5R5A1_UNORM. On this card: - B5G5R5A1_UNORM has no `TYPED_UNORDERED_ACCESS_VIEW` support. - A plain committed texture of it with `ALLOW_UNORDERED_ACCESS` is refused (`E_INVALIDARG`). That is what `main` does: no host texture, so no view. - With this branch's castable formats (`CreateCommittedResource3`), the same texture is made. - An R16_UINT unordered view of it works. A view in its own format 86 removes the device immediately with `0x887A0001`. `fits()` checked typed-store support only for castable views of another format family, so the same-format view went through. **Fix** (`descriptor/host.rs`): `fits()` now checks `typed_store` on the format the host view actually takes, also when there is no description. That is the view's format if the texture is typeless or castable to it, else the texture's own. Typed buffer unordered views get the same check. Refused views get a null view, so writes through them are dropped. This prevents the invalid view; it does not emulate the missing writes or prove correct rendering. The new test `unordered_views_in_a_format_the_host_cannot_store_are_refused` passes on the GTX and fails with the previous `fits()`. It skips on hosts that can store B5G5R5A1. This is the same format as your #1, from a different direction. Your `85 | 86 | 115 => 28` mapping would avoid this view too, since R8G8B8A8_UNORM can be stored, but it changes the texel size, which is what exposed the `alias_copy` overrun in your #2. The check here doesn't depend on the mapping and covers any unordered view in a format the host can't store, so the two could go together. **Run with the fix** (your four variables, DRED, no skips, no mip drop, no frame capture): | | `e35c044` | `9b77060` | |---|---|---| | time | 18-20 s | 163 s | | last logged presentation counter | 128 | 2,048 by 85 s | | end | `INVALID_CALL` removal | command list failed to close with `E_OUTOFMEMORY` at about 156 s | | process private commit | about 13 GiB | 22.4 GiB peak | The end came after two 15.7 s submissions whose pipeline sets include `00167d58cc5a78d7`, which also appears in your DRED report. These are batch timings, so we haven't isolated that pass as the cause here. Physical memory load was 88-99%, but we didn't measure paging throughput. Sampled system commit reserve stayed above 2.88 GiB, so our 2 GiB guard didn't stop the run. We haven't identified the failed allocation or whether its limit was system memory, GPU memory, or something else. We haven't reproduced your format remapping, `alias_copy` fix, #189 merge, pipeline skips or `VICTORY_TEXTURE_MIP_DROP` setting. The 45 refusals below are host pipeline-creation errors; we haven't established that they're equivalent to your wave-lane-count refusals. One difference from your card: here the BVH builders `28918b7150a7aad5` and `caa78b8ca62bc3d6` didn't run. They were among 45 compute pipelines the host refused with `E_INVALIDARG`, starting about 70 s in. I haven't found why yet. The tested candidate gave **158 GPU-library tests passed, 0 failed, 4 ignored**; the regression fails with the old check restored. Both Clippy configurations, the asset policy and `cargo test --workspace --no-run` pass on the exact `9b77060` tree. That last check compiles tests; it isn't another GPU test run. This is progress over our earlier crash, not evidence that we've surpassed your results. We haven't locally reproduced your reported HUD/minimap or long-run stability, and your report still has a black 3D world. Our frame capture was off, so we have no verified world-rendering or playable-FPS result. Skipping a pass is a diagnostic workaround, not a rendering fix. The tested EXE is `b822c643424898b4cb3c74dd52ae0996228aeddd4b0201a07898723148028df0`: the fix now in `9b77060` plus a local diagnostic probe, enabled for the run and not pushed. This is the upstream-based GTX build; separate ZSlayer runs aren't evidence for this PR. Counts, hashes and times only; no game data attached. AI-assisted investigation and validation with Claude and Codex, on my own machine.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:19 UTC · original

Automated triage for the maintainers.

Needs rebase. This branch conflicts with main in crates/victory-gpu/src/descriptor/host.rs and in crates/victory-shader/src/emit/ (lower.rs, memory_tests.rs, mod.rs, shader.rs). It will be reviewed once it is rebased and out of draft.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7170744963) <!-- victory-triage v1 head=9b770602b4386b6c672022fecf3ec4ea194f399a verdict=needs-rebase at=2026-11-25T18:28:00Z --> Automated triage for the maintainers. **Needs rebase.** This branch conflicts with `main` in `crates/victory-gpu/src/descriptor/host.rs` and in `crates/victory-shader/src/emit/` (`lower.rs`, `memory_tests.rs`, `mod.rs`, `shader.rs`). It will be reviewed once it is rebased and out of draft. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠L1DRE on GitHub · 2026-11-25 18:40 UTC · original

Third follow-up from the same GTX 1070 Ti (Pascal: 32-lane waves, no mesh shaders). On upstream with #189 the world stayed black: the G-buffer filled, but the lighting and composite passes were empty because about 100 wave64 compute dispatches a frame were refused ("cross-lane wave operation in divergent control flow", "LDS accesses without a uniform LDS fence in split wave64"). fxceless/victory-fork has its own wave64-on-32-lane lowering without those refusals, but it needs mesh shaders. So I put this PR's mesh fallback on top of it.

Port. Base: Joaco9020/mangrove 87799d9 (fxceless 3973179 plus a cache warm-up, VICTORY_AMBIENT and the pool-assert fix). On top: 8c32235 and e35c044 from this PR, and the pc_format stand-ins from my first comment. The fork has no emit::Options/view_marks, and emit_program returns (HostShader, Option<u32>), so emit_mode takes (mesh_compute, wave64_dag) and mesh_compute::translate_with drops its options argument. pipeline.rs needed a with_resources helper and the fork's extra Shader fields (walks, resolves_light, stores). I left out ef0fe5c (it builds on upstream's view-address table, which the fork doesn't have). I also left out my alias_copy fix, because the fork already refuses alias copies whose totals differ. cargo check is clean. I didn't run the test suite on this port.

Warm-up (victory warm): 25,647 shaders translated, 59 refused; 2,647 compute pipelines, 27 refused; 609 s.

Hangs at world entry. With only the BVH-builder skips from my first comment, every run lost the device about 3 s after the first world frame (0x887A0006). DRED named a different indirect compute each time: f22a76fcb967ee59, 36f04a4ed0ad1d9b, 6d7fe7745ab9c6d8, 0873f80dd84a3c5c, 3592426e3e9142d8, b58eb3ca6ee46427. They read their arguments from two blocks (0xd7227a3… and 0xd9358f…). Things that did not help:

  • skipping them one at a time (the next one hangs);
  • a warm cache;
  • an indirect clamp 4-8x tighter;
  • TdrDelay=60 (still 6d7fe774, so it is a real hang, not just a slow frame).

What fixed it is the fork's own VICTORY_BVH_HOLD=1, which holds every dispatch that walks the unbuilt ray-tracing structures (the hang #2311 measured on NVIDIA). With it, plus VICTORY_SKIP_PIPELINES=00167d58cc5a78d7 (the wind-field copy from #898), there was no device removal in any run:

before VICTORY_BVH_HOLD=1
device removed ~3 s after world entry, every run none (runs of 3.5-7 min in the world, then I closed them)
frame time in the world - mostly 1-3.5 s, spikes to 19 s
draws/frame - 1,400-3,900
walk dispatches held - 15/frame

Picture. The G-buffer is complete: prison yard, parking lot, cars, characters. The lit HDR target shows the scene but dark, and the presented frame is either dark or blown out to white with sun flares, depending on the shot. VICTORY_AMBIENT=2 (default 0.6) didn't change that. As far as I can tell this is the same "shadow is black, bright scenes overexpose" that the fxceless-based forks list as known while ray-traced lighting doesn't run.

Notes:

  • Mesh fallback refusals on this base: 14 "a cyclic mesh program in guest-wave DAG mode is not supported" and 6 "a descriptor's address or format read as data is not supported" (with VICTORY_MESH_WAVE64_DAG=1). Their draws are dropped.
  • Lowering the indirect clamp's BUDGET to 1 << 25 made the lower half of the G-buffer and the lighting run empty. The fork's defaults are needed.
  • VICTORY_SHADER_LOOP_LIMIT=32 stalls the world load on the loading screen.

Counts, hashes and times only; no game data attached. The port is three local commits on mangrove. I can push the branch if it helps.

This comment and the investigation were done with AI assistance (Claude Code), on my own machine.

**@⁠L1DRE** on GitHub · 2026-11-25 18:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7171229784) Third follow-up from the same GTX 1070 Ti (Pascal: 32-lane waves, no mesh shaders). On upstream with #189 the world stayed black: the G-buffer filled, but the lighting and composite passes were empty because about 100 wave64 compute dispatches a frame were refused ("cross-lane wave operation in divergent control flow", "LDS accesses without a uniform LDS fence in split wave64"). fxceless/victory-fork has its own wave64-on-32-lane lowering without those refusals, but it needs mesh shaders. So I put this PR's mesh fallback on top of it. **Port.** Base: Joaco9020/mangrove `87799d9` (fxceless `3973179` plus a cache warm-up, `VICTORY_AMBIENT` and the pool-assert fix). On top: `8c32235` and `e35c044` from this PR, and the `pc_format` stand-ins from my first comment. The fork has no `emit::Options`/`view_marks`, and `emit_program` returns `(HostShader, Option<u32>)`, so `emit_mode` takes `(mesh_compute, wave64_dag)` and `mesh_compute::translate_with` drops its `options` argument. `pipeline.rs` needed a `with_resources` helper and the fork's extra `Shader` fields (`walks`, `resolves_light`, `stores`). I left out `ef0fe5c` (it builds on upstream's view-address table, which the fork doesn't have). I also left out my `alias_copy` fix, because the fork already refuses alias copies whose totals differ. `cargo check` is clean. I didn't run the test suite on this port. **Warm-up** (`victory warm`): 25,647 shaders translated, 59 refused; 2,647 compute pipelines, 27 refused; 609 s. **Hangs at world entry.** With only the BVH-builder skips from my first comment, every run lost the device about 3 s after the first world frame (`0x887A0006`). DRED named a different indirect compute each time: `f22a76fcb967ee59`, `36f04a4ed0ad1d9b`, `6d7fe7745ab9c6d8`, `0873f80dd84a3c5c`, `3592426e3e9142d8`, `b58eb3ca6ee46427`. They read their arguments from two blocks (`0xd7227a3…` and `0xd9358f…`). Things that did not help: - skipping them one at a time (the next one hangs); - a warm cache; - an indirect clamp 4-8x tighter; - `TdrDelay=60` (still `6d7fe774`, so it is a real hang, not just a slow frame). What fixed it is the fork's own `VICTORY_BVH_HOLD=1`, which holds every dispatch that walks the unbuilt ray-tracing structures (the hang #2311 measured on NVIDIA). With it, plus `VICTORY_SKIP_PIPELINES=00167d58cc5a78d7` (the wind-field copy from #898), there was no device removal in any run: | | before | `VICTORY_BVH_HOLD=1` | |---|---|---| | device removed | ~3 s after world entry, every run | none (runs of 3.5-7 min in the world, then I closed them) | | frame time in the world | - | mostly 1-3.5 s, spikes to 19 s | | draws/frame | - | 1,400-3,900 | | walk dispatches held | - | 15/frame | **Picture.** The G-buffer is complete: prison yard, parking lot, cars, characters. The lit HDR target shows the scene but dark, and the presented frame is either dark or blown out to white with sun flares, depending on the shot. `VICTORY_AMBIENT=2` (default 0.6) didn't change that. As far as I can tell this is the same "shadow is black, bright scenes overexpose" that the fxceless-based forks list as known while ray-traced lighting doesn't run. **Notes:** - Mesh fallback refusals on this base: 14 "a cyclic mesh program in guest-wave DAG mode is not supported" and 6 "a descriptor's address or format read as data is not supported" (with `VICTORY_MESH_WAVE64_DAG=1`). Their draws are dropped. - Lowering the indirect clamp's `BUDGET` to `1 << 25` made the lower half of the G-buffer and the lighting run empty. The fork's defaults are needed. - `VICTORY_SHADER_LOOP_LIMIT=32` stalls the world load on the loading screen. Counts, hashes and times only; no game data attached. The port is three local commits on mangrove. I can push the branch if it helps. This comment and the investigation were done with AI assistance (Claude Code), on my own machine.
Author
Owner

@⁠L1DRE on GitHub · 2026-11-25 18:43 UTC · original

@⁠ElSeba0811 thanks, and nice find on the format-86 UAV. It's good that the fits() check covers it without depending on the size-changing remap. Pushed to my fork, https://github.com/L1DRE/VIctory:

  • gtx1070/pr2203-fixes is e35c044 plus the two fixes: 8fe7667 (pc_format stand-ins 85 | 86 | 115 => 28, 67 => 10) and d8f5a07 (alias_copy compares row sizes and sizes the buffer to the larger total).
  • gtx1070/pr2203-189 is the above, merged with #189 at 92778cd (620aab6, conflicts resolved as described in my second comment), plus 6fa51a4: the mesh-compute Options keep the default wave64 mode.
  • gtx1070/mangrove-2203 is the port from my third comment: Joaco9020/mangrove 87799d9 plus 8c32235, e35c044 and the format stand-ins.

None of them has 9b77060 yet.

Machine (all runs): GTX 1070 Ti 8 GB, driver 582.53, i5-12400F, 32 GB RAM, Windows 11 23H2 (22631), title 1.0.2.1 on an HDD, Series X profile. Diag builds (cargo build --locked --profile diag -p victory --features diagnostics). TdrDelay was 10 for every run except the last mangrove ones, where it was 60.

Shared by every run: VICTORY_MESH_COMPUTE=1 VICTORY_MESH_WAVE64_DAG=1 VICTORY_MESH_INDIRECT=1 VICTORY_SNAPSHOT_POOL_MIB=128 VICTORY_TEXTURE_MIP_DROP=2. Every run whose DRED result I quoted had VICTORY_D3D12_DRED=1.

run branch extra settings result
first comment, before skips pr2203-fixes none DEVICE_HUNG about 30 s into the world
first comment, 22+ min pr2203-fixes VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0 no removal, credits text only
second comment, Emulate pr2203-189 VICTORY_WAVE64_EMULATE=emulate + same 3 skips DEVICE_HUNG at 8 min on 00167d58cc5a78d7
second comment, wave32 pr2203-189 VICTORY_WAVE64_EMULATE=wave32 + same 3 skips DEVICE_HUNG at 5.5 min on 00167d58
second comment, wave32 + skip pr2203-189 VICTORY_WAVE64_EMULATE=wave32, skips + 00167d58cc5a78d7 14 min, later 1 h 50 min, no removal
third comment mangrove-2203 below no removal, 3.5-7 min runs

The third-comment runs used mangrove's own pc\settings.bat values, VICTORY_LOG=info,victory_gpu::descriptor::host=error VICTORY_TEXTURE_GUARD=0 VICTORY_SHADER_OPT=0 VICTORY_TEXTURE_ROOM_PERCENT=94 VICTORY_LATE_WAIT=2 VICTORY_PIPELINE_WAIT_MS=24 VICTORY_POOL_NO_ASSERT=1, plus VICTORY_BVH_HOLD=1 VICTORY_SKIP_PIPELINES=00167d58cc5a78d7. The cache was warmed first with victory warm <shaders.rpf> <game exe>, using the same variables. VICTORY_AMBIENT was the default 0.6, then 2. Target dumps used VICTORY_CAPTURE + VICTORY_DUMP_TARGETS=1 + VICTORY_CAPTURE_WORLD=20,60.

Input: Enter held about 400 ms on the title screen, plus Enter at the main menu. Memory: process RAM was about 13.6-21 GB on the upstream branches. With 16 GB, your E_OUTOFMEMORY at about 156 s may be commit rather than VRAM.

On the BVH builders: on pr2203-fixes here, all five XboxBvhBuilder programs were created. That's how 28918b71 and caa78b8c could hang. On pr2203-189, #189 refuses them instead ("LDS accesses without a uniform LDS fence in split wave64").

This comment was written with AI assistance (Claude Code), on my own machine.

**@⁠L1DRE** on GitHub · 2026-11-25 18:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7171299917) @⁠ElSeba0811 thanks, and nice find on the format-86 UAV. It's good that the `fits()` check covers it without depending on the size-changing remap. Pushed to my fork, https://github.com/L1DRE/VIctory: - [`gtx1070/pr2203-fixes`](https://github.com/L1DRE/VIctory/tree/gtx1070/pr2203-fixes) is `e35c044` plus the two fixes: `8fe7667` (`pc_format` stand-ins `85 | 86 | 115 => 28`, `67 => 10`) and `d8f5a07` (`alias_copy` compares row sizes and sizes the buffer to the larger total). - [`gtx1070/pr2203-189`](https://github.com/L1DRE/VIctory/tree/gtx1070/pr2203-189) is the above, merged with #189 at `92778cd` (`620aab6`, conflicts resolved as described in my second comment), plus `6fa51a4`: the mesh-compute `Options` keep the default wave64 mode. - [`gtx1070/mangrove-2203`](https://github.com/L1DRE/VIctory/tree/gtx1070/mangrove-2203) is the port from my third comment: Joaco9020/mangrove `87799d9` plus `8c32235`, `e35c044` and the format stand-ins. None of them has `9b77060` yet. **Machine (all runs):** GTX 1070 Ti 8 GB, driver 582.53, i5-12400F, 32 GB RAM, Windows 11 23H2 (22631), title 1.0.2.1 on an HDD, Series X profile. Diag builds (`cargo build --locked --profile diag -p victory --features diagnostics`). `TdrDelay` was 10 for every run except the last mangrove ones, where it was 60. **Shared by every run:** `VICTORY_MESH_COMPUTE=1 VICTORY_MESH_WAVE64_DAG=1 VICTORY_MESH_INDIRECT=1 VICTORY_SNAPSHOT_POOL_MIB=128 VICTORY_TEXTURE_MIP_DROP=2`. Every run whose DRED result I quoted had `VICTORY_D3D12_DRED=1`. | run | branch | extra settings | result | |---|---|---|---| | first comment, before skips | `pr2203-fixes` | none | `DEVICE_HUNG` about 30 s into the world | | first comment, 22+ min | `pr2203-fixes` | `VICTORY_SKIP_PIPELINES=28918b7150a7aad5,caa78b8ca62bc3d6,f607780aa8e502d0` | no removal, credits text only | | second comment, `Emulate` | `pr2203-189` | `VICTORY_WAVE64_EMULATE=emulate` + same 3 skips | `DEVICE_HUNG` at 8 min on `00167d58cc5a78d7` | | second comment, `wave32` | `pr2203-189` | `VICTORY_WAVE64_EMULATE=wave32` + same 3 skips | `DEVICE_HUNG` at 5.5 min on `00167d58` | | second comment, `wave32` + skip | `pr2203-189` | `VICTORY_WAVE64_EMULATE=wave32`, skips + `00167d58cc5a78d7` | 14 min, later 1 h 50 min, no removal | | third comment | `mangrove-2203` | below | no removal, 3.5-7 min runs | The third-comment runs used mangrove's own `pc\settings.bat` values, `VICTORY_LOG=info,victory_gpu::descriptor::host=error VICTORY_TEXTURE_GUARD=0 VICTORY_SHADER_OPT=0 VICTORY_TEXTURE_ROOM_PERCENT=94 VICTORY_LATE_WAIT=2 VICTORY_PIPELINE_WAIT_MS=24 VICTORY_POOL_NO_ASSERT=1`, plus `VICTORY_BVH_HOLD=1 VICTORY_SKIP_PIPELINES=00167d58cc5a78d7`. The cache was warmed first with `victory warm <shaders.rpf> <game exe>`, using the same variables. `VICTORY_AMBIENT` was the default 0.6, then 2. Target dumps used `VICTORY_CAPTURE` + `VICTORY_DUMP_TARGETS=1` + `VICTORY_CAPTURE_WORLD=20,60`. Input: Enter held about 400 ms on the title screen, plus Enter at the main menu. Memory: process RAM was about 13.6-21 GB on the upstream branches. With 16 GB, your `E_OUTOFMEMORY` at about 156 s may be commit rather than VRAM. On the BVH builders: on `pr2203-fixes` here, all five `XboxBvhBuilder` programs were created. That's how `28918b71` and `caa78b8c` could hang. On `pr2203-189`, #189 refuses them instead ("LDS accesses without a uniform LDS fence in split wave64"). This comment was written with AI assistance (Claude Code), on my own machine.
Author
Owner

@⁠L1DRE on GitHub · 2026-11-25 19:12 UTC · original

@⁠ElSeba0811 I merged 9b77060 into gtx1070/pr2203-189 locally and tested it on this GTX 1070 Ti (driver 582.53). The settings are the wave32 row from my previous comment, plus VICTORY_D3D12_DEBUG=1 where noted.

build result
9b77060 + my pc_format stand-ins 9+ min in the world, up to 12,300 draws/frame, no removal (I closed it). The new check never fired, because the stand-ins replace format 86 before a view is made. No regression.
9b77060, stand-ins reverted INVALID_CALL (0x887A0001) about 16 s into the world, as on your e35c044 runs
same, VICTORY_D3D12_DEBUG=1 same removal; the debug layer names the cause, see below

On this driver, format 86 never gets as far as a view. Your branch's castable path refuses the 2560x1440 B5G5R5A1 target (flags 5: render target + unordered access). The plain path refuses it too, so the title has no host texture there, and the 2560x1440 format 115 texture is also refused (the debug layer only named the B5G5R5A1 one):

CreateCommittedResource3: A texture that has D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS set ... must be created with a format that either can be used as unordered access, or cast to a format that could be used as unordered access. ... Format is B5G5R5A1_UNORM
CreateCommittedResource3: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set ... must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target.

(the same two messages follow for the plain CreateCommittedResource.) So fits() never sees this texture on 582.53. On your 582.78 the castable path makes it, which is presumably why you reached the view.

The removal here comes from a shader resource view:

ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT).
ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL ...)

So it's an SRV in format 67 on an R32_UINT host texture that wasn't made castable to it. 9b77060 guards unordered views only. A matching check for shader views (refuse or null a view whose format is neither in the texture's family nor in its castable list) would cover this case. My 67 => 10 stand-in happens to avoid it, because it changes the view format to RGBA16F.

The new test fails here before it reaches its assertions:

unordered_views_in_a_format_the_host_cannot_store_are_refused ... FAILED
a texture made with castable formats: Error { code: HRESULT(0x80070057) }

The test's CreateCommittedResource3 for B5G5R5A1 with ALLOW_UNORDERED_ACCESS is refused on this driver. The test could skip when that creation fails, as it already does when ID3D12Device10 is missing.

On this machine the stand-ins (85 | 86 | 115 => 28, 67 => 10) are still needed. With them, 9b77060 is harmless. I can push the merge (pr2203-189 + 9b77060) if that helps.

This comment and the testing were done with AI assistance (Claude Code), on my own machine.

**@⁠L1DRE** on GitHub · 2026-11-25 19:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7171960092) @⁠ElSeba0811 I merged `9b77060` into `gtx1070/pr2203-189` locally and tested it on this GTX 1070 Ti (driver 582.53). The settings are the `wave32` row from my previous comment, plus `VICTORY_D3D12_DEBUG=1` where noted. | build | result | |---|---| | `9b77060` + my `pc_format` stand-ins | 9+ min in the world, up to 12,300 draws/frame, no removal (I closed it). The new check never fired, because the stand-ins replace format 86 before a view is made. No regression. | | `9b77060`, stand-ins reverted | `INVALID_CALL` (`0x887A0001`) about 16 s into the world, as on your `e35c044` runs | | same, `VICTORY_D3D12_DEBUG=1` | same removal; the debug layer names the cause, see below | **On this driver, format 86 never gets as far as a view.** Your branch's castable path refuses the 2560x1440 B5G5R5A1 target (flags 5: render target + unordered access). The plain path refuses it too, so the title has no host texture there, and the 2560x1440 format 115 texture is also refused (the debug layer only named the B5G5R5A1 one): ``` CreateCommittedResource3: A texture that has D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS set ... must be created with a format that either can be used as unordered access, or cast to a format that could be used as unordered access. ... Format is B5G5R5A1_UNORM CreateCommittedResource3: A texture that has D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET set ... must be created with a format that either can be used as a render target, or cast to a format that could be used as a render target. ``` (the same two messages follow for the plain `CreateCommittedResource`.) So `fits()` never sees this texture on 582.53. On your 582.78 the castable path makes it, which is presumably why you reached the view. **The removal here comes from a shader resource view:** ``` ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT). ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL ...) ``` So it's an SRV in format 67 on an R32_UINT host texture that wasn't made castable to it. `9b77060` guards unordered views only. A matching check for shader views (refuse or null a view whose format is neither in the texture's family nor in its castable list) would cover this case. My `67 => 10` stand-in happens to avoid it, because it changes the view format to RGBA16F. **The new test fails here before it reaches its assertions:** ``` unordered_views_in_a_format_the_host_cannot_store_are_refused ... FAILED a texture made with castable formats: Error { code: HRESULT(0x80070057) } ``` The test's `CreateCommittedResource3` for B5G5R5A1 with `ALLOW_UNORDERED_ACCESS` is refused on this driver. The test could skip when that creation fails, as it already does when `ID3D12Device10` is missing. On this machine the stand-ins (`85 | 86 | 115 => 28`, `67 => 10`) are still needed. With them, `9b77060` is harmless. I can push the merge (`pr2203-189` + `9b77060`) if that helps. This comment and the testing were done with AI assistance (Claude Code), on my own machine.
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-25 23:34 UTC · original

Completed GTX fork trial — 2026-11-25

We now have visible partial scene geometry on the GTX 1070 Ti. The image still has large black areas and severely overexposed/blurred regions. The run lasted 582.28 seconds (9m 42s, including loading) and ended when our system commit-memory guard stopped it.

Candidate and settings

These results are for a separate local fork candidate, not the public 9b77060 head of this PR:

  • Base: fxceless/victory-fork 9c184b35.
  • Local mesh compute/vertex port: 03f815d5058c3741671ab9b8a3f929d782a5b843.
  • Combined local head: a4865267d6d903656b79e60a27031906643a4e9c, including the BC7 anchor-pixel correction.
  • Diagnostics executable SHA-256: fb6c03fe1d5e7cd5328d6d8deefbecf90ce9816f005f9cd9357b0dca2fc4a4a6 (rechecked after the run).
  • Hardware: GTX 1070 Ti, 16 GB system RAM; Series X profile.
  • Mesh fallback selected automatically because the GPU lacks native mesh shaders.
  • VICTORY_BVH_HOLD=1, VICTORY_SNAPSHOT_POOL_MIB=128, VICTORY_D3D12_DRED=1, info logging. Four scheduled Enter inputs at 45/60/75/90 seconds.
  • Guards: 28 GiB process cap, 30 GiB job cap, 2 GiB system commit reserve; no fixed gameplay timer.

Completed hardware run

Measurement Result
Start / finish 23:21:28–23:31:10 UTC
Visible output Partial scene structures; large black regions and excessive brightness/blur remain
Live observation Overlay 1.7 FPS; window title approximately 580–606 ms/frame
Last five logged intervals 1.2–1.6 FPS, 630–801 ms/frame, 3,141–3,187 draws/frame
Sampled peak process commit 23.29 GiB; this is committed memory, not resident RAM or VRAM
Last memory sample 0.82 GiB physical RAM free; 1.96 GiB system commit headroom
End condition system_commit_guard; runner termination code 0xe0000001
Device failure No device-removal/hang or out-of-memory error message found in the captured log; the recorded stop was the memory guard

The log records 203 mesh pipelines created through the compute + vertex path and confirms both direct and indirect fallback dispatches executed. Near the end, 16 ray-tracing-structure walking dispatches per frame were still held because their structures were unbuilt.

The final performance report still counted 3,314 draws without a host pipeline (1,262 being made) and 3,052 dropped indirect operations. These are the logger's categories, not an independently deduplicated total. Pipeline creation/translation refusals and null buffer views remain. The final interval also reported 454.4 ms copying back 38.9 MB; that diagnostic is not an additive frame-time breakdown or proof of the sole bottleneck.

Memory pressure also affected graphics residency: the final logs reported 7,223 MB of dedicated GPU memory in use against a 7,138–7,139 MB budget, plus 5,691 MB of shared system memory. They counted 5,250 title textures with no host copy yet and 2,818 passes that made none for lack of room. These are investigation leads; they do not prove the cause of each black region.

Validation before the run

The mesh-port validation recorded by Claude, plus the independently recorded BC7 checks:

Check Result
Shader library 221 passed, 0 failed, 3 ignored
Mesh fixtures Five tests, including DXIL validation and a two-pass pixel/culled-control draw on GTX and WARP
GPU library 188 passed, 0 failed, 5 ignored, 1 additional test skipped
Skipped GPU test WARP budget test fails identically on the untouched fork base; unresolved baseline issue
Format library after BC7 integration 29 passed, 0 failed, 4 ignored
Workspace check / diagnostics build Passed
Fork Clippy with warnings denied Not clean: 10 reported lints on unchanged fork lines

SixNG inspection led to the BC7 anchor hypothesis. The correction preserves endpoint/index semantics and prediction history. An independent BC7 decoder checked 2,280 synthetic cases; the old-behavior control failed as expected. In a bounded sample of 1,235 chunks across 57 stores (7,415,296 BC7 blocks), high omitted-anchor-bit occurrences fell from 1,319,010 to zero, with no reported chunk decode errors. This is not a whole-dataset visual-fidelity test, and the combined run does not isolate BC7's contribution to the visible improvement.

Remaining work

Correct lighting, texture fidelity, responsive gameplay and sustained performance are not established. This was one guarded run, not a controlled benchmark. The fallback still drops oversized direct dispatches and multi-record/counted indirect dispatches, and refuses primitive system values.

The next priorities are reducing commit growth/copy-back cost and resolving the missing/refused rendering passes, with the same guards retained. A controlled Series S-profile comparison on this same executable is the proposed next memory-footprint test; it has not been run. Code needs separate validation on the exact PR base before a code update; this comment does not change the PR's code or draft status.

Investigation and reporting were performed with Claude Code and Codex assistance. No game assets or raw captures are attached.

**@⁠ElSeba0811** on GitHub · 2026-11-25 23:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7177744765) Completed GTX fork trial — 2026-11-25 **We now have visible partial scene geometry on the GTX 1070 Ti.** The image still has large black areas and severely overexposed/blurred regions. The run lasted **582.28 seconds (9m 42s, including loading)** and ended when our **system commit-memory guard** stopped it. ### Candidate and settings These results are for a **separate local fork candidate**, not the public `9b77060` head of this PR: - Base: [fxceless/victory-fork `9c184b35`](https://github.com/fxceless/victory-fork/commit/9c184b35b43de3455b74ac1770e1c8734a047810). - Local mesh compute/vertex port: `03f815d5058c3741671ab9b8a3f929d782a5b843`. - Combined local head: `a4865267d6d903656b79e60a27031906643a4e9c`, including the BC7 anchor-pixel correction. - Diagnostics executable SHA-256: `fb6c03fe1d5e7cd5328d6d8deefbecf90ce9816f005f9cd9357b0dca2fc4a4a6` (rechecked after the run). - Hardware: GTX 1070 Ti, 16 GB system RAM; Series X profile. - Mesh fallback selected automatically because the GPU lacks native mesh shaders. - `VICTORY_BVH_HOLD=1`, `VICTORY_SNAPSHOT_POOL_MIB=128`, `VICTORY_D3D12_DRED=1`, info logging. Four scheduled Enter inputs at 45/60/75/90 seconds. - Guards: 28 GiB process cap, 30 GiB job cap, 2 GiB system commit reserve; **no fixed gameplay timer**. ### Completed hardware run | Measurement | Result | |---|---| | Start / finish | 23:21:28–23:31:10 UTC | | Visible output | Partial scene structures; large black regions and excessive brightness/blur remain | | Live observation | Overlay 1.7 FPS; window title approximately 580–606 ms/frame | | Last five logged intervals | 1.2–1.6 FPS, 630–801 ms/frame, 3,141–3,187 draws/frame | | Sampled peak process commit | 23.29 GiB; this is committed memory, not resident RAM or VRAM | | Last memory sample | 0.82 GiB physical RAM free; 1.96 GiB system commit headroom | | End condition | `system_commit_guard`; runner termination code `0xe0000001` | | Device failure | No device-removal/hang or out-of-memory error message found in the captured log; the recorded stop was the memory guard | The log records 203 mesh pipelines created through the compute + vertex path and confirms both direct and indirect fallback dispatches executed. Near the end, 16 ray-tracing-structure walking dispatches per frame were still held because their structures were unbuilt. The final performance report still counted 3,314 draws without a host pipeline (1,262 being made) and 3,052 dropped indirect operations. These are the logger's categories, not an independently deduplicated total. Pipeline creation/translation refusals and null buffer views remain. The final interval also reported 454.4 ms copying back 38.9 MB; that diagnostic is not an additive frame-time breakdown or proof of the sole bottleneck. Memory pressure also affected graphics residency: the final logs reported 7,223 MB of dedicated GPU memory in use against a 7,138–7,139 MB budget, plus 5,691 MB of shared system memory. They counted 5,250 title textures with no host copy yet and 2,818 passes that made none for lack of room. These are investigation leads; they do not prove the cause of each black region. ### Validation before the run The mesh-port validation recorded by Claude, plus the independently recorded BC7 checks: | Check | Result | |---|---| | Shader library | 221 passed, 0 failed, 3 ignored | | Mesh fixtures | Five tests, including DXIL validation and a two-pass pixel/culled-control draw on GTX and WARP | | GPU library | 188 passed, 0 failed, 5 ignored, 1 additional test skipped | | Skipped GPU test | WARP budget test fails identically on the untouched fork base; unresolved baseline issue | | Format library after BC7 integration | 29 passed, 0 failed, 4 ignored | | Workspace check / diagnostics build | Passed | | Fork Clippy with warnings denied | Not clean: 10 reported lints on unchanged fork lines | SixNG inspection led to the BC7 anchor hypothesis. The correction preserves endpoint/index semantics and prediction history. An independent BC7 decoder checked 2,280 synthetic cases; the old-behavior control failed as expected. In a bounded sample of 1,235 chunks across 57 stores (7,415,296 BC7 blocks), high omitted-anchor-bit occurrences fell from 1,319,010 to zero, with no reported chunk decode errors. This is not a whole-dataset visual-fidelity test, and the combined run does not isolate BC7's contribution to the visible improvement. ### Remaining work Correct lighting, texture fidelity, responsive gameplay and sustained performance are **not established**. This was one guarded run, not a controlled benchmark. The fallback still drops oversized direct dispatches and multi-record/counted indirect dispatches, and refuses primitive system values. The next priorities are reducing commit growth/copy-back cost and resolving the missing/refused rendering passes, with the same guards retained. A controlled Series S-profile comparison on this same executable is the proposed next memory-footprint test; it has not been run. Code needs separate validation on the exact PR base before a code update; this comment does not change the PR's code or draft status. Investigation and reporting were performed with Claude Code and Codex assistance. No game assets or raw captures are attached.
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-26 01:19 UTC · original

@⁠L1DRE thanks for testing this and posting the debug-layer details. I checked your latest report with Claude.

The failing test: we have a local change on top of 9b77060 that skips unordered_views_in_a_format_the_host_cannot_store_are_refused when the required castable B5G5R5A1 texture cannot be created. On our 582.78 driver it still reaches the assertions. Claude recorded 158 passed, 0 failed, 2 ignored for the GPU library, plus a forced-E_INVALIDARG control that takes the skip. This change is still local; it is not in this PR yet, and it does not fix the game's missing texture.

The format-67 SRV removal is still unresolved. There is already a family/castable-list check in fits(), before the unordered-view change in 9b77060. It also runs for shader resource views. The plain resource-creation fallback clears the recorded castable list. That points us toward a mismatch between the recorded castability and the resource actually being viewed, rather than simply adding the same check again. We have not reproduced or proved the cause of your removal on 582.53.

Could you run draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view on your driver? It exercises the same R32_UINT → R9G9B9E5 pair. If it passes, the useful next comparison is the failing texture's dimensions, mip/array counts, flags and creation path. Your OS/driver details are already noted; no game assets are needed.

New progress since my previous update: we isolated more of the missing passes on the separate local fork candidate a486526 described above. These results are not from the public PR head:

Blocker Verified result
Four refused compute programs Their emitted shaders require 64-lane waves; this GTX reports a fixed 32-lane wave size.
Two of those programs, 369cbe906ea72764 and 2cc4c197ee29e291 Targeted use of the fork's existing wide lowering makes both validate and create pipelines on the GTX: 2/2. This was pipeline creation only, not shader execution or a game run.
Two refused pixel programs, 2d0cace65bc05bb2 and 98bd9f9ae5f9c7e3 They require barycentrics; the GTX reports BarycentricsSupported=0. Both exact graphics pairs create on WARP and fail on the GTX.
Larger compute groups / shadow program The 128/256-thread cases remain blocked; f133e35efed2a48a still fails translation at a divergent lane-mask exchange.

Claude is now working on the Series X translation changes and synthetic execution checks. The global VICTORY_WAVE_WIDE switch remains off for game runs because of known hangs; the 2/2 result is a narrow diagnostic, not a recommended global setting.

The last completed Series X game result is still the one above: 582.28 s including loading, partial/incorrect scene rendering, around 1.2–1.6 FPS in the final logged intervals, and 23.29 GiB peak process commit. It stopped at our system commit guard. We have no newer game result or 30 FPS claim.

The public head remains 9b77060; the PR is still draft and needs a rebase. The local fork findings and test change need to be carried across and validated on the actual PR branch before they can be called part of this PR.

Investigation, implementation and reporting are AI-assisted with Claude Code and Codex. No game assets, extracted shaders or raw game logs are attached.

**@⁠ElSeba0811** on GitHub · 2026-11-26 01:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7179659034) @⁠L1DRE thanks for testing this and posting the debug-layer details. I checked your latest report with Claude. **The failing test:** we have a local change on top of `9b77060` that skips `unordered_views_in_a_format_the_host_cannot_store_are_refused` when the required castable B5G5R5A1 texture cannot be created. On our 582.78 driver it still reaches the assertions. Claude recorded **158 passed, 0 failed, 2 ignored** for the GPU library, plus a forced-`E_INVALIDARG` control that takes the skip. This change is still local; it is not in this PR yet, and it does not fix the game's missing texture. **The format-67 SRV removal is still unresolved.** There is already a family/castable-list check in `fits()`, before the unordered-view change in `9b77060`. It also runs for shader resource views. The plain resource-creation fallback clears the recorded castable list. That points us toward a mismatch between the recorded castability and the resource actually being viewed, rather than simply adding the same check again. We have not reproduced or proved the cause of your removal on 582.53. Could you run `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view` on your driver? It exercises the same R32_UINT → R9G9B9E5 pair. If it passes, the useful next comparison is the failing texture's dimensions, mip/array counts, flags and creation path. Your OS/driver details are already noted; no game assets are needed. **New progress since my previous update:** we isolated more of the missing passes on the separate local fork candidate `a486526` described above. These results are not from the public PR head: | Blocker | Verified result | |---|---| | Four refused compute programs | Their emitted shaders require 64-lane waves; this GTX reports a fixed 32-lane wave size. | | Two of those programs, `369cbe906ea72764` and `2cc4c197ee29e291` | Targeted use of the fork's existing wide lowering makes both validate and create pipelines on the GTX: **2/2**. This was pipeline creation only, not shader execution or a game run. | | Two refused pixel programs, `2d0cace65bc05bb2` and `98bd9f9ae5f9c7e3` | They require barycentrics; the GTX reports `BarycentricsSupported=0`. Both exact graphics pairs create on WARP and fail on the GTX. | | Larger compute groups / shadow program | The 128/256-thread cases remain blocked; `f133e35efed2a48a` still fails translation at a divergent lane-mask exchange. | Claude is now working on the Series X translation changes and synthetic execution checks. The global `VICTORY_WAVE_WIDE` switch remains off for game runs because of known hangs; the 2/2 result is a narrow diagnostic, not a recommended global setting. The last completed Series X game result is still the one above: **582.28 s including loading, partial/incorrect scene rendering, around 1.2–1.6 FPS in the final logged intervals, and 23.29 GiB peak process commit**. It stopped at our system commit guard. We have no newer game result or 30 FPS claim. The public head remains `9b77060`; the PR is still draft and needs a rebase. The local fork findings and test change need to be carried across and validated on the actual PR branch before they can be called part of this PR. Investigation, implementation and reporting are AI-assisted with Claude Code and Codex. No game assets, extracted shaders or raw game logs are attached.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor/host.rs
  • crates/victory-shader/src/emit/host.rs
  • crates/victory-shader/src/emit/lower.rs
  • crates/victory-shader/src/emit/memory_tests.rs
  • crates/victory-shader/src/emit/mod.rs
  • crates/victory-shader/src/emit/shader.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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