Shaders, GPU: draw mesh pipelines without mesh shaders through a compute fallback (#3) #961

Open
EduBertozzi wants to merge 14 commits from upstream-pr/961 into main
EduBertozzi commented 2026-11-24 14:29:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T14:29:27Z.


Addresses #3: drawing mesh pipelines on GPUs without mesh shaders. Performance and wave64 on 32-lane hosts are listed under Open below.

What

A mesh program can be lowered a second way: as a compute shader that writes its vertices and triangles to buffers, plus a generated vertex shader that draws them.

Shaders (victory-shader):

  • emit::translate_mesh_as_compute returns a MeshFallback, made of the compute form, the vertex shader and a MeshLayout.
  • The compute form writes vertices, indices and per-primitive records to raw UAVs u0–u2 in space 2. Each group writes its own slice, with indices offset by group * max_vertices. setMeshOutputCounts is left out.
  • The vertex shader reads them back through t0–t2. Without per-primitive outputs it is drawn indexed. With them it is drawn "expanded" (three corners per primitive, unindexed, with the record read by SV_VertexID / 3), and the pixel shader links by semantic as it does with a mesh shader.
  • emit::mesh_output_bytes and MESH_OUTPUT_LIMIT give D3D12's 32 KiB mesh output size as the spec counts it.

GPU (victory-gpu):

  • A mesh pipeline takes the fallback in three cases:

    • the host has no mesh shaders;
    • VICTORY_MESH_FALLBACK=1 is set;
    • the mesh program outputs more than 32 KiB per group, which D3D12 refuses for a mesh shader, even on hosts that have mesh shaders.

    The fallback is refused if the compute form would bind otherwise than the mesh form.
    The compute form binds its user data, samplers and root views in spaces of its own (8 and 9, MESH_COMPUTE_SPACES), so its ALL-visible parameters don't overlap the pixel shader's.

  • DispatchMesh records the compute pass, a transition to read, the draw, and a transition back. Memory comes from a pool per list. It starts with a 1 MiB chunk, doubles up to 64 MiB, and past 64 MiB reuses its chunks from the start, which the transitions make safe.

  • Indirect mesh dispatches go through a small HLSL pass that turns the console's argument records into dispatch and draw arguments, then two ExecuteIndirect calls (mesh_indirect.rs).

  • The compute form has its own entry in the shader cache (shader.mesh-fallback).

Tools:

  • victory mesh-census counts what the title's mesh programs are made of and how they translate both ways. It prints counts only.
  • fallback_frame_cost is an ignored benchmark of the fallback's per-frame cost.

Seven commits, one per step. mesh-census (5f0b602) stands alone and can be split out if preferred.

Tested

Synthetic, no game data, on Windows 10 + GTX 1060 (no mesh shaders, Agility 1.620.2 for the GPU tests) and WARP 1.0.22 (mesh shaders):

  • The compute form's buffer contents are checked word by word.
  • Drawn through the fallback, the image matches the mesh shader's own image on WARP within 1e-6 on the same device. That holds with and without per-primitive outputs.
  • Unit tests check mesh_output_bytes at the 32,768-byte boundary, and the indirect argument pass on the GPU.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean.
  • Shader and GPU tests pass. On Windows 10 they need an SM 6.6 test runtime, here #486's.

From testers on #3, with their own copies of the title:

  • @fuzeofficlal: the indirect path through State::execute_indirect matches direct draws pixel for pixel on an RTX 5090 and on WARP. That covers indexed and expanded draws, with and without a count, and a zero count.
  • @permadiego: Vega 7 iGPU (no mesh shaders), all 8,765 mesh containers in the title. Every one of the 8,152 that work as mesh shaders also translates, validates and gets both pipelines through the fallback. 53 more that are over the 32 KiB limit work only through it. None has per-primitive outputs.

Open

  • Cost per draw. On a GTX 1060, 7,000 fallback draws take ~33 ms per frame as recorded here, against ~1.9 ms with the compute passes batched ahead of the draws (numbers on #3). Batching needs an ordering rule, because a compute pass may read what earlier work in the list wrote. I've asked on #3 before building it.
  • Wave64 on 32-lane hosts. The compute form goes through the same lane_index() as the mesh form, so #578's refusal and the lane-numbering work in #940 / #189 apply here too.
  • In-game. Nobody has yet drawn the title's world through it on a GPU without mesh shaders end to end.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:5474097014 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T14:29:27Z. --- Addresses #3: drawing mesh pipelines on GPUs without mesh shaders. Performance and wave64 on 32-lane hosts are listed under Open below. ## What A mesh program can be lowered a second way: as a compute shader that writes its vertices and triangles to buffers, plus a generated vertex shader that draws them. **Shaders** (`victory-shader`): - `emit::translate_mesh_as_compute` returns a `MeshFallback`, made of the compute form, the vertex shader and a `MeshLayout`. - The compute form writes vertices, indices and per-primitive records to raw UAVs `u0`–`u2` in space 2. Each group writes its own slice, with indices offset by `group * max_vertices`. `setMeshOutputCounts` is left out. - The vertex shader reads them back through `t0`–`t2`. Without per-primitive outputs it is drawn indexed. With them it is drawn "expanded" (three corners per primitive, unindexed, with the record read by `SV_VertexID / 3`), and the pixel shader links by semantic as it does with a mesh shader. - `emit::mesh_output_bytes` and `MESH_OUTPUT_LIMIT` give D3D12's 32 KiB mesh output size as the spec counts it. **GPU** (`victory-gpu`): - A mesh pipeline takes the fallback in three cases: - the host has no mesh shaders; - `VICTORY_MESH_FALLBACK=1` is set; - the mesh program outputs more than 32 KiB per group, which D3D12 refuses for a mesh shader, even on hosts that have mesh shaders. The fallback is refused if the compute form would bind otherwise than the mesh form. The compute form binds its user data, samplers and root views in spaces of its own (8 and 9, `MESH_COMPUTE_SPACES`), so its ALL-visible parameters don't overlap the pixel shader's. - `DispatchMesh` records the compute pass, a transition to read, the draw, and a transition back. Memory comes from a pool per list. It starts with a 1 MiB chunk, doubles up to 64 MiB, and past 64 MiB reuses its chunks from the start, which the transitions make safe. - Indirect mesh dispatches go through a small HLSL pass that turns the console's argument records into dispatch and draw arguments, then two `ExecuteIndirect` calls (`mesh_indirect.rs`). - The compute form has its own entry in the shader cache (`shader.mesh-fallback`). **Tools:** - `victory mesh-census` counts what the title's mesh programs are made of and how they translate both ways. It prints counts only. - `fallback_frame_cost` is an ignored benchmark of the fallback's per-frame cost. Seven commits, one per step. `mesh-census` (5f0b602) stands alone and can be split out if preferred. ## Tested Synthetic, no game data, on Windows 10 + GTX 1060 (no mesh shaders, Agility 1.620.2 for the GPU tests) and WARP 1.0.22 (mesh shaders): - The compute form's buffer contents are checked word by word. - Drawn through the fallback, the image matches the mesh shader's own image on WARP within 1e-6 on the same device. That holds with and without per-primitive outputs. - Unit tests check `mesh_output_bytes` at the 32,768-byte boundary, and the indirect argument pass on the GPU. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean. - Shader and GPU tests pass. On Windows 10 they need an SM 6.6 test runtime, here #486's. From testers on #3, with their own copies of the title: - @fuzeofficlal: the indirect path through `State::execute_indirect` matches direct draws pixel for pixel on an RTX 5090 and on WARP. That covers indexed and expanded draws, with and without a count, and a zero count. - @permadiego: Vega 7 iGPU (no mesh shaders), all 8,765 mesh containers in the title. Every one of the 8,152 that work as mesh shaders also translates, validates and gets both pipelines through the fallback. 53 more that are over the 32 KiB limit work only through it. None has per-primitive outputs. ## Open - **Cost per draw.** On a GTX 1060, 7,000 fallback draws take ~33 ms per frame as recorded here, against ~1.9 ms with the compute passes batched ahead of the draws (numbers on #3). Batching needs an ordering rule, because a compute pass may read what earlier work in the list wrote. I've asked on #3 before building it. - **Wave64 on 32-lane hosts.** The compute form goes through the same `lane_index()` as the mesh form, so #578's refusal and the lane-numbering work in #940 / #189 apply here too. - **In-game.** Nobody has yet drawn the title's world through it on a GPU without mesh shaders end to end. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DenRakEiw commented 2026-11-24 14:32:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T14:32:59Z.

Review: APPROVED


Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP:

  • cargo test -p victory-gpu: 57 passed, 0 failed, 1 ignored
  • cargo test -p victory-shader: 126 passed, 0 failed, 2 ignored (including all 3 new emit::mesh_compute_tests::* tests on RTX 5090 and WARP)
  • cargo clippy -p victory-gpu -p victory-shader --all-targets: 0 warnings
  • cargo xtask policy: ok (160 files ok)

Impressive compute-fallback lowering for mesh pipelines; all mesh-as-compute readback and draw parity tests pass cleanly on RTX 5090 + WARP. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6041142918 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#pullrequestreview-6041142918). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T14:32:59Z. **Review:** APPROVED --- Tested merged cleanly onto `main` (`ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC) with **NVIDIA GeForce RTX 5090** (Blackwell) and **WARP**: - `cargo test -p victory-gpu`: **57 passed, 0 failed, 1 ignored** - `cargo test -p victory-shader`: **126 passed, 0 failed, 2 ignored** (including all 3 new `emit::mesh_compute_tests::*` tests on RTX 5090 and WARP) - `cargo clippy -p victory-gpu -p victory-shader --all-targets`: **0 warnings** - `cargo xtask policy`: ok (`160 files ok`) Impressive compute-fallback lowering for mesh pipelines; all mesh-as-compute readback and draw parity tests pass cleanly on RTX 5090 + WARP. Approving. AI-assisted (Gemini 4 Neon).
EduBertozzi commented 2026-11-24 15:04:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T14:33:13Z.


Thanks @DenRakEiw. That is the first independent run of the synthetic tests on an RTX 5090 and WARP, where the fallback runs next to a native mesh shader to compare against.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134564061 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134564061). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T14:33:13Z. --- Thanks @DenRakEiw. That is the first independent run of the synthetic tests on an RTX 5090 and WARP, where the fallback runs next to a native mesh shader to compare against. AI-assisted (Claude Code).
MichaelSmithAI commented 2026-11-24 15:04:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:44:20Z.


The four mesh-compute tests and four indirect-argument tests passed on RTX 4090 under Wine/vkd3d-proton 3.2. The direct indexed and expanded fallback fixtures matched the native mesh pixels on that adapter. The indirect tests checked record conversion and count handling. The timing benchmark remained ignored.

A separate compute-only readback found an initialization gap when a group declares more primitives than it has lanes. With three lanes and four primitive records, the last record retained all three prefilled ones. The follow-up on this branch initializes the remaining records. Both groups then kept the expected triangle and all unused indices read zero. Five focused shader tests passed at the follow-up head. Wave64 behavior and title output remain open.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134866852 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134866852). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:44:20Z. --- The four mesh-compute tests and four indirect-argument tests passed on RTX 4090 under Wine/vkd3d-proton 3.2. The direct indexed and expanded fallback fixtures matched the native mesh pixels on that adapter. The indirect tests checked record conversion and count handling. The timing benchmark remained ignored. A separate compute-only readback found an initialization gap when a group declares more primitives than it has lanes. With three lanes and four primitive records, the last record retained all three prefilled ones. The [follow-up on this branch](https://github.com/EduBertozzi/VIctory/pull/2) initializes the remaining records. Both groups then kept the expected triangle and all unused indices read zero. Five focused shader tests passed at the follow-up head. Wave64 behavior and title output remain open.
EduBertozzi commented 2026-11-24 15:04:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T14:47:40Z.


Thanks @MichaelSmithAI, that's a real bug. The fallback draws 3 * max_primitives indices per group, so with pooled scratch, a stale record above the last lane would have drawn a stale triangle.

I reproduced it on native Windows 10 (GTX 1060): with lower.rs from 2704a57, the new test fails with group 0's fourth record still [1, 1, 1], and with the fix it passes. Since lane n exports primitive n, slots at or above the thread count are never exported, so zeroing them can't race with a real write.

Merged your fork PR into this branch. I added 13d3718 on top, because CI's clippy refuses chunks_exact with a constant size, so the test now uses as_chunks::<12>(). Clippy is clean in both CI modes, and the five mesh compute tests pass on the GTX 1060.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134957093 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134957093). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T14:47:40Z. --- Thanks @MichaelSmithAI, that's a real bug. The fallback draws `3 * max_primitives` indices per group, so with pooled scratch, a stale record above the last lane would have drawn a stale triangle. I reproduced it on native Windows 10 (GTX 1060): with `lower.rs` from `2704a57`, the new test fails with group 0's fourth record still `[1, 1, 1]`, and with the fix it passes. Since lane *n* exports primitive *n*, slots at or above the thread count are never exported, so zeroing them can't race with a real write. Merged [your fork PR](https://github.com/EduBertozzi/VIctory/pull/2) into this branch. I added [`13d3718`](https://github.com/EduBertozzi/VIctory/commit/13d3718) on top, because CI's clippy refuses `chunks_exact` with a constant size, so the test now uses `as_chunks::<12>()`. Clippy is clean in both CI modes, and the five mesh compute tests pass on the GTX 1060. AI-assisted (Claude Code).
Zipettte commented 2026-11-24 16:05:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:13:15Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 13d3718: cargo test -p victory -p victory-gpu -p victory-shader passes, 187 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135656385 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7135656385). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T15:13:15Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 13d3718: `cargo test -p victory -p victory-gpu -p victory-shader` passes, 187 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
zlwbbb-del commented 2026-11-24 17:04:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zlwbbb-del on 2026-11-24T16:55:07Z.


Tested on an RX 470 — the report follows. The results are not encouraging.

First, thanks — the fallback does what it says. I could not find a report of it running
against title data on a GPU without mesh shaders, so here is one, with the numbers.

AI-assisted (DeepSeek). Hardware, timings and log excerpts above are as measured on this
machine; the raw logs are kept and can be attached on request.*
issue-mesh-fallback-rx470.md

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138407767 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7138407767). Originally posted by [zlwbbb-del](https://github.com/zlwbbb-del) on 2026-11-24T16:55:07Z. --- Tested on an RX 470 — the report follows. The results are not encouraging. First, thanks — the fallback does what it says. I could not find a report of it running against title data on a GPU without mesh shaders, so here is one, with the numbers. AI-assisted (DeepSeek). Hardware, timings and log excerpts above are as measured on this machine; the raw logs are kept and can be attached on request.* [issue-mesh-fallback-rx470.md](https://github.com/user-attachments/files/35358277/issue-mesh-fallback-rx470.md)
EduBertozzi commented 2026-11-24 18:05:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T17:23:52Z.


@zlwbbb-del thank you, this is the first run of the fallback against the title on a GPU without mesh shaders. Both problems you found are real, and both are fixed on the branch now. Please re-run when you can.

1. Root signature overlap: fixed in 4e73e71, but not the way you proposed. Sharing one parameter between the stages would give the pixel shader the mesh stage's user data, or the other way round. Each stage has its own user data at b0, its own immediate samplers at s<n>, and its own root views at the same slot numbers. Instead, the compute form now binds in spaces of its own: user data and samplers in space 8, root views in 9 (MESH_COMPUTE_SPACES). victory-gpu builds the mesh stage's ALL-visible parameters there when it takes the fallback, so they no longer overlap the pixel stage's. A new test reproduces your error: a compute form that reads user data, next to a pixel shader with its own b0. In the old spaces D3D12 refuses the root signature, and in the new ones the compute pipeline builds against it. Its synthetic programs don't use root views or immediate samplers, so those two moves are covered by the same code path but not by a test of their own.

2. Memory: 9398d08. You were right that it was the fallback's own buffers. Every list that made a single fallback draw kept a 64 MiB chunk per pool, and every indirect mesh draw reserved its worst case (32 MiB) in a region of its own, so dozens of lists added up to gigabytes. Now:

  • a list's first chunk is 1 MiB, and each further one doubles up to 64 MiB;
  • past 64 MiB a pool reuses its chunks from the start. Each fallback draw ends by moving its chunks from read back to UAV, which waits for the draw's reads before any later write, so the reuse is safe.

Per list, the cost is now at most 64 MiB per pool plus one region. What I can't tell from here is how many lists the title keeps, since pools live as long as their list. If no shader-writable buffer still shows up, the per-list count of those warnings would tell whether a pool shared across lists is the next step.

To your questions:

  • Agility: for Windows 10 the branch needs a newer runtime: #175 (exe exports) or #969 (VICTORY_D3D12_AGILITY, no exports).
  • The two that don't take the compute form fail with the same translator classes the census counts for the mesh form (a descriptor partly joined by control flow, a descriptor read from the first lane of …). They would fail as mesh shaders too.
  • VRAM: the fallback makes no other assumption. With the cap, it should use far less than before.

Thanks also to @Zipettte for the RX 7700 XT run at 13d3718. The new commits pass the shader and GPU suites on a GTX 1060 (Windows 10 + Agility), and clippy is clean in both CI modes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7139132025 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139132025). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T17:23:52Z. --- @zlwbbb-del thank you, this is the first run of the fallback against the title on a GPU without mesh shaders. Both problems you found are real, and both are fixed on the branch now. Please re-run when you can. **1. Root signature overlap: fixed in [`4e73e71`](https://github.com/EduBertozzi/VIctory/commit/4e73e71), but not the way you proposed.** Sharing one parameter between the stages would give the pixel shader the mesh stage's user data, or the other way round. Each stage has its own user data at `b0`, its own immediate samplers at `s<n>`, and its own root views at the same slot numbers. Instead, the compute form now binds in spaces of its own: user data and samplers in space 8, root views in 9 (`MESH_COMPUTE_SPACES`). `victory-gpu` builds the mesh stage's ALL-visible parameters there when it takes the fallback, so they no longer overlap the pixel stage's. A new test reproduces your error: a compute form that reads user data, next to a pixel shader with its own `b0`. In the old spaces D3D12 refuses the root signature, and in the new ones the compute pipeline builds against it. Its synthetic programs don't use root views or immediate samplers, so those two moves are covered by the same code path but not by a test of their own. **2. Memory: [`9398d08`](https://github.com/EduBertozzi/VIctory/commit/9398d08).** You were right that it was the fallback's own buffers. Every list that made a single fallback draw kept a 64 MiB chunk per pool, and every indirect mesh draw reserved its worst case (32 MiB) in a region of its own, so dozens of lists added up to gigabytes. Now: - a list's first chunk is 1 MiB, and each further one doubles up to 64 MiB; - past 64 MiB a pool reuses its chunks from the start. Each fallback draw ends by moving its chunks from read back to UAV, which waits for the draw's reads before any later write, so the reuse is safe. Per list, the cost is now at most 64 MiB per pool plus one region. What I can't tell from here is how many lists the title keeps, since pools live as long as their list. If `no shader-writable buffer` still shows up, the per-list count of those warnings would tell whether a pool shared across lists is the next step. To your questions: - **Agility:** for Windows 10 the branch needs a newer runtime: #175 (exe exports) or #969 (`VICTORY_D3D12_AGILITY`, no exports). - **The two that don't take the compute form** fail with the same translator classes the census counts for the mesh form (`a descriptor partly joined by control flow`, `a descriptor read from the first lane of …`). They would fail as mesh shaders too. - **VRAM:** the fallback makes no other assumption. With the cap, it should use far less than before. Thanks also to @Zipettte for the RX 7700 XT run at `13d3718`. The new commits pass the shader and GPU suites on a GTX 1060 (Windows 10 + Agility), and clippy is clean in both CI modes. AI-assisted (Claude Code).
L1DRE commented 2026-11-24 18:05:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by L1DRE on 2026-11-24T17:41:12Z.


In-game test of this PR on a GPU without mesh shaders: GTX 1070 Ti 8 GB (Pascal, 32-lane waves), Windows 11 23H2, driver 582.53, title 1.0.2.1 Series X, release build. This PR was merged onto bittertea0323/VIctory@try/wave64 (#1086's stack: #189 + #940 + #737), with the #904 pc_format stand-ins and #951's root SRV windows (gangg111 a3a8fe7, 94908df). Env: VICTORY_WAVE64_EMULATE=emulate, VICTORY_MESH_FALLBACK=1, VICTORY_TEXTURE_MIP_DROP=2.

The fallback draws the world on this card after the two fixes below: 900-1,970 draws/frame at 0.2-0.6 fps, 386 fallback pipelines, around 2 minutes in the world. After that the 8 GB run out (root SRV windows and copies, not the fallback), and the frame is black (about 470 untranslated programs). Without the fixes, no fallback pipeline was made, and then the card ran out of memory within seconds of world entry.

1. Every fallback pipeline's root signature was refused (E_INVALIDARG)

With the fallback, HostPipeline::new gives the mesh stage D3D12_SHADER_VISIBILITY_ALL in the one root signature that the compute pass and the draw share. The pixel stage's user data is also b0 in USER_DATA_SPACE (and its static samplers are s0... in SAMPLER_SPACE), with PIXEL visibility. ALL overlaps PIXEL, so as soon as both stages read user data, the root signature is invalid. In the world, that was 149 of 149 fallback pipelines:

WARN victory_gpu::pipeline::host: host root signature refused error=E_INVALIDARG (0x80070057) shaders=[mesh d4111a6e6ea49d91, pixel c0a7fe77b1862e10]

The synthetic tests don't hit this, presumably because their pixel shader binds no user data.

Fix (local commit e0a36c4, pipeline/host.rs, draw.rs, mesh_indirect.rs):

  • The graphics root signature shows the mesh stage's parameters to VERTEX only. The fallback VS binds nothing in those spaces, so they cannot overlap the pixel stage.
  • The compute pass gets its own root signature, MeshFallback::root. It holds the mesh stage's parameters at the same indices, re-made with ALL visibility, plus its static samplers and then u0-u2. MeshFallback::outputs indexes into it.
  • bind_as takes the root signature to set, &p.root or &f.root.
  • mesh_indirect::signatures takes (compute_root, draw_root). The compute command signature is made against the compute root signature, and the draw signature against the graphics one.

After this: 0 refusals, 386 fallback pipelines made.

2. Fallback scratch grew without bound per list: out of memory on world entry

HostList::mesh_scratch(…, ScratchPool::Data) gives each draw a region of its own until the list is reset, and a list keeps its chunks (64 MiB minimum) for good. A world list with thousands of fallback draws took GBs. On 8 GB, CreateCommittedResource started failing with E_OUTOFMEMORY even for 16x4 textures, and the device was removed less than a second later.

The draw already transitions its chunk read → UAV after reading it, and that orders the next draw's writes after those reads. So for the Data pool, each draw can start over at offset 0 of the first chunk big enough. Local commit 7878d56, host.rs:

// Pool::region gains `rewind: bool`; mesh_scratch passes `pool == ScratchPool::Data`.
if rewind {
    for c in &mut self.chunks {
        c.2 = 0; // used
    }
    self.current = 0;
}

MESH_CHUNK went from 64 MiB to 4 MiB too, since with reuse a list's chunk only needs to fit its largest draw. draws_get_their_own_regions_and_chunks_come_back_after_a_reset still passes (with rewind = false). With both changes, peak dedicated memory stayed at the card's 7.86 GB, but the out-of-memory failures moved from the fallback to the root SRV windows (no shared buffer / no sparse buffer).

Two smaller merge notes:

  • Merging onto #189 needs TranslateOptions threaded through translate_mesh_as_compute and the cache key. I added translate_mesh_as_compute_with(container, options) and keyed cached_as by the Wave64 mode byte.
  • a_mesh_program_run_as_compute_draws_what_the_mesh_shader_draws and per_primitive_outputs_… panic with "no device with mesh shaders to compare with" on a host whose WARP lacks mesh shaders. The fallback image itself passes the coverage checks before that point.

The changes are small enough to apply by hand onto this PR. I can post the full diffs if that helps.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7139557265 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139557265). Originally posted by [L1DRE](https://github.com/L1DRE) on 2026-11-24T17:41:12Z. --- In-game test of this PR on a GPU without mesh shaders: **GTX 1070 Ti 8 GB** (Pascal, 32-lane waves), Windows 11 23H2, driver 582.53, title 1.0.2.1 Series X, release build. This PR was merged onto `bittertea0323/VIctory@try/wave64` (#1086's stack: #189 + #940 + #737), with the #904 `pc_format` stand-ins and #951's root SRV windows (gangg111 `a3a8fe7`, `94908df`). Env: `VICTORY_WAVE64_EMULATE=emulate`, `VICTORY_MESH_FALLBACK=1`, `VICTORY_TEXTURE_MIP_DROP=2`. The fallback draws the world on this card after the two fixes below: 900-1,970 draws/frame at 0.2-0.6 fps, 386 fallback pipelines, around 2 minutes in the world. After that the 8 GB run out (root SRV windows and copies, not the fallback), and the frame is black (about 470 untranslated programs). Without the fixes, no fallback pipeline was made, and then the card ran out of memory within seconds of world entry. ### 1. Every fallback pipeline's root signature was refused (`E_INVALIDARG`) With the fallback, `HostPipeline::new` gives the mesh stage `D3D12_SHADER_VISIBILITY_ALL` in the one root signature that the compute pass and the draw share. The pixel stage's user data is also `b0` in `USER_DATA_SPACE` (and its static samplers are `s0...` in `SAMPLER_SPACE`), with `PIXEL` visibility. `ALL` overlaps `PIXEL`, so as soon as both stages read user data, the root signature is invalid. In the world, that was 149 of 149 fallback pipelines: ``` WARN victory_gpu::pipeline::host: host root signature refused error=E_INVALIDARG (0x80070057) shaders=[mesh d4111a6e6ea49d91, pixel c0a7fe77b1862e10] ``` The synthetic tests don't hit this, presumably because their pixel shader binds no user data. Fix (local commit `e0a36c4`, `pipeline/host.rs`, `draw.rs`, `mesh_indirect.rs`): - The graphics root signature shows the mesh stage's parameters to `VERTEX` only. The fallback VS binds nothing in those spaces, so they cannot overlap the pixel stage. - The compute pass gets its own root signature, `MeshFallback::root`. It holds the mesh stage's parameters at the same indices, re-made with `ALL` visibility, plus its static samplers and then `u0`-`u2`. `MeshFallback::outputs` indexes into it. - `bind_as` takes the root signature to set, `&p.root` or `&f.root`. - `mesh_indirect::signatures` takes `(compute_root, draw_root)`. The compute command signature is made against the compute root signature, and the draw signature against the graphics one. After this: 0 refusals, 386 fallback pipelines made. ### 2. Fallback scratch grew without bound per list: out of memory on world entry `HostList::mesh_scratch(…, ScratchPool::Data)` gives each draw a region of its own until the list is reset, and a list keeps its chunks (64 MiB minimum) for good. A world list with thousands of fallback draws took GBs. On 8 GB, `CreateCommittedResource` started failing with `E_OUTOFMEMORY` even for 16x4 textures, and the device was removed less than a second later. The draw already transitions its chunk read → UAV after reading it, and that orders the next draw's writes after those reads. So for the `Data` pool, each draw can start over at offset 0 of the first chunk big enough. Local commit `7878d56`, `host.rs`: ```rust // Pool::region gains `rewind: bool`; mesh_scratch passes `pool == ScratchPool::Data`. if rewind { for c in &mut self.chunks { c.2 = 0; // used } self.current = 0; } ``` `MESH_CHUNK` went from 64 MiB to 4 MiB too, since with reuse a list's chunk only needs to fit its largest draw. `draws_get_their_own_regions_and_chunks_come_back_after_a_reset` still passes (with `rewind = false`). With both changes, peak dedicated memory stayed at the card's 7.86 GB, but the out-of-memory failures moved from the fallback to the root SRV windows (`no shared buffer` / `no sparse buffer`). Two smaller merge notes: - Merging onto #189 needs `TranslateOptions` threaded through `translate_mesh_as_compute` and the cache key. I added `translate_mesh_as_compute_with(container, options)` and keyed `cached_as` by the Wave64 mode byte. - `a_mesh_program_run_as_compute_draws_what_the_mesh_shader_draws` and `per_primitive_outputs_…` panic with "no device with mesh shaders to compare with" on a host whose WARP lacks mesh shaders. The fallback image itself passes the coverage checks before that point. The changes are small enough to apply by hand onto this PR. I can post the full diffs if that helps.
EduBertozzi commented 2026-11-24 18:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T17:42:39Z.


@L1DRE thank you, this is the first report of the fallback drawing the world end to end on a Pascal card, and on the same generation as my GTX 1060.

You found the same two problems as @zlwbbb-del on the RX 470 above. Both are fixed on the branch now, in a slightly different way from yours:

  1. Root signature overlap: 4e73e71. Instead of a second root signature, the compute form binds its user data and samplers in space 8 and its root views in space 9 (MESH_COMPUTE_SPACES). The one shared root signature keeps them ALL-visible without overlapping the pixel stage's b0, s<n> and root views. Your approach (VERTEX in the graphics root signature, plus a compute root signature with the same indices) also works. The space move keeps bind_as and the indirect command signatures as they are.
  2. Scratch: 9398d08. Same reasoning as yours: the read→UAV transition at the end of each draw makes reuse safe. A list's first chunk is now 1 MiB and doubles up to 64 MiB, and past a 64 MiB budget the pool rewinds to its first chunk. Your rewind on every Data draw holds less memory still. I kept per-draw regions up to the budget so the batching discussed above (computes ahead of draws) has room later. If your peak numbers show the budget matters on 8 GB, a smaller one is a one-line change.

The panic you hit without a mesh-capable WARP is fixed in 31568ce: the two image tests now skip the comparison when nothing can draw the reference. The TranslateOptions threading belongs with #189, so I'll adapt translate_mesh_as_compute and the cache key when that lands, as you did.

A re-run at the branch head on the same stack would show whether the remaining out-of-memory is all root SRV windows and copies, as you suspect.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7139591994 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139591994). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T17:42:39Z. --- @L1DRE thank you, this is the first report of the fallback drawing the world end to end on a Pascal card, and on the same generation as my GTX 1060. You found the same two problems as @zlwbbb-del on the RX 470 [above](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139132025). Both are fixed on the branch now, in a slightly different way from yours: 1. **Root signature overlap: [`4e73e71`](https://github.com/EduBertozzi/VIctory/commit/4e73e71).** Instead of a second root signature, the compute form binds its user data and samplers in space 8 and its root views in space 9 (`MESH_COMPUTE_SPACES`). The one shared root signature keeps them ALL-visible without overlapping the pixel stage's `b0`, `s<n>` and root views. Your approach (VERTEX in the graphics root signature, plus a compute root signature with the same indices) also works. The space move keeps `bind_as` and the indirect command signatures as they are. 2. **Scratch: [`9398d08`](https://github.com/EduBertozzi/VIctory/commit/9398d08).** Same reasoning as yours: the read→UAV transition at the end of each draw makes reuse safe. A list's first chunk is now 1 MiB and doubles up to 64 MiB, and past a 64 MiB budget the pool rewinds to its first chunk. Your `rewind` on every Data draw holds less memory still. I kept per-draw regions up to the budget so the batching discussed above (computes ahead of draws) has room later. If your peak numbers show the budget matters on 8 GB, a smaller one is a one-line change. The panic you hit without a mesh-capable WARP is fixed in [`31568ce`](https://github.com/EduBertozzi/VIctory/commit/31568ce): the two image tests now skip the comparison when nothing can draw the reference. The `TranslateOptions` threading belongs with #189, so I'll adapt `translate_mesh_as_compute` and the cache key when that lands, as you did. A re-run at the branch head on the same stack would show whether the remaining out-of-memory is all root SRV windows and copies, as you suspect. AI-assisted (Claude Code).
L1DRE commented 2026-11-24 18:06:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by L1DRE on 2026-11-24T18:00:22Z.


Re-ran on the PR head (31568ce) with the same stack as before: #1086's try/wave64, the #904 stand-ins and #951's root SRV windows. My two local fixes were reverted, so 4e73e71 and 9398d08 are the ones in use. Same card (GTX 1070 Ti 8 GB) and env: VICTORY_WAVE64_EMULATE=emulate, VICTORY_MESH_FALLBACK=1, VICTORY_TEXTURE_MIP_DROP=2. One extra line was needed after #189: options: TranslateOptions::default() in the new test's lower::Parts. With it, 152 shader tests pass and the two image tests skip as intended.

4e73e71: 0 root signature or pipeline refusals, 380-410 fallback pipelines. Works here.

On the budget, the cap does matter at 8 GB. Time in the world from the first frame over 40 draws until the device was removed, one run each:

scratch time in world draws/frame (last frames)
PR head, MESH_POOL_BUDGET = 64 << 20 55 s 59-219
PR head, MESH_POOL_BUDGET = 4 << 20 (that line only) 2 min 43 s 849-1,030
my earlier local rewind (4 MiB chunks) 2 min 13 s 454-584

All three end the same way. Peak dedicated usage is pinned at 7.86 GB. Then no shared buffer (1 MiB title memory windows) and no sparse buffer failures come (154-549 and 0-687 per run), then no host texture, then DEVICE_HUNG. None of the failures is a fallback scratch allocation. So you were right that what remains is the root SRV windows and copies (copies run 0.7-1.2 GB per world frame here). On an 8 GB card, though, a 64 MiB per pool per list budget takes enough of the headroom to cut the time in the world by about 3x. A lower budget, or one scaled to the adapter's budget, would help cards like this. I didn't measure the cost of 4 MiB to the batching you plan.

Caveat: one run per row, loaded from an HDD, so the times have some noise, but not 3x.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140018955 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7140018955). Originally posted by [L1DRE](https://github.com/L1DRE) on 2026-11-24T18:00:22Z. --- Re-ran on the PR head (`31568ce`) with the same stack as before: #1086's `try/wave64`, the #904 stand-ins and #951's root SRV windows. My two local fixes were reverted, so `4e73e71` and `9398d08` are the ones in use. Same card (GTX 1070 Ti 8 GB) and env: `VICTORY_WAVE64_EMULATE=emulate`, `VICTORY_MESH_FALLBACK=1`, `VICTORY_TEXTURE_MIP_DROP=2`. One extra line was needed after #189: `options: TranslateOptions::default()` in the new test's `lower::Parts`. With it, 152 shader tests pass and the two image tests skip as intended. `4e73e71`: 0 root signature or pipeline refusals, 380-410 fallback pipelines. Works here. On the budget, the cap does matter at 8 GB. Time in the world from the first frame over 40 draws until the device was removed, one run each: | scratch | time in world | draws/frame (last frames) | |---|---|---| | PR head, `MESH_POOL_BUDGET = 64 << 20` | 55 s | 59-219 | | PR head, `MESH_POOL_BUDGET = 4 << 20` (that line only) | 2 min 43 s | 849-1,030 | | my earlier local `rewind` (4 MiB chunks) | 2 min 13 s | 454-584 | All three end the same way. Peak dedicated usage is pinned at 7.86 GB. Then `no shared buffer` (1 MiB title memory windows) and `no sparse buffer` failures come (154-549 and 0-687 per run), then `no host texture`, then `DEVICE_HUNG`. None of the failures is a fallback scratch allocation. So you were right that what remains is the root SRV windows and copies (copies run 0.7-1.2 GB per world frame here). On an 8 GB card, though, a 64 MiB per pool per list budget takes enough of the headroom to cut the time in the world by about 3x. A lower budget, or one scaled to the adapter's budget, would help cards like this. I didn't measure the cost of 4 MiB to the batching you plan. Caveat: one run per row, loaded from an HDD, so the times have some noise, but not 3x.
EduBertozzi commented 2026-11-24 19:04:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T18:16:00Z.


On batching the compute passes, since I suggested it above: the in-game numbers say it's not worth the risk yet.

@L1DRE's GTX 1070 Ti run draws 900–1,970 draws per frame at 0.2–0.6 fps, which is 1.7–5 s per frame. The per-draw cost the benchmark measured on a GTX 1060 is about 4.5 µs, so at ~2,000 fallback draws the switching costs ~9 ms. That's under 1% of those frames. The time is elsewhere: copies and memory pressure (#1086 measured 406 ms per frame in copies alone).

Batching also means recording a draw's compute pass ahead of it. bind_as builds descriptor tables and root views (with their copies of title memory) into the same list at that point, so moving the pass forward needs every one of those writes ordered before it. Without a capture to check against, that's easy to get wrong. So I'm leaving it until frames are down in the tens of milliseconds, where 9 ms would matter, and someone with the title can check its output. The benchmark (fallback_frame_cost) is in the branch to measure it then.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140398446 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7140398446). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T18:16:00Z. --- On batching the compute passes, since I suggested it above: the in-game numbers say it's not worth the risk yet. @L1DRE's GTX 1070 Ti run draws 900–1,970 draws per frame at 0.2–0.6 fps, which is 1.7–5 s per frame. The per-draw cost the benchmark measured on a GTX 1060 is about 4.5 µs, so at ~2,000 fallback draws the switching costs ~9 ms. That's under 1% of those frames. The time is elsewhere: copies and memory pressure (#1086 measured 406 ms per frame in copies alone). Batching also means recording a draw's compute pass ahead of it. `bind_as` builds descriptor tables and root views (with their copies of title memory) into the same list at that point, so moving the pass forward needs every one of those writes ordered before it. Without a capture to check against, that's easy to get wrong. So I'm leaving it until frames are down in the tens of milliseconds, where 9 ms would matter, and someone with the title can check its output. The benchmark (`fallback_frame_cost`) is in the branch to measure it then. AI-assisted (Claude Code).
zlwbbb-del commented 2026-11-24 20:03:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zlwbbb-del on 2026-11-24T19:09:29Z.


Re-ran on 31568ce. Both fixes hold on an 8 GB card with no mesh shaders, and there is one new crash worth your attention. Full numbers are in the attached report.

Fixed, verified: E_OUTOFMEMORY 7570 → 0, no shader-writable buffer 186–746 → 0, root signature overlap 165 → 0. The fallback now takes 852–904 mesh programs, and the stages that used to die at ~70 s run 5 minutes and more without a memory failure. With the pool cap there is not a single no shader-writable buffer in the run, so the per-list count you asked about has nothing to report yet.

You were right about my proposed root signature fix and I was wrong — sharing one parameter would give the pixel shader the mesh stage's user data. Spaces 8/9 are the correct shape.

New: 0x80000003 (EXCEPTION_BREAKPOINT) at victory-image+0x5149aec, 14 occurrences on this head, absent on 13d3718. It happens with both --unimplemented trap and --unimplemented zero, so it is not an unimplemented import; the lines just before it are ordinary fallback work. Can you reach +0x5149aec in the disassembly, or do you want the dump? The title writes its own minidump and VIctory blocks the upload, so I can copy it out.

The title was still in its opening sequence (credits rolling, prologue unfinished) for the whole run, so I cannot yet claim the world geometry is right. Screen sampling did show real output: richest frame 93.67 % non-black with 8898 colours, the only strong colour being (255,102,225) at 25,716 px bounded to x[104..494] y[614..816] (bottom-left, minimap position). Draws per frame went 346 → 948 → 1831 → 2341 → 2930 → 3323, with 53 % submitted at the last counted frame — the other 47 % matches the 481 programs that do not translate here (up from 86–259, because the run gets much further now).

Host: Windows 10 LTSC 19045, i5-11400H, 63.6 GB, Radeon RX 470 8 GB (Polaris, no mesh shaders), driver 31.0.21925.1001, title 1.0.2.1, Series X, VICTORY_MESH_FALLBACK=1, stock settings.xml. I had to add the Agility opt-in myself (the #175 exe-export shape; the branch has neither that nor #969's VICTORY_D3D12_AGILITY), nothing else changed.

Happy to re-run on any instrumented build — this card is a clean no-mesh host and the memory problem is out of the way now.

AI-assisted (DeepSeek). Every number above comes from the run's own log; the log and the sampled frames are kept and can be attached on request.
report-rx470-en.md

<!-- greyfinch-sync:Marvisak/VIctory:comment:7141682786 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7141682786). Originally posted by [zlwbbb-del](https://github.com/zlwbbb-del) on 2026-11-24T19:09:29Z. --- Re-ran on 31568ce. Both fixes hold on an 8 GB card with no mesh shaders, and there is one new crash worth your attention. Full numbers are in the attached report. Fixed, verified: E_OUTOFMEMORY 7570 → 0, no shader-writable buffer 186–746 → 0, root signature overlap 165 → 0. The fallback now takes 852–904 mesh programs, and the stages that used to die at ~70 s run 5 minutes and more without a memory failure. With the pool cap there is not a single no shader-writable buffer in the run, so the per-list count you asked about has nothing to report yet. You were right about my proposed root signature fix and I was wrong — sharing one parameter would give the pixel shader the mesh stage's user data. Spaces 8/9 are the correct shape. New: 0x80000003 (EXCEPTION_BREAKPOINT) at victory-image+0x5149aec, 14 occurrences on this head, absent on 13d3718. It happens with both --unimplemented trap and --unimplemented zero, so it is not an unimplemented import; the lines just before it are ordinary fallback work. Can you reach +0x5149aec in the disassembly, or do you want the dump? The title writes its own minidump and VIctory blocks the upload, so I can copy it out. The title was still in its opening sequence (credits rolling, prologue unfinished) for the whole run, so I cannot yet claim the world geometry is right. Screen sampling did show real output: richest frame 93.67 % non-black with 8898 colours, the only strong colour being (255,102,225) at 25,716 px bounded to x[104..494] y[614..816] (bottom-left, minimap position). Draws per frame went 346 → 948 → 1831 → 2341 → 2930 → 3323, with 53 % submitted at the last counted frame — the other 47 % matches the 481 programs that do not translate here (up from 86–259, because the run gets much further now). Host: Windows 10 LTSC 19045, i5-11400H, 63.6 GB, Radeon RX 470 8 GB (Polaris, no mesh shaders), driver 31.0.21925.1001, title 1.0.2.1, Series X, VICTORY_MESH_FALLBACK=1, stock settings.xml. I had to add the Agility opt-in myself (the #175 exe-export shape; the branch has neither that nor #969's VICTORY_D3D12_AGILITY), nothing else changed. Happy to re-run on any instrumented build — this card is a clean no-mesh host and the memory problem is out of the way now. AI-assisted (DeepSeek). Every number above comes from the run's own log; the log and the sampled frames are kept and can be attached on request. [report-rx470-en.md](https://github.com/user-attachments/files/35365978/report-rx470-en.md)
EduBertozzi commented 2026-11-24 20:03:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T19:10:30Z.


@zlwbbb-del thank you, that's the confirmation the fixes needed: no out-of-memory errors at all, no refused root signatures, and 5 minutes or more instead of ~70 s.

The new breakpoint isn't from the fallback. It's the title's own stop at +0x5149aec that #698 traced on NVIDIA with native mesh shaders, where the same stack ends in the same address. There, the title's crash report showed its INSTANCE_LIST pool exactly full (45000/45000). The likely mechanism, as reported in #698: dropped draws never retire their instances, so the pool fills and the title asserts. Your run only reaches it now because 13d3718 died of memory at ~70 s first. To check it's the same here, see whether the title's crash report (temp\*.crash.log in the data folder) shows INSTANCE_LIST 45000/45000.

From the runs in #698, the drops that fill it come from untranslated programs. Fixing the four culling shaders refused as a structured buffer of unknown stride (#704 with #193) removed the breakpoint there: 11+ minutes with no stop. With 481 programs not translating in your run, adding those two would show whether the RX 470 gets past it too.

On the dump: please don't attach or upload it. The title's minidump holds its memory, which docs/asset-policy.md keeps out of the repository and its issues. I don't need it for this, and I can't look up title addresses myself.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7141708161 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7141708161). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T19:10:30Z. --- @zlwbbb-del thank you, that's the confirmation the fixes needed: no out-of-memory errors at all, no refused root signatures, and 5 minutes or more instead of ~70 s. The new breakpoint isn't from the fallback. It's the title's own stop at `+0x5149aec` that #698 traced on NVIDIA with **native** mesh shaders, where the same stack ends in the same address. There, the title's crash report showed its `INSTANCE_LIST` pool exactly full (45000/45000). The likely mechanism, as reported in #698: dropped draws never retire their instances, so the pool fills and the title asserts. Your run only reaches it now because `13d3718` died of memory at ~70 s first. To check it's the same here, see whether the title's crash report (`temp\*.crash.log` in the data folder) shows `INSTANCE_LIST 45000/45000`. From the runs in #698, the drops that fill it come from untranslated programs. Fixing the four culling shaders refused as `a structured buffer of unknown stride` (#704 with #193) removed the breakpoint there: 11+ minutes with no stop. With 481 programs not translating in your run, adding those two would show whether the RX 470 gets past it too. On the dump: please don't attach or upload it. The title's minidump holds its memory, which `docs/asset-policy.md` keeps out of the repository and its issues. I don't need it for this, and I can't look up title addresses myself. AI-assisted (Claude Code).
fuzeofficlal commented 2026-11-24 21:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T20:06:56Z.


Tested the mesh-to-compute fallback stacked with Wave64 emulation (#189) and #940 across NVIDIA GeForce RTX 5090, AMD Radeon(TM) Graphics (RDNA2 iGPU), and Microsoft D3D12 WARP (VICTORY_D3D12_DEBUG=1), with two integration findings verified in fuzeofficlal/VIctory@39cddd6:

  1. Host lane index in ms_6_6 on 32-lane RDNA hosts (emit/lower.rs): Checking if self.s.wave_size != Some(self.wave()) (rather than if self.s.mesh.is_some() alone) emits WAVE_OPS + WaveGetLaneIndex both when a Wave64 mesh program runs on a native ms_6_6 RDNA adapter whose default mesh wave is 32 lanes and when lowered through the Wave32 compute fallback.
  2. Disk shader cache key (shader_cache.rs): Including TranslateOptions { wave64 } in MESH_FALLBACK's cache key prefix prevents stale Native vs Wave32/Emulate compute-fallback blobs from colliding across launches.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7143061541 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7143061541). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-24T20:06:56Z. --- Tested the mesh-to-compute fallback stacked with Wave64 emulation (`#189`) and `#940` across **NVIDIA GeForce RTX 5090**, **AMD Radeon(TM) Graphics (RDNA2 iGPU)**, and **Microsoft D3D12 WARP** (`VICTORY_D3D12_DEBUG=1`), with two integration findings verified in [`fuzeofficlal/VIctory@39cddd6`](https://github.com/fuzeofficlal/VIctory/tree/fix/m2-940-mesh-host-lanes): 1. **Host lane index in `ms_6_6` on 32-lane RDNA hosts (`emit/lower.rs`)**: Checking `if self.s.wave_size != Some(self.wave())` (rather than `if self.s.mesh.is_some()` alone) emits `WAVE_OPS` + `WaveGetLaneIndex` both when a Wave64 mesh program runs on a native `ms_6_6` RDNA adapter whose default mesh wave is 32 lanes *and* when lowered through the Wave32 compute fallback. 2. **Disk shader cache key (`shader_cache.rs`)**: Including `TranslateOptions { wave64 }` in `MESH_FALLBACK`'s cache key prefix prevents stale `Native` vs `Wave32`/`Emulate` compute-fallback blobs from colliding across launches.
EduBertozzi commented 2026-11-24 21:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T20:07:48Z.


Thanks @fuzeofficlal. Both are right, and both only exist once #189 (and #940) are underneath, since main has neither TranslateOptions nor the Wave64 modes:

  1. The lane-index condition belongs to #940's change to lane_index(). The compute form goes through the same function (s.mesh stays set when mesh_as_compute is on, see my note on #940). So a condition keyed on the wave size, as in your 39cddd6, covers native ms_6_6 on 32-lane RDNA and the fallback in one place.
  2. The cache key: agreed, and @L1DRE hit the same thing above. A cached compute form has to be keyed by the Wave64 mode it was lowered with. Without that, a Native blob and a Wave32/Emulate blob collide across launches.

When #189 lands I'll rebase onto it and add both, crediting your commit, so this PR doesn't depend on an unmerged one in the meantime.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143081959 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7143081959). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T20:07:48Z. --- Thanks @fuzeofficlal. Both are right, and both only exist once #189 (and #940) are underneath, since `main` has neither `TranslateOptions` nor the Wave64 modes: 1. **The lane-index condition** belongs to #940's change to `lane_index()`. The compute form goes through the same function (`s.mesh` stays set when `mesh_as_compute` is on, see my note on #940). So a condition keyed on the wave size, as in your `39cddd6`, covers native `ms_6_6` on 32-lane RDNA and the fallback in one place. 2. **The cache key**: agreed, and @L1DRE hit the same thing above. A cached compute form has to be keyed by the Wave64 mode it was lowered with. Without that, a `Native` blob and a `Wave32`/`Emulate` blob collide across launches. When #189 lands I'll rebase onto it and add both, crediting your commit, so this PR doesn't depend on an unmerged one in the meantime. AI-assisted (Claude Code).
elderdragon0 commented 2026-11-24 21:28:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by elderdragon0 on 2026-11-24T21:06:29Z.


Independent native Windows test of #961 at 31568ce. Windows 11 build 26300, Radeon RX 5700 XT (RDNA 1), AMD Adrenalin 26.11.2 (driver 32.0.21045.29003), Rust 1.98.1 MSVC, DXIL validator 1.9.2609.

D3D12 reported Shader Model 6.6, mesh shader tier 0, and wave sizes 32–64 on the RX 5700 XT. Both synthetic fallback image tests ran on hardware and matched the native mesh shader reference from WARP.

  • victory-shader, mesh_compute_tests: 6 passed, 0 failed, 1 ignored benchmark.
  • victory-gpu, mesh_indirect::tests: 4 passed, 0 failed, including GPU readbacks for indexed, expanded, and count-limited indirect records.
  • Full library suites: Cargo reported 128 passed for victory-shader and 59 for victory-gpu, with zero failures. Four shader comparison checks reported internal skips because the required compilers were unavailable.

Synthetic fixtures only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7144485064 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7144485064). Originally posted by [elderdragon0](https://github.com/elderdragon0) on 2026-11-24T21:06:29Z. --- Independent native Windows test of #961 at `31568ce`. Windows 11 build 26300, Radeon RX 5700 XT (RDNA 1), AMD Adrenalin 26.11.2 (driver 32.0.21045.29003), Rust 1.98.1 MSVC, DXIL validator 1.9.2609. D3D12 reported Shader Model 6.6, mesh shader tier 0, and wave sizes 32–64 on the RX 5700 XT. Both synthetic fallback image tests ran on hardware and matched the native mesh shader reference from WARP. - `victory-shader`, `mesh_compute_tests`: 6 passed, 0 failed, 1 ignored benchmark. - `victory-gpu`, `mesh_indirect::tests`: 4 passed, 0 failed, including GPU readbacks for indexed, expanded, and count-limited indirect records. - Full library suites: Cargo reported 128 passed for `victory-shader` and 59 for `victory-gpu`, with zero failures. Four shader comparison checks reported internal skips because the required compilers were unavailable. Synthetic fixtures only. AI-assisted.
EduBertozzi commented 2026-11-24 21:28:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T21:06:49Z.


Thanks @elderdragon0. It is the first RDNA 1 run, and that card matters for this path: its waves go up to 64 lanes, so the title's wave64 mesh programs can run as compute there as written, without the 32-lane emulation NVIDIA needs. It would be a good card for a run with the title too, if you have it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7144492927 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7144492927). Originally posted by [EduBertozzi](https://github.com/EduBertozzi) on 2026-11-24T21:06:49Z. --- Thanks @elderdragon0. It is the first RDNA 1 run, and that card matters for this path: its waves go up to 64 lanes, so the title's wave64 mesh programs can run as compute there as written, without the 32-lane emulation NVIDIA needs. It would be a good card for a run with the title too, if you have it. AI-assisted (Claude Code).
elderdragon0 commented 2026-11-24 22:02:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by elderdragon0 on 2026-11-24T21:36:16Z.


Retail follow-up on native Windows 11 build 26300, RX 5700 XT 8 GB (RDNA 1), AMD Adrenalin 26.11.2, title 1.0.2.1. Fresh save and cache, native D3D12, diagnostics build with DRED enabled.

  • Series X on #961 (31568ce) stopped before the window opened with Windows commit-limit error 1455.
  • In Series S, I tested #961 together with the presentation patch from #211 (2fb7a8b). The first-run menus displayed at about 30 FPS. After setup, the run reached up to 2,945 draws/frame. The world frame I observed was black.
  • The fallback translated 211 distinct mesh shaders and refused 17 distinct shaders. There were zero root-signature refusals.
  • The log recorded 5,974 shader-writable buffer allocation warnings with 0x8007000E. The process exited with 0x887A0005 about two minutes after the first fallback translation.

Aggregate diagnostics only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7145149208 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7145149208). Originally posted by [elderdragon0](https://github.com/elderdragon0) on 2026-11-24T21:36:16Z. --- Retail follow-up on native Windows 11 build 26300, RX 5700 XT 8 GB (RDNA 1), AMD Adrenalin 26.11.2, title 1.0.2.1. Fresh save and cache, native D3D12, diagnostics build with DRED enabled. - Series X on #961 (`31568ce`) stopped before the window opened with Windows commit-limit error 1455. - In Series S, I tested #961 together with the presentation patch from #211 (`2fb7a8b`). The first-run menus displayed at about 30 FPS. After setup, the run reached up to 2,945 draws/frame. The world frame I observed was black. - The fallback translated 211 distinct mesh shaders and refused 17 distinct shaders. There were zero root-signature refusals. - The log recorded 5,974 shader-writable buffer allocation warnings with `0x8007000E`. The process exited with `0x887A0005` about two minutes after the first fallback translation. Aggregate diagnostics only. AI-assisted.
elderdragon0 commented 2026-11-24 23:05:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by elderdragon0 on 2026-11-24T22:05:36Z.


Retail A/B on RX 5700 XT 8 GB, Windows 11 build 26300, AMD Adrenalin 26.11.2. Both runs used Series S, #961 (31568ce) + #211 (2fb7a8b), native D3D12, DRED, fresh caches, and copies of the same save. The only source change was MESH_POOL_BUDGET. One run per setting.

Metric 64 MiB 4 MiB
First logged sample with ≥500 draws to exit 33.9 s 46.4 s
Mesh scratch allocation warnings 1,768 3,063
Of those, 32 MiB requests 1,253 1,329
Peak dedicated GPU memory 7.63 GiB 7.58 GiB
Peak shared GPU memory 7.24 GiB 7.65 GiB
Windows commit immediately before first warning 39.41 / 40.00 GiB 39.45 / 41.07 GiB

Both runs exited with 0x887A0005. The 4 MiB run lasted longer by the draw-count measure, with similar dedicated memory use and more allocation failures. Windows reported different commit limits during the two runs, so the time difference needs replication. Aggregate diagnostics only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7145792743 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7145792743). Originally posted by [elderdragon0](https://github.com/elderdragon0) on 2026-11-24T22:05:36Z. --- Retail A/B on RX 5700 XT 8 GB, Windows 11 build 26300, AMD Adrenalin 26.11.2. Both runs used Series S, #961 (`31568ce`) + #211 (`2fb7a8b`), native D3D12, DRED, fresh caches, and copies of the same save. The only source change was `MESH_POOL_BUDGET`. One run per setting. | Metric | 64 MiB | 4 MiB | | --- | ---: | ---: | | First logged sample with ≥500 draws to exit | 33.9 s | 46.4 s | | Mesh scratch allocation warnings | 1,768 | 3,063 | | Of those, 32 MiB requests | 1,253 | 1,329 | | Peak dedicated GPU memory | 7.63 GiB | 7.58 GiB | | Peak shared GPU memory | 7.24 GiB | 7.65 GiB | | Windows commit immediately before first warning | 39.41 / 40.00 GiB | 39.45 / 41.07 GiB | Both runs exited with `0x887A0005`. The 4 MiB run lasted longer by the draw-count measure, with similar dedicated memory use and more allocation failures. Windows reported different commit limits during the two runs, so the time difference needs replication. Aggregate diagnostics only. AI-assisted.
michi-feny commented 2026-11-25 00:06:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by michi-feny on 2026-11-24T23:11:28Z.


I tested the synthetic mesh-compute fallback on a Radeon RX 5700 XT (8 GB, no mesh shaders) under native Windows 10 Pro 19045, AMD driver 32.0.21045.29003, with Rust 1.98.1 MSVC. The local checkout combined this PR at 31568ce with Agility PR #969 at f3457f8, using Microsoft's D3D12 Agility SDK 1.620.2 via VICTORY_D3D12_AGILITY. No title files or executable were used.

  • cargo test -p victory-shader --lib mesh_compute_tests -- --nocapture --test-threads=1: 6 passed, 0 failed, 1 ignored benchmark. The RX 5700 XT was detected without mesh shaders, and the compute fallback rendered the synthetic triangle and passed the pixel checks. The native mesh comparison could not run: this hardware has no mesh shaders, and WARP did not expose an SM 6.6 device here.
  • cargo test -p victory-gpu --lib mesh_indirect -- --nocapture --test-threads=1: 4 passed, 0 failed.

One Windows 10 integration issue surfaced when combining #961 with #969: the first shader test run had 5 failures because two helpers in mesh_compute_tests.rs still used the in-box D3D12SerializeVersionedRootSignature, which rejected the heap-indexing root-signature flags. In my local checkout, changing those two calls to #969's agility::serialize_versioned_root_signature made the six active shader tests pass. This change is local and has not been pushed; it depends on #969's helper.

These results cover only the synthetic tests on this GPU. They do not establish title compatibility, world rendering, or performance.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7147117935 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7147117935). Originally posted by [michi-feny](https://github.com/michi-feny) on 2026-11-24T23:11:28Z. --- I tested the synthetic mesh-compute fallback on a Radeon RX 5700 XT (8 GB, no mesh shaders) under native Windows 10 Pro 19045, AMD driver 32.0.21045.29003, with Rust 1.98.1 MSVC. The local checkout combined this PR at `31568ce` with Agility PR #969 at `f3457f8`, using Microsoft's D3D12 Agility SDK 1.620.2 via `VICTORY_D3D12_AGILITY`. No title files or executable were used. - `cargo test -p victory-shader --lib mesh_compute_tests -- --nocapture --test-threads=1`: 6 passed, 0 failed, 1 ignored benchmark. The RX 5700 XT was detected without mesh shaders, and the compute fallback rendered the synthetic triangle and passed the pixel checks. The native mesh comparison could not run: this hardware has no mesh shaders, and WARP did not expose an SM 6.6 device here. - `cargo test -p victory-gpu --lib mesh_indirect -- --nocapture --test-threads=1`: 4 passed, 0 failed. One Windows 10 integration issue surfaced when combining #961 with #969: the first shader test run had 5 failures because two helpers in `mesh_compute_tests.rs` still used the in-box `D3D12SerializeVersionedRootSignature`, which rejected the heap-indexing root-signature flags. In my local checkout, changing those two calls to #969's `agility::serialize_versioned_root_signature` made the six active shader tests pass. This change is local and has not been pushed; it depends on #969's helper. These results cover only the synthetic tests on this GPU. They do not establish title compatibility, world rendering, or performance.
Witredd commented 2026-11-25 00:06:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Witredd on 2026-11-24T23:37:24Z.


Tested on an RX 5600 XT (RDNA1, no mesh shaders), Ryzen 7 5700X, 16 GB RAM, Windows 11, at 31568ce as is (not merged with main).

  • cargo test -p victory-shader -p victory-gpu mesh: all 21 pass (the mesh-shader comparison skips without a mesh device).

  • fallback_frame_cost (release):

    draws × groups PerDraw Batched DrawsOnly
    1000 × 32 2.93 ms 0.52 ms 0.35 ms
    2000 × 16 5.33 ms 0.52 ms 0.35 ms
    7000 × 4 15.02 ms 0.54 ms 0.33 ms
    7000 × 16 15.32 ms 1.82 ms 1.23 ms
  • In game, own copy: fallback=true; 360 mesh pipelines bound during the world load, ~1,400 draws/frame at ~2.4 s/frame, no device loss. Both runs ended on the loading screen (it goes black, then the run stops) on E_OUTOFMEMORY: dedicated memory filled (5.8 of 6 GB), shared rose from 1.5 to 7.5 GB (limit ~8 GB on 16 GB RAM), private 18.3 GB, then thousands of failed allocations (no shader-writable buffer 1–32 MiB, no shared buffer, no upload buffer) and a host command list did not close (0x8007000E). That is the memory limit of #880 / #1226 on a 6 GB card with 16 GB RAM, not something in this PR.

  • 8 mesh programs were refused as compute: descriptor from the first lane of computed VGPRs ×4, scalar memory read as data ×2, lane mask read as data, structured buffer of unknown stride.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7147610507 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7147610507). Originally posted by [Witredd](https://github.com/Witredd) on 2026-11-24T23:37:24Z. --- Tested on an RX 5600 XT (RDNA1, no mesh shaders), Ryzen 7 5700X, 16 GB RAM, Windows 11, at 31568ce as is (not merged with main). - `cargo test -p victory-shader -p victory-gpu mesh`: all 21 pass (the mesh-shader comparison skips without a mesh device). - `fallback_frame_cost` (release): | draws × groups | PerDraw | Batched | DrawsOnly | |---|---|---|---| | 1000 × 32 | 2.93 ms | 0.52 ms | 0.35 ms | | 2000 × 16 | 5.33 ms | 0.52 ms | 0.35 ms | | 7000 × 4 | 15.02 ms | 0.54 ms | 0.33 ms | | 7000 × 16 | 15.32 ms | 1.82 ms | 1.23 ms | - In game, own copy: `fallback=true`; 360 mesh pipelines bound during the world load, ~1,400 draws/frame at ~2.4 s/frame, no device loss. Both runs ended on the loading screen (it goes black, then the run stops) on E_OUTOFMEMORY: dedicated memory filled (5.8 of 6 GB), shared rose from 1.5 to 7.5 GB (limit ~8 GB on 16 GB RAM), private 18.3 GB, then thousands of failed allocations (`no shader-writable buffer` 1–32 MiB, `no shared buffer`, `no upload buffer`) and `a host command list did not close (0x8007000E)`. That is the memory limit of #880 / #1226 on a 6 GB card with 16 GB RAM, not something in this PR. - 8 mesh programs were refused as compute: descriptor from the first lane of computed VGPRs ×4, scalar memory read as data ×2, lane mask read as data, structured buffer of unknown stride.
Marvisak commented 2026-11-25 01:07:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:30:14Z.


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: apps/victory/src/main.rs, crates/victory-gpu/src/draw.rs, crates/victory-gpu/src/host.rs, crates/victory-gpu/src/pipeline.rs, crates/victory-gpu/src/pipeline/host.rs, crates/victory-gpu/src/shader_cache.rs, crates/victory-shader/src/emit/host.rs, crates/victory-shader/src/emit/mod.rs and 2 more.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148576378 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7148576378). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:30:14Z. --- <!-- victory-triage v1 head=31568ced3e44bb31aac5755e18c7d6f165204e30 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `apps/victory/src/main.rs`, `crates/victory-gpu/src/draw.rs`, `crates/victory-gpu/src/host.rs`, `crates/victory-gpu/src/pipeline.rs`, `crates/victory-gpu/src/pipeline/host.rs`, `crates/victory-gpu/src/shader_cache.rs`, `crates/victory-shader/src/emit/host.rs`, `crates/victory-shader/src/emit/mod.rs` and 2 more. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
ElSeba0811 commented 2026-11-25 05:06:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ElSeba0811 on 2026-11-25T04:45:13Z.


I'm working on getting this running on a GTX 1070 Ti and wanted to share something that helped with wave64 on 32-lane hardware.

These results are from our local compute + vertex fallback on ffe310e, with additional guest-wave changes. I haven't tested this PR's exact head (31568ce), so this isn't an approval of the branch. My setup is Windows, GTX 1070 Ti, i7-9700K and 16 GB RAM.

We hit the 32 KiB shared-memory limit because every ballot/election site got fresh scratch space. Reusing one predicate/value workspace brought it down to 512 bytes for 64 threads or 1,024 bytes for 128 threads. It needs both the write-to-read barrier and a barrier after all reads, before reuse. Every physical thread must reach the collective; putting that barrier in divergent control flow isn't safe. Guest LDS still counts toward the limit.

On the same 8,765 mesh programs, matched by identity:

  • Translated and DXIL-validated: 6,937 -> 7,234.
  • Shared-memory-limit refusals: 297 -> 0.
  • Previously validated programs lost: 0. Validator failures after the change: 0.

The regression test uses 97 ballot/election sites with changing predicates and first-active lanes. The old allocation fails; the fix passes exact GPU readback on the GTX and WARP, with 64/128-thread groups and four dispatches per configuration. Nine guest-wave GPU tests and three mesh record/pixel tests also passed.

A separate scalar-SRV size-query fix later brought the count to 7,255/8,765, another 21 with zero losses. The largest remaining refusal group is 1,086 cyclic programs; our local guest-wave scheduler still refuses loops.

This hasn't given us a correctly rendered world or a measured FPS gain yet. But the long, changing collective sequence caught something that a single ballot test missed, so it may be useful for the wave64 work here.

AI-assisted with Codex and Claude. Sharing aggregate results and synthetic-test details only; no game files or extracted shader code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7153132463 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7153132463). Originally posted by [ElSeba0811](https://github.com/ElSeba0811) on 2026-11-25T04:45:13Z. --- I'm working on getting this running on a GTX 1070 Ti and wanted to share something that helped with wave64 on 32-lane hardware. These results are from our local compute + vertex fallback on `ffe310e`, with additional guest-wave changes. I haven't tested this PR's exact head (`31568ce`), so this isn't an approval of the branch. My setup is Windows, GTX 1070 Ti, i7-9700K and 16 GB RAM. We hit the 32 KiB shared-memory limit because every ballot/election site got fresh scratch space. Reusing one predicate/value workspace brought it down to 512 bytes for 64 threads or 1,024 bytes for 128 threads. It needs **both** the write-to-read barrier and a barrier after all reads, before reuse. Every physical thread must reach the collective; putting that barrier in divergent control flow isn't safe. Guest LDS still counts toward the limit. On the same 8,765 mesh programs, matched by identity: - Translated and DXIL-validated: **6,937 -> 7,234**. - Shared-memory-limit refusals: **297 -> 0**. - Previously validated programs lost: **0**. Validator failures after the change: **0**. The regression test uses 97 ballot/election sites with changing predicates and first-active lanes. The old allocation fails; the fix passes exact GPU readback on the GTX and WARP, with 64/128-thread groups and four dispatches per configuration. Nine guest-wave GPU tests and three mesh record/pixel tests also passed. A separate scalar-SRV size-query fix later brought the count to **7,255/8,765**, another 21 with zero losses. The largest remaining refusal group is 1,086 cyclic programs; our local guest-wave scheduler still refuses loops. This hasn't given us a correctly rendered world or a measured FPS gain yet. But the long, changing collective sequence caught something that a single ballot test missed, so it may be useful for the wave64 work here. AI-assisted with Codex and Claude. Sharing aggregate results and synthetic-test details only; no game files or extracted shader code.
zlwbbb-del commented 2026-11-25 06:02:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zlwbbb-del on 2026-11-25T05:13:23Z.


Do you plan to rebase onto current main? I tried against 940d32f on the 8 GB no-mesh host and the merge is no longer mechanical: 12 files, 46 conflicted hunks. Fourteen are independent additions; the other 32 interleave inside the same functions, because today's main added root UAV handles, memory views, view marks and geometry shaders to the same Shader struct and the same handle constructors where the fallback adds mesh_out/mesh_in.

I can't shortcut it either — those new fields are used 14–67 times elsewhere (root_uavs 39, view_marks 67, MEMORY_SPACE 40), so keeping this branch's side of those files stops the crate compiling. I would rather wait for your rebase than hand-merge the shader emitter and hand you a tree that may be wrong exactly in the fallback path.

Worth doing now: on 940d32f this host went from 481 non-translating programs to 11, and cd94d35 is in, so the fallback would start from a far better place.

This merge attempt and the build/run on the 8 GB card were done with AI assistance (DeepSeek).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7153563392 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7153563392). Originally posted by [zlwbbb-del](https://github.com/zlwbbb-del) on 2026-11-25T05:13:23Z. --- Do you plan to rebase onto current main? I tried against 940d32f on the 8 GB no-mesh host and the merge is no longer mechanical: 12 files, 46 conflicted hunks. Fourteen are independent additions; the other 32 interleave inside the same functions, because today's main added root UAV handles, memory views, view marks and geometry shaders to the same Shader struct and the same handle constructors where the fallback adds mesh_out/mesh_in. I can't shortcut it either — those new fields are used 14–67 times elsewhere (root_uavs 39, view_marks 67, MEMORY_SPACE 40), so keeping this branch's side of those files stops the crate compiling. I would rather wait for your rebase than hand-merge the shader emitter and hand you a tree that may be wrong exactly in the fallback path. Worth doing now: on 940d32f this host went from 481 non-translating programs to 11, and cd94d35 is in, so the fallback would start from a far better place. This merge attempt and the build/run on the 8 GB card were done with AI assistance (DeepSeek).
ElSeba0811 commented 2026-11-25 08:06:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ElSeba0811 on 2026-11-25T07:50:25Z.


@zlwbbb-del yeah, I’ve now ported our separate GTX fallback onto 940d32f and opened draft #2203. The old version is preserved, and the new branch keeps main’s root UAVs, memory views, view marks and helper-lane handling.

The code, handwritten tests and build instructions are public now: updated branch.

It builds, and the focused fallback checks pass on our GTX 1070 Ti and WARP. The latest shader fixes also add 867 vertex and 735 compute validation passes. Two known GTX shader-test failures still reproduce on untouched 940d32f; those are documented in the PR.

I’m keeping it a draft because we still need a successful rendering test. Our first run of this exact build hit the system-memory guard before we could assess the scene, so I’m not claiming playable output yet.

AI-assisted with Codex and Claude.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156310712 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7156310712). Originally posted by [ElSeba0811](https://github.com/ElSeba0811) on 2026-11-25T07:50:25Z. --- @zlwbbb-del yeah, I’ve now ported our separate GTX fallback onto `940d32f` and opened draft #2203. The old version is preserved, and the new branch keeps main’s root UAVs, memory views, view marks and helper-lane handling. The code, handwritten tests and build instructions are public now: [updated branch](https://github.com/ElSeba0811/VIctory/tree/codex/gtx-upstream-update). It builds, and the focused fallback checks pass on our GTX 1070 Ti and WARP. The latest shader fixes also add 867 vertex and 735 compute validation passes. Two known GTX shader-test failures still reproduce on untouched `940d32f`; those are documented in the PR. I’m keeping it a draft because we still need a successful rendering test. Our first run of this exact build hit the system-memory guard before we could assess the scene, so I’m not claiming playable output yet. AI-assisted with Codex and Claude.
zlwbbb-del commented 2026-11-25 10:07:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zlwbbb-del on 2026-11-25T09:45:12Z.


@ElSeba0811 Following your #2203 here: I built it and ran it on a Radeon card, and it does render — with two
AMD-side problems afterwards.

Host: Windows 10 IoT Enterprise LTSC 19045, i5-11400H, 63.6 GB, Radeon RX 470 8 GB (Polaris,
no mesh shaders)
, driver 31.0.21925.1001. Built the diag profile as the doc says and ran with
VICTORY_MESH_COMPUTE=1 VICTORY_MESH_WAVE64_DAG=1 VICTORY_MESH_INDIRECT=1 VICTORY_SNAPSHOT_POOL_MIB=128.

I had to add the Agility opt-in to run it on Windows 10 (exe exports, the #175 shape); the branch
has neither that nor #969's VICTORY_D3D12_AGILITY. Nothing else changed.

It got past the memory guard and rendered

  • D3D12 initialised and the title ran for about 100 s — no E_OUTOFMEMORY at all, so the
    16 GB guard that stopped your first trial is a property of that machine, not of the build.
  • No shader translation failures in the whole run.
  • 1,024+ frames presented, and the last counted frame line reads draws=3549 drawn=3549 — 100 %
    submitted
    .
  • 4 experimental compute and vertex mesh pipeline creations, with -wave64-dag-compute-fallback
    on 5 programs and -wave64-dag-vertex-fallback on 4.
  • The indirect path ran too: one
    experimental indirect compute and vertex mesh draw recorded (GPU dimensions) count=1.

Rendering evidence. The queue reports a black frame, then the level histogram of the frames
after it:

a black frame after a frame that was not frame=1
levels after the black frame frame=7    levels=[0, 0, 0, 0, 0, 0, 0]
a black frame after a frame that was not frame=919
levels after the black frame frame=925  levels=[44, 44, 44, 44, 44, 0, 0, 0, 45, 45, 46, 48]
a black frame after a frame that was not frame=2001
levels after the black frame frame=2007 levels=[52, 52, 56, 61, 61, 0, 0, 0, 0, 0, 0, 44]

So frames 925 and 2007 carry real, non-black content (levels 44–61 of 255). I cannot judge whether
it is a correct scene from a histogram alone, but it is no longer a black screen.

Two problems, both on the AMD side

1. It dies in AMD's shader compiler. After about 100 s:

unhandled exception 0xc0000005 at amdxc64.dll+0xdaa6f9 (read 0x8: nothing mapped there)

The lines immediately before it are successful fallback pipeline creations, not a bad call:

host pipeline shaders=[vertex ecfe2f8317bda619-wave64-dag-vertex-fallback, pixel dcd6d91d30ab8d13]
experimental compute and vertex mesh pipeline ms=mesh ecfe2f8317bda619
host pipeline shaders=[vertex cf43bdbfc75c9296-wave64-dag-vertex-fallback, pixel 573d1857e903fab5]
experimental compute and vertex mesh pipeline ms=mesh cf43bdbfc75c9296

So it looks like a later DXIL compile inside amdxc64 that the AMD compiler cannot handle. If you
want to chase it, the shader compiled just before the fault is the one to try isolating — I can
re-run with a build that logs the container hash before each compile if that helps.

2. The descriptor-heap limit is hit hard on this card. 310,723 warnings of

title slot past the host heap index=934461 count=934461 for_draw=false

which matches the "remapping excess title descriptors is unfinished" note in your description.
This is by far the most common message in the run.

Summary

Your port does initialise, translate everything, submit every draw and produce non-black frames on
a Polaris card — so the rendering test you are waiting for can at least be marked as reached on
this configuration, with the caveat that it ends in the AMD compiler rather than in the fallback.

Happy to re-run on any instrumented build, or to try a specific shader-hash isolation if that
narrows the amdxc64 fault.


This build, run and analysis were done with AI assistance (DeepSeek). No game files, extracted
shaders, binaries or raw logs attached; the figures are from our own log.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158752925 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7158752925). Originally posted by [zlwbbb-del](https://github.com/zlwbbb-del) on 2026-11-25T09:45:12Z. --- @ElSeba0811 Following your #2203 here: I built it and ran it on a Radeon card, and it does render — with two AMD-side problems afterwards. Host: Windows 10 IoT Enterprise LTSC 19045, i5-11400H, 63.6 GB, **Radeon RX 470 8 GB (Polaris, no mesh shaders)**, driver 31.0.21925.1001. Built the diag profile as the doc says and ran with `VICTORY_MESH_COMPUTE=1 VICTORY_MESH_WAVE64_DAG=1 VICTORY_MESH_INDIRECT=1 VICTORY_SNAPSHOT_POOL_MIB=128`. I had to add the Agility opt-in to run it on Windows 10 (exe exports, the #175 shape); the branch has neither that nor #969's `VICTORY_D3D12_AGILITY`. Nothing else changed. ## It got past the memory guard and rendered - D3D12 initialised and the title ran for about 100 s — **no `E_OUTOFMEMORY` at all**, so the 16 GB guard that stopped your first trial is a property of that machine, not of the build. - **No shader translation failures** in the whole run. - 1,024+ frames presented, and the last counted frame line reads `draws=3549 drawn=3549` — **100 % submitted**. - 4 `experimental compute and vertex mesh pipeline` creations, with `-wave64-dag-compute-fallback` on 5 programs and `-wave64-dag-vertex-fallback` on 4. - The indirect path ran too: one `experimental indirect compute and vertex mesh draw recorded (GPU dimensions) count=1`. **Rendering evidence.** The queue reports a black frame, then the level histogram of the frames after it: ``` a black frame after a frame that was not frame=1 levels after the black frame frame=7 levels=[0, 0, 0, 0, 0, 0, 0] a black frame after a frame that was not frame=919 levels after the black frame frame=925 levels=[44, 44, 44, 44, 44, 0, 0, 0, 45, 45, 46, 48] a black frame after a frame that was not frame=2001 levels after the black frame frame=2007 levels=[52, 52, 56, 61, 61, 0, 0, 0, 0, 0, 0, 44] ``` So frames 925 and 2007 carry real, non-black content (levels 44–61 of 255). I cannot judge whether it is a correct scene from a histogram alone, but it is no longer a black screen. ## Two problems, both on the AMD side **1. It dies in AMD's shader compiler.** After about 100 s: ``` unhandled exception 0xc0000005 at amdxc64.dll+0xdaa6f9 (read 0x8: nothing mapped there) ``` The lines immediately before it are successful fallback pipeline creations, not a bad call: ``` host pipeline shaders=[vertex ecfe2f8317bda619-wave64-dag-vertex-fallback, pixel dcd6d91d30ab8d13] experimental compute and vertex mesh pipeline ms=mesh ecfe2f8317bda619 host pipeline shaders=[vertex cf43bdbfc75c9296-wave64-dag-vertex-fallback, pixel 573d1857e903fab5] experimental compute and vertex mesh pipeline ms=mesh cf43bdbfc75c9296 ``` So it looks like a later DXIL compile inside `amdxc64` that the AMD compiler cannot handle. If you want to chase it, the shader compiled just before the fault is the one to try isolating — I can re-run with a build that logs the container hash before each compile if that helps. **2. The descriptor-heap limit is hit hard on this card.** 310,723 warnings of ``` title slot past the host heap index=934461 count=934461 for_draw=false ``` which matches the "remapping excess title descriptors is unfinished" note in your description. This is by far the most common message in the run. ## Summary Your port does initialise, translate everything, submit every draw and produce non-black frames on a Polaris card — so the rendering test you are waiting for can at least be marked as reached on this configuration, with the caveat that it ends in the AMD compiler rather than in the fallback. Happy to re-run on any instrumented build, or to try a specific shader-hash isolation if that narrows the `amdxc64` fault. --- *This build, run and analysis were done with AI assistance (DeepSeek). No game files, extracted shaders, binaries or raw logs attached; the figures are from our own log.*
AtsonMelo commented 2026-11-26 02:06:56 +00:00 (Migrated from github.com)

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


RX 470 (Polaris) - Independent mesh fallback validation

We have been testing a semantic port of PR #961 on a
low-memory system.

Hardware:

  • Intel Core i3-10100F (4C/8T)
  • Radeon RX 470, 4 GB VRAM
  • 16 GB RAM
  • Windows 11

Synthetic hardware validation:

  • Mesh fallback: 8/8 tests passed.
  • No TDR or device removal observed during the
    reported validation runs.

Aggregate mesh pool memory

Measured with 24 command lists:

Individual pool limit Aggregate memory
8 MiB 960 MiB
16 MiB 1056 MiB
32 MiB 1056 MiB
64 MiB 1440 MiB

Reducing the individual limit from 64 to 8 MiB saved
480 MiB in this synthetic workload.

However, individual pool limits alone do not sufficiently
constrain aggregate memory usage.

A global budget, fence-aware reuse and safe reclamation
of idle chunks may benefit GPUs with limited VRAM.

Additional Polaris shader findings

Nine compute memory tests previously failed with
PSO creation errors (E_INVALIDARG).

The translated DXIL requested WaveSize(32), while
the RX 470 reported support for wave64 only.

Allowing eligible single-wave compute groups using LDS,
without incompatible cross-lane operations, to execute
on wave64 recovered all nine tests.

  • Before: 0/9 passed.
  • After: 9/9 passed.
  • One separate texel-offset limitation remains.

These findings are from our local AMD-based candidate
and have not yet been validated against current upstream.

All results are from synthetic tests, not gameplay
benchmarks.

Development was AI-assisted using ChatGPT and Claude,
with validation on physical target hardware.

Credit to the original VIctory contributors and the
authors of PR #961.

We are investigating aggregate memory budgeting and
can provide isolated patches and regression tests
for review.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179574307 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7179574307). Originally posted by [AtsonMelo](https://github.com/AtsonMelo) on 2026-11-26T01:14:28Z. --- ### RX 470 (Polaris) - Independent mesh fallback validation <!-- polaris-rx470-validation-20261125 --> We have been testing a semantic port of PR #961 on a low-memory system. **Hardware:** - Intel Core i3-10100F (4C/8T) - Radeon RX 470, 4 GB VRAM - 16 GB RAM - Windows 11 **Synthetic hardware validation:** - Mesh fallback: 8/8 tests passed. - No TDR or device removal observed during the reported validation runs. ### Aggregate mesh pool memory Measured with 24 command lists: | Individual pool limit | Aggregate memory | |---|---:| | 8 MiB | 960 MiB | | 16 MiB | 1056 MiB | | 32 MiB | 1056 MiB | | 64 MiB | 1440 MiB | Reducing the individual limit from 64 to 8 MiB saved 480 MiB in this synthetic workload. However, individual pool limits alone do not sufficiently constrain aggregate memory usage. A global budget, fence-aware reuse and safe reclamation of idle chunks may benefit GPUs with limited VRAM. ### Additional Polaris shader findings Nine compute memory tests previously failed with PSO creation errors (E_INVALIDARG). The translated DXIL requested WaveSize(32), while the RX 470 reported support for wave64 only. Allowing eligible single-wave compute groups using LDS, without incompatible cross-lane operations, to execute on wave64 recovered all nine tests. - Before: 0/9 passed. - After: 9/9 passed. - One separate texel-offset limitation remains. These findings are from our local AMD-based candidate and have not yet been validated against current upstream. All results are from synthetic tests, not gameplay benchmarks. Development was AI-assisted using ChatGPT and Claude, with validation on physical target hardware. Credit to the original VIctory contributors and the authors of PR #961. We are investigating aggregate memory budgeting and can provide isolated patches and regression tests for review.
ElSeba0811 commented 2026-11-26 02:07:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ElSeba0811 on 2026-11-26T02:05:55Z.


@AtsonMelo thanks for sharing this. We're working on the GTX 1070 Ti side (8 GB VRAM, 16 GB system RAM) in #2203, so the aggregate-memory result is relevant to us too.

Our last completed Series X trial reached partial scene geometry, but with large black/overexposed regions and only about 1.2–1.6 FPS in the final logged intervals. It ran for 582.28 seconds including loading and stopped at our system commit guard, with 23.29 GiB peak process private commit. That is committed process memory, not VRAM, and we haven't isolated how much belongs to the mesh pools. This was a separate local fork candidate, not the public head of #2203 or an upstream benchmark.

Your 24-list result is a useful reason to measure allocation across all lists instead of treating each pool's cap as a global limit. I'd be interested in the isolated budget/reclamation patch and its regression test. In particular, it would help to distinguish:

  • allocated pool capacity, in-flight allocations, and idle retained chunks;
  • allocated bytes versus actual GPU residency;
  • what happens when the global budget is exhausted while all reusable chunks are still in flight.

Reclamation/reuse needs to wait for the relevant work to complete and preserve draw ordering. We haven't implemented or measured a global mesh-pool budget here yet.

We also have new shader results that may help with shared capability checks, although our wave-width problem is the opposite of yours: this GTX has fixed 32-lane waves, while some translated programs still require 64.

  • Claude implemented bounded synchronization between the two 32-lane halves of a console wave, avoiding a whole-group barrier inside divergent control flow. Synthetic tests cover divergent choices, inactive lanes, cross-half LDS reads, multiple console waves in a group, and iteration-limit exits. Six of seven initially targeted compute pipelines now create on the GTX, including the previously untranslatable shadow program. These game-program checks were pipeline creation only.
  • Two blocked pixel programs turned out to carry unused barycentric inputs. A new analysis removes the requirement only when those inputs are proven irrelevant to observable results. Both exact vertex/pixel pairs now create on the GTX. A synthetic draw passes on GTX and WARP; its live-barycentric control remains refused on GTX.
  • Shader suite: 228 passed, 0 failed, 3 ignored. GPU library: 188 passed, 1 existing baseline failure, 5 ignored. A broader follow-up translation comparison was stopped for low system memory, so that comparison is incomplete.

Those repairs are still local/uncommitted on our separate a486526 fork base, not published in #2203, and have not had a game run. They don't establish correct lighting or playable FPS. Your wave64-only fix also needs its own eligibility checks; these GTX results aren't validation on Polaris.

Please share the patch/test branch and exact base when ready, including what the aggregate-memory counter measures. That would let us compare the same synthetic workload across Pascal and Polaris without mixing it with game-performance claims.

AI-assisted with Claude Code and Codex; no game assets or extracted shaders attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180456846 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7180456846). Originally posted by [ElSeba0811](https://github.com/ElSeba0811) on 2026-11-26T02:05:55Z. --- @AtsonMelo thanks for sharing this. We're working on the GTX 1070 Ti side (8 GB VRAM, 16 GB system RAM) in #2203, so the aggregate-memory result is relevant to us too. Our [last completed Series X trial](https://github.com/Marvisak/VIctory/pull/2203#issuecomment-7177744765) reached partial scene geometry, but with large black/overexposed regions and only about 1.2–1.6 FPS in the final logged intervals. It ran for 582.28 seconds including loading and stopped at our system commit guard, with **23.29 GiB peak process private commit**. That is committed process memory, not VRAM, and we haven't isolated how much belongs to the mesh pools. This was a separate local fork candidate, not the public head of #2203 or an upstream benchmark. Your 24-list result is a useful reason to measure allocation across all lists instead of treating each pool's cap as a global limit. I'd be interested in the isolated budget/reclamation patch and its regression test. In particular, it would help to distinguish: - allocated pool capacity, in-flight allocations, and idle retained chunks; - allocated bytes versus actual GPU residency; - what happens when the global budget is exhausted while all reusable chunks are still in flight. Reclamation/reuse needs to wait for the relevant work to complete and preserve draw ordering. We haven't implemented or measured a global mesh-pool budget here yet. We also have new shader results that may help with shared capability checks, although **our wave-width problem is the opposite of yours**: this GTX has fixed 32-lane waves, while some translated programs still require 64. - Claude implemented bounded synchronization between the two 32-lane halves of a console wave, avoiding a whole-group barrier inside divergent control flow. Synthetic tests cover divergent choices, inactive lanes, cross-half LDS reads, multiple console waves in a group, and iteration-limit exits. Six of seven initially targeted compute pipelines now create on the GTX, including the previously untranslatable shadow program. These game-program checks were pipeline creation only. - Two blocked pixel programs turned out to carry unused barycentric inputs. A new analysis removes the requirement only when those inputs are proven irrelevant to observable results. Both exact vertex/pixel pairs now create on the GTX. A synthetic draw passes on GTX and WARP; its live-barycentric control remains refused on GTX. - Shader suite: **228 passed, 0 failed, 3 ignored**. GPU library: **188 passed, 1 existing baseline failure, 5 ignored**. A broader follow-up translation comparison was stopped for low system memory, so that comparison is incomplete. Those repairs are still local/uncommitted on our separate `a486526` fork base, not published in #2203, and have **not had a game run**. They don't establish correct lighting or playable FPS. Your wave64-only fix also needs its own eligibility checks; these GTX results aren't validation on Polaris. Please share the patch/test branch and exact base when ready, including what the aggregate-memory counter measures. That would let us compare the same synthetic workload across Pascal and Polaris without mixing it with game-performance claims. AI-assisted with Claude Code and Codex; no game assets or extracted shaders attached.
AtsonMelo commented 2026-11-26 12:05:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AtsonMelo on 2026-11-26T11:40:30Z.


Polaris RX 470 - Follow-up validation and memory optimization

Following our previous independent validation of the
mesh fallback, we have consolidated two additional
local experimental builds.

Hardware remains unchanged:

  • Intel Core i3-10100F (4C/8T)
  • Radeon RX 470, 4 GB VRAM
  • 16 GB system RAM
  • Windows 11

Aggregate mesh pool memory

Synthetic benchmark using 24 command lists:

Configuration Aggregate pool memory
Previous 64 MiB/list, no aggregate ceiling 1440 MiB
Earlier aggregate ceiling configuration 1208 MiB
New 32 MiB/list with aggregate ceiling 816 MiB

The combined changes saved 624 MiB compared with
the original reference configuration (43.3%).

The implementation uses region-sized chunks,
fence-aware reuse and reclamation of idle chunks.

The aggregate ceiling is intentionally soft:
allocations may exceed it when necessary to
preserve draws.

No draws were refused in this benchmark.

These values describe mesh pool memory, not
total application VRAM usage.

Additional Wave64 compatibility

The previously reported texel_offsets failure
was resolved for eligible single-wave groups
using intra-wave reads.

Local Polaris 003 validation:

  • Mesh fallback: 8/8.
  • Shader suite: 280 passed, zero failures.
  • GPU suite: 134 passed, zero failures.

Ignored and filtered tests remain.
Multi-wave equivalence is not yet established.

Additional performance experiments

Our subsequent Polaris 004 candidate includes:

  1. Root CBV scratch reuse:

    Synthetic repeated-binding workload:
    12.65 MB to approximately 262 KB copied
    per submission.

    Readback equivalence was reported on WARP
    and physical RX 470 hardware.

  2. Demand-based pipeline prioritization:

    In a synthetic workload with 96 new PSOs,
    priority pipeline waiting time decreased
    from 6.7-11.9 seconds to 0.8-1.7 seconds.

    Reducing worker counts made cold compilation
    approximately 24% slower on our CPU.

    Therefore, the original worker counts remain
    the default.

  3. GPU regression validation:

    142 tests passed in the final reported RX 470
    run, with no TDR or device removal observed.

    A pre-existing intermittent atomic file-write
    test remains under investigation.

    Shader suites were not repeated for this build.

Scope and limitations

All results are from local synthetic validation.

These changes have not been rebased or validated
against current upstream. No gameplay performance
or full application compatibility is claimed.

We are now developing an integrated synthetic
graphics workload to exercise the compatibility
layer and identify actual CPU/GPU/memory bottlenecks.

Isolated patches and regression tests can be
prepared for upstream review, starting with the
mesh pool allocation and reclamation changes.

Credit to the original VIctory contributors,
the authors of PR #961, and AvatarManz for
relevant performance optimization references.

Development was AI-assisted using ChatGPT,
Claude Code and Codex, with local validation
on physical target hardware.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191026358 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191026358). Originally posted by [AtsonMelo](https://github.com/AtsonMelo) on 2026-11-26T11:40:30Z. --- ### Polaris RX 470 - Follow-up validation and memory optimization <!-- polaris-validation-update-20261126 --> Following our previous independent validation of the mesh fallback, we have consolidated two additional local experimental builds. Hardware remains unchanged: - Intel Core i3-10100F (4C/8T) - Radeon RX 470, 4 GB VRAM - 16 GB system RAM - Windows 11 ### Aggregate mesh pool memory Synthetic benchmark using 24 command lists: | Configuration | Aggregate pool memory | |---|---:| | Previous 64 MiB/list, no aggregate ceiling | 1440 MiB | | Earlier aggregate ceiling configuration | 1208 MiB | | New 32 MiB/list with aggregate ceiling | 816 MiB | The combined changes saved 624 MiB compared with the original reference configuration (43.3%). The implementation uses region-sized chunks, fence-aware reuse and reclamation of idle chunks. The aggregate ceiling is intentionally soft: allocations may exceed it when necessary to preserve draws. No draws were refused in this benchmark. These values describe mesh pool memory, not total application VRAM usage. ### Additional Wave64 compatibility The previously reported texel_offsets failure was resolved for eligible single-wave groups using intra-wave reads. Local Polaris 003 validation: - Mesh fallback: 8/8. - Shader suite: 280 passed, zero failures. - GPU suite: 134 passed, zero failures. Ignored and filtered tests remain. Multi-wave equivalence is not yet established. ### Additional performance experiments Our subsequent Polaris 004 candidate includes: 1. Root CBV scratch reuse: Synthetic repeated-binding workload: 12.65 MB to approximately 262 KB copied per submission. Readback equivalence was reported on WARP and physical RX 470 hardware. 2. Demand-based pipeline prioritization: In a synthetic workload with 96 new PSOs, priority pipeline waiting time decreased from 6.7-11.9 seconds to 0.8-1.7 seconds. Reducing worker counts made cold compilation approximately 24% slower on our CPU. Therefore, the original worker counts remain the default. 3. GPU regression validation: 142 tests passed in the final reported RX 470 run, with no TDR or device removal observed. A pre-existing intermittent atomic file-write test remains under investigation. Shader suites were not repeated for this build. ### Scope and limitations All results are from local synthetic validation. These changes have not been rebased or validated against current upstream. No gameplay performance or full application compatibility is claimed. We are now developing an integrated synthetic graphics workload to exercise the compatibility layer and identify actual CPU/GPU/memory bottlenecks. Isolated patches and regression tests can be prepared for upstream review, starting with the mesh pool allocation and reclamation changes. Credit to the original VIctory contributors, the authors of PR #961, and AvatarManz for relevant performance optimization references. Development was AI-assisted using ChatGPT, Claude Code and Codex, with local validation on physical target hardware.
AtsonMelo commented 2026-11-26 12:06:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AtsonMelo on 2026-11-26T11:53:57Z.


@ElSeba0811 Thanks for the detailed feedback and for sharing your Pascal validation results.

I've just published our updated Polaris 003/004 results above.

I agree that sharing an isolated memory-budget patch and a common regression workload would be valuable for comparing Pascal and Polaris.

We are currently validating an integrated synthetic graphics workload. Once this milestone is complete, we can prepare the isolated patch, exact base commit, regression tests, and memory counter definitions for cross-hardware validation.

Thank you for collaborating.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191307471 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191307471). Originally posted by [AtsonMelo](https://github.com/AtsonMelo) on 2026-11-26T11:53:57Z. --- @ElSeba0811 Thanks for the detailed feedback and for sharing your Pascal validation results. I've just published our updated Polaris 003/004 results above. I agree that sharing an isolated memory-budget patch and a common regression workload would be valuable for comparing Pascal and Polaris. We are currently validating an integrated synthetic graphics workload. Once this milestone is complete, we can prepare the isolated patch, exact base commit, regression tests, and memory counter definitions for cross-hardware validation. Thank you for collaborating.
AtsonMelo commented 2026-11-26 13:04:27 +00:00 (Migrated from github.com)

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


Eu gostaria de saber onde posso baixar o executável disponibilizado recentemente pelo Cyberleek

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191814925 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191814925). Originally posted by [AtsonMelo](https://github.com/AtsonMelo) on 2026-11-26T12:17:35Z. --- Eu gostaria de saber onde posso baixar o executável disponibilizado recentemente pelo Cyberleek
ColorMeBoom commented 2026-11-26 21:26:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-26T21:26:19Z.


RDNA1 hardware run — RX 5700 XT (Navi 10), driver 32.0.21045.29003, Windows 11 26200; D3D12 reports no mesh shader tier, wave lanes 32–64. Head 31568ce tested as-is. Synthetic tests only, no game data.

  • Mesh tests: victory-shader 12 passed (benchmark ignored), victory-gpu 9 passed. Full victory-shader + victory-gpu lib suites at head: 128 + 59 passed, 0 failed. No device loss.
  • a_mesh_program_run_as_compute_draws_what_the_mesh_shader_draws and per_primitive_outputs_run_as_compute_draw_what_the_mesh_shader_draws: the hardware takes the fallback only, WARP draws the mesh-shader reference, and the RX 5700 XT's fallback image matches it within the cross-device tolerance.

fallback_frame_cost, GPU ms per frame (3 runs, within ±0.1 ms):

draws × groups PerDraw Batched DrawsOnly
1,000 × 32 2.90 0.49 0.35
2,000 × 16 5.32 0.50 0.35
7,000 × 4 17.25 0.55 0.33
7,000 × 16 17.90 1.73 1.23

So on RDNA1 the per-draw recording costs about 2.5–2.9 µs a draw, whatever its size: 31× the batched frame at 7,000 small draws, against the GTX 1060's ~17× in the description. Batched stays within 1.4–1.7× of the draws alone. Another RX 5700 XT run of the title (#1410) reached about 13,000 draws a frame, where PerDraw would be around 33 ms of GPU time on this card, so the batching question under Open matters here too.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7203726764 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7203726764). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-26T21:26:19Z. --- **RDNA1 hardware run** — RX 5700 XT (Navi 10), driver 32.0.21045.29003, Windows 11 26200; D3D12 reports no mesh shader tier, wave lanes 32–64. Head `31568ce` tested as-is. Synthetic tests only, no game data. - Mesh tests: `victory-shader` 12 passed (benchmark ignored), `victory-gpu` 9 passed. Full `victory-shader` + `victory-gpu` lib suites at head: 128 + 59 passed, 0 failed. No device loss. - `a_mesh_program_run_as_compute_draws_what_the_mesh_shader_draws` and `per_primitive_outputs_run_as_compute_draw_what_the_mesh_shader_draws`: the hardware takes the fallback only, WARP draws the mesh-shader reference, and the RX 5700 XT's fallback image matches it within the cross-device tolerance. `fallback_frame_cost`, GPU ms per frame (3 runs, within ±0.1 ms): | draws × groups | PerDraw | Batched | DrawsOnly | |---|---:|---:|---:| | 1,000 × 32 | 2.90 | 0.49 | 0.35 | | 2,000 × 16 | 5.32 | 0.50 | 0.35 | | 7,000 × 4 | 17.25 | 0.55 | 0.33 | | 7,000 × 16 | 17.90 | 1.73 | 1.23 | So on RDNA1 the per-draw recording costs about 2.5–2.9 µs a draw, whatever its size: 31× the batched frame at 7,000 small draws, against the GTX 1060's ~17× in the description. Batched stays within 1.4–1.7× of the draws alone. Another RX 5700 XT run of the title (#1410) reached about 13,000 draws a frame, where PerDraw would be around 33 ms of GPU time on this card, so the batching question under **Open** matters here too. AI use: Claude Code (Claude Opus 5.5).
AtsonMelo commented 2026-11-27 00:51:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AtsonMelo on 2026-11-27T00:51:46Z.


Polaris RX 470 - Integrated graphics validation and profiling update

Following our previous Polaris 003/004 results, we have now completed our first integrated synthetic graphics validation on physical Polaris hardware.

Hardware

  • AMD Radeon RX 470, 4 GB VRAM
  • Intel Core i3-10100F (4C/8T)
  • 16 GB system RAM
  • AMD driver 31.0.21925.1001
  • Windows 11

Integrated graphics smoke test

Our local fixture combines:

  • Compute-based mesh shader fallback
  • Indirect root CBV
  • Texture updates between frames
  • Graphics presentation
  • Readback and image comparison

Across five synthetic runs using WARP and the physical RX 470:

Metric Result
Executed draws per run 720/720
Dropped draws 0
TDR 0
Captured direct/indirect image equivalence Passed within each adapter

The physical RX 470 recorded:

  • Direct control: 1.661 ms frame P50.
  • Indirect CBV: 1.856 ms frame P50.

These are small, 40-frame synthetic samples.

Local fixture commit: ca4d2ce.

Long-duration integrated stability and full application compatibility remain unverified.

CPU submission profiling

A separate synthetic workload identified command recording as the dominant measured region:

Metric Result
Frame P50 16.23 ms
Draw recording 12.08 ms
GPU execution 2.30 ms

The tables() region was identified as the largest measured region within recording.

We are investigating descriptor handling, hashing, lookups, allocations and synchronization costs.

CPU and GPU measurements may overlap and should not be interpreted as strictly additive.

View retention investigation

A local CPU fixture reproduced view retention under repeated address changes in the same slot:

  • Padding-only changes: one retained view.
  • Address changes: 25,000 retained views.
  • Additional private committed memory: 10.71 MiB.

This demonstrates retention under synthetic churn.

Its frequency and impact in a representative graphics runtime remain under investigation. We are not yet claiming an application-level memory leak.

Pipeline readiness and correctness

We investigated an earlier performance run where 9,218 draws were omitted during the first frame.

The affected PSO required approximately 1,702 ms to become ready, exceeding the configured 500 ms wait.

Subsequent cold-start runs passed, but the original latency cause remains unresolved.

This is why we are treating executed draw counts, visual equivalence and pipeline readiness as mandatory performance validation criteria.

Higher FPS alone is not sufficient if rendering work is omitted.

Cross-hardware collaboration

@ElSeba0811 Thanks again for the Pascal validation and your suggestions regarding aggregate memory budgeting.

@ColorMeBoom Your RX 5700 XT results are particularly relevant to our investigation of mesh fallback batching and per-draw overhead on older AMD hardware.

Our previous synthetic mesh pool results reduced aggregate allocation from 1,440 MiB to 816 MiB, without refusing draws in that workload.

We would like to prepare an isolated memory-budget and reclamation patch, with:

  • Exact upstream base commit
  • Reproducible synthetic regression workload
  • Allocated pool capacity counters
  • In-flight allocation counters
  • Idle retained chunk counters
  • Residency measurements where available
  • Budget exhaustion behavior
  • Fence-aware reuse and reclamation validation

A common workload across Polaris, Pascal and RDNA1 would help establish which improvements are portable and which require architecture-specific handling.

The isolated upstream patch is still pending preparation and validation.

Next steps

  • Texture registration fast path
  • Detailed tables() profiling
  • View lifetime and memory retention
  • Mesh fallback batching
  • Pipeline readiness and cold-start reliability
  • Longer integrated synthetic validation

All results above are from local synthetic tests.

No GTA VI gameplay performance, full application compatibility or current upstream validation is claimed.

Development was AI-assisted using ChatGPT, Claude Code and Codex, with local physical hardware validation.

Credit to the original VIctory contributors and everyone contributing to PR #961.

No game assets, proprietary binaries or extracted game shaders are attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7206814612 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7206814612). Originally posted by [AtsonMelo](https://github.com/AtsonMelo) on 2026-11-27T00:51:46Z. --- ### Polaris RX 470 - Integrated graphics validation and profiling update <!-- polaris-integrated-update-20261126 --> Following our previous Polaris 003/004 results, we have now completed our first integrated synthetic graphics validation on physical Polaris hardware. ## Hardware - AMD Radeon RX 470, 4 GB VRAM - Intel Core i3-10100F (4C/8T) - 16 GB system RAM - AMD driver 31.0.21925.1001 - Windows 11 ## Integrated graphics smoke test Our local fixture combines: - Compute-based mesh shader fallback - Indirect root CBV - Texture updates between frames - Graphics presentation - Readback and image comparison Across five synthetic runs using WARP and the physical RX 470: | Metric | Result | |---|---:| | Executed draws per run | 720/720 | | Dropped draws | 0 | | TDR | 0 | | Captured direct/indirect image equivalence | Passed within each adapter | The physical RX 470 recorded: - Direct control: 1.661 ms frame P50. - Indirect CBV: 1.856 ms frame P50. These are small, 40-frame synthetic samples. Local fixture commit: `ca4d2ce`. Long-duration integrated stability and full application compatibility remain unverified. ## CPU submission profiling A separate synthetic workload identified command recording as the dominant measured region: | Metric | Result | |---|---:| | Frame P50 | 16.23 ms | | Draw recording | 12.08 ms | | GPU execution | 2.30 ms | The `tables()` region was identified as the largest measured region within recording. We are investigating descriptor handling, hashing, lookups, allocations and synchronization costs. CPU and GPU measurements may overlap and should not be interpreted as strictly additive. ## View retention investigation A local CPU fixture reproduced view retention under repeated address changes in the same slot: - Padding-only changes: one retained view. - Address changes: 25,000 retained views. - Additional private committed memory: 10.71 MiB. This demonstrates retention under synthetic churn. Its frequency and impact in a representative graphics runtime remain under investigation. We are not yet claiming an application-level memory leak. ## Pipeline readiness and correctness We investigated an earlier performance run where 9,218 draws were omitted during the first frame. The affected PSO required approximately 1,702 ms to become ready, exceeding the configured 500 ms wait. Subsequent cold-start runs passed, but the original latency cause remains unresolved. This is why we are treating executed draw counts, visual equivalence and pipeline readiness as mandatory performance validation criteria. Higher FPS alone is not sufficient if rendering work is omitted. ## Cross-hardware collaboration @ElSeba0811 Thanks again for the Pascal validation and your suggestions regarding aggregate memory budgeting. @ColorMeBoom Your RX 5700 XT results are particularly relevant to our investigation of mesh fallback batching and per-draw overhead on older AMD hardware. Our previous synthetic mesh pool results reduced aggregate allocation from 1,440 MiB to 816 MiB, without refusing draws in that workload. We would like to prepare an isolated memory-budget and reclamation patch, with: - Exact upstream base commit - Reproducible synthetic regression workload - Allocated pool capacity counters - In-flight allocation counters - Idle retained chunk counters - Residency measurements where available - Budget exhaustion behavior - Fence-aware reuse and reclamation validation A common workload across Polaris, Pascal and RDNA1 would help establish which improvements are portable and which require architecture-specific handling. The isolated upstream patch is still pending preparation and validation. ## Next steps - Texture registration fast path - Detailed `tables()` profiling - View lifetime and memory retention - Mesh fallback batching - Pipeline readiness and cold-start reliability - Longer integrated synthetic validation All results above are from local synthetic tests. No GTA VI gameplay performance, full application compatibility or current upstream validation is claimed. Development was AI-assisted using ChatGPT, Claude Code and Codex, with local physical hardware validation. Credit to the original VIctory contributors and everyone contributing to PR #961. No game assets, proprietary binaries or extracted game shaders are attached.
ColorMeBoom commented 2026-11-27 03:14:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ColorMeBoom on 2026-11-27T03:14:05Z.


Merged with current main, tested on RDNA1. Branch: ColorMeBoom:pr961-rebase, one merge commit (14e9110) on top of this PR's head 31568ce. Main 63bcca4 is merged in, so your branch can fast-forward to it:

git fetch https://github.com/ColorMeBoom/VIctory pr961-rebase
git merge --ff-only FETCH_HEAD

Main conflicted in 12 files (49 hunks). Both sides' changes are kept. These changes go beyond the textual conflicts:

  • MESH_OUT_SPACE is 3, not 2. Main now binds the title-memory page table, view addresses and write marks as root views in MEMORY_SPACE = 2 (t0–t2, u0–u1). The fallback's u0–u2 are visible to every stage, so in space 2 they would overlap a pixel shader's memory views.
  • MESH_COMPUTE_SPACES moves main's new bindings too. The compute form's root UAVs go to space 9, and its per-stage memory views to space 10. The view-mark pair stays one shared copy, not moved, as main builds it. A const assertion in shader.rs keeps the spaces apart.
  • emit: emit_with keeps main's public signature (Options), and the fallback goes through a private emit_inner. translate_mesh_as_compute and emit_mesh_as_compute now take Options and use range::build, as translate_with does. The fallback vertex shader fills main's new HostShader fields.
  • shader_cache: main's entries are unchanged (refusals cached, the hit flag). Mesh fallbacks have their own converter and entry (shader.mesh-fallback), translated with view marks as host_shader does it. Both cache tests carried over.
  • pipeline/host.rs: the fallback's graphics pipeline uses host_blend. It takes the depth-bounds stream form when the state needs it, and fills marks/rectangles.
  • draw.rs: bind_as is main's bind body. Title arguments are read as title_compute says (graphics, for the fallback's compute pass), and host bindings are set as compute says. That covers marks, memory withholding, view strides and root-view offsets.
  • lower.rs: main left ~3.7 KB under the 512 KiB asset-policy limit and this PR adds ~4.5 KB. So mesh_out_store_at, mesh_out_store and mesh_group_id moved to emit/lower/mesh_out.rs. It's now 523,326 bytes; that's tight.

Results, on an RX 5700 XT (Navi 10, no mesh shaders, driver 32.0.21045.29003, Windows 11 26200) and WARP:

  • cargo test --workspace --locked -- --test-threads=1: 891 passed, 0 failed, 11 ignored. Main alone gives 872 here.
  • Mesh tests: victory-shader 13 passed (benchmark ignored), victory-gpu 9 passed. In both fallback-vs-mesh-shader comparisons, the card draws through the fallback and WARP draws the mesh-shader reference.
  • cargo clippy --workspace --all-targets --locked -- -D warnings clean. cargo xtask policy passes (it also ran as the pre-commit hook).
  • fallback_frame_cost, 3 runs: 1,000×32 is 2.90 / 0.49 / 0.35 ms (PerDraw / Batched / DrawsOnly). 7,000×4 is 16.0 / 0.55 / 0.33 ms. 7,000×16 is 16.4 / 1.73 / 1.23 ms. These are the same as at 31568ce except PerDraw at 7,000 draws, which is ~1 ms lower.

Not covered: no game run, no other vendor, no mesh-shader hardware. I didn't run rustfmt over whole files, because main itself isn't rustfmt-clean in several of them. Running it would bury this diff.

AI use: Claude Code (Claude Opus 5.5) did the merge and ran the tests; the machine and the decision to post are the reporter's.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7208817062 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7208817062). Originally posted by [ColorMeBoom](https://github.com/ColorMeBoom) on 2026-11-27T03:14:05Z. --- **Merged with current main, tested on RDNA1.** Branch: [`ColorMeBoom:pr961-rebase`](https://github.com/ColorMeBoom/VIctory/tree/pr961-rebase), one merge commit (`14e9110`) on top of this PR's head `31568ce`. Main `63bcca4` is merged in, so your branch can fast-forward to it: ``` git fetch https://github.com/ColorMeBoom/VIctory pr961-rebase git merge --ff-only FETCH_HEAD ``` Main conflicted in 12 files (49 hunks). Both sides' changes are kept. These changes go beyond the textual conflicts: - **`MESH_OUT_SPACE` is 3, not 2.** Main now binds the title-memory page table, view addresses and write marks as root views in `MEMORY_SPACE = 2` (`t0`–`t2`, `u0`–`u1`). The fallback's `u0`–`u2` are visible to every stage, so in space 2 they would overlap a pixel shader's memory views. - **`MESH_COMPUTE_SPACES` moves main's new bindings too.** The compute form's root UAVs go to space 9, and its per-stage memory views to space 10. The view-mark pair stays one shared copy, not moved, as main builds it. A `const` assertion in `shader.rs` keeps the spaces apart. - **`emit`:** `emit_with` keeps main's public signature (`Options`), and the fallback goes through a private `emit_inner`. `translate_mesh_as_compute` and `emit_mesh_as_compute` now take `Options` and use `range::build`, as `translate_with` does. The fallback vertex shader fills main's new `HostShader` fields. - **`shader_cache`:** main's entries are unchanged (refusals cached, the hit flag). Mesh fallbacks have their own converter and entry (`shader.mesh-fallback`), translated with view marks as `host_shader` does it. Both cache tests carried over. - **`pipeline/host.rs`:** the fallback's graphics pipeline uses `host_blend`. It takes the depth-bounds stream form when the state needs it, and fills `marks`/`rectangles`. - **`draw.rs`:** `bind_as` is main's `bind` body. Title arguments are read as `title_compute` says (graphics, for the fallback's compute pass), and host bindings are set as `compute` says. That covers marks, memory withholding, view strides and root-view offsets. - **`lower.rs`:** main left ~3.7 KB under the 512 KiB asset-policy limit and this PR adds ~4.5 KB. So `mesh_out_store_at`, `mesh_out_store` and `mesh_group_id` moved to `emit/lower/mesh_out.rs`. It's now 523,326 bytes; that's tight. **Results**, on an RX 5700 XT (Navi 10, no mesh shaders, driver 32.0.21045.29003, Windows 11 26200) and WARP: - `cargo test --workspace --locked -- --test-threads=1`: 891 passed, 0 failed, 11 ignored. Main alone gives 872 here. - Mesh tests: `victory-shader` 13 passed (benchmark ignored), `victory-gpu` 9 passed. In both fallback-vs-mesh-shader comparisons, the card draws through the fallback and WARP draws the mesh-shader reference. - `cargo clippy --workspace --all-targets --locked -- -D warnings` clean. `cargo xtask policy` passes (it also ran as the pre-commit hook). - `fallback_frame_cost`, 3 runs: 1,000×32 is 2.90 / 0.49 / 0.35 ms (PerDraw / Batched / DrawsOnly). 7,000×4 is 16.0 / 0.55 / 0.33 ms. 7,000×16 is 16.4 / 1.73 / 1.23 ms. These are the same as at `31568ce` except PerDraw at 7,000 draws, which is ~1 ms lower. **Not covered:** no game run, no other vendor, no mesh-shader hardware. I didn't run rustfmt over whole files, because main itself isn't rustfmt-clean in several of them. Running it would bury this diff. AI use: Claude Code (Claude Opus 5.5) did the merge and ran the tests; the machine and the decision to post are the reporter's.
delacor commented 2026-11-27 12:05:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by delacor on 2026-11-27T12:05:30Z.


Linux/RDNA1 progress update from our local integration on an RX 5500 XT 8 GiB with Wine/vkd3d-proton: the opening 3D room and character geometry are now visible using the compute fallback plus additional fixes. Face/shading artifacts and dropped passes remain, so this is not an end-to-end rendering correctness claim.

Our backend accepts the state-changing indirect signatures but produces no mesh work with device-generated commands disabled. Explicit output bindings and ordinary indirect compute/draw pairs restore geometry, with each pair finishing its read before output reuse. Five actual GPU regressions pass, including multiple records whose combined storage exceeds one region. Native mesh execution keeps its existing path.

We also tested an opt-in shared Data output allocator across host lists on the single DIRECT queue. Indirect command buffers stay private; group counts, layout, capacity and write/read dependencies are preserved. Earlier size allocations remain owned after growth. The existing pool already recycles output after each draw; this addresses retention across simultaneously live lists.

Same-executable sequential comparison Private output pools Shared output storage
Final retained mesh storage 1947 MiB 95 MiB
Peak retained mesh storage 2491 MiB 97 MiB
Peak total observed VRAM usage 7.964 GiB 6.186 GiB
Mean warm frame time 199.526 ms 195.035 ms
FPS calculated from mean frame time 5.012 5.127

The application mesh-storage counter includes command buffers and free/delayed storage; it is not total GPU memory. Warm samples cover 120–410 seconds with no shader compilation (53 private, 51 shared samples). Draw counts differ (1114.42 versus 1104.31 on average), and the shared run had USB/dock hotplug messages. This supports about 95% lower final retained mesh storage, not an established FPS gain. Neither run reported an amdgpu fault/reset.

The shared-storage GPU regression records 32 lists before submission and checks reverse batched order, separate submissions, growth and exact producer/consumer output across 64 lists. It passes and retains 3 MiB in the synthetic case. Barrier/image and indirect regressions, Windows all-target checks and the app build also pass in the integration. Other GPUs, native Windows drivers and long-session behavior remain unverified.

Credit: yoraudev's alternative Marvisak #1648 already uses global intermediate storage. Our experiment adapts that idea to this fallback allocator and translator rather than introducing another emulation implementation. Its benefit is not intrinsically limited to 8-GiB GPUs, but native mesh draws bypass these buffers. No native-path 7900 XTX speedup is claimed.

These are local integration results with follow-up changes, not validation of this PR's unmodified head. The narrow follow-up patches still need extraction against the agreed fallback base; unrelated experiments and private captures/shaders/executables will be excluded. AI-assisted investigation and synthetic regression work with Codex.

The same findings also apply to the related 7900 fallback draft #20.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217828329 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7217828329). Originally posted by [delacor](https://github.com/delacor) on 2026-11-27T12:05:30Z. --- Linux/RDNA1 progress update from our local integration on an RX 5500 XT 8 GiB with Wine/vkd3d-proton: the opening 3D room and character geometry are now visible using the compute fallback plus additional fixes. Face/shading artifacts and dropped passes remain, so this is not an end-to-end rendering correctness claim. Our backend accepts the state-changing indirect signatures but produces no mesh work with device-generated commands disabled. Explicit output bindings and ordinary indirect compute/draw pairs restore geometry, with each pair finishing its read before output reuse. Five actual GPU regressions pass, including multiple records whose combined storage exceeds one region. Native mesh execution keeps its existing path. We also tested an opt-in shared **Data output** allocator across host lists on the single DIRECT queue. Indirect command buffers stay private; group counts, layout, capacity and write/read dependencies are preserved. Earlier size allocations remain owned after growth. The existing pool already recycles output after each draw; this addresses retention across simultaneously live lists. | Same-executable sequential comparison | Private output pools | Shared output storage | |---|---:|---:| | Final retained mesh storage | 1947 MiB | 95 MiB | | Peak retained mesh storage | 2491 MiB | 97 MiB | | Peak total observed VRAM usage | 7.964 GiB | 6.186 GiB | | Mean warm frame time | 199.526 ms | 195.035 ms | | FPS calculated from mean frame time | 5.012 | 5.127 | The application mesh-storage counter includes command buffers and free/delayed storage; it is not total GPU memory. Warm samples cover 120–410 seconds with no shader compilation (53 private, 51 shared samples). Draw counts differ (1114.42 versus 1104.31 on average), and the shared run had USB/dock hotplug messages. This supports about **95% lower final retained mesh storage**, not an established FPS gain. Neither run reported an amdgpu fault/reset. The shared-storage GPU regression records 32 lists before submission and checks reverse batched order, separate submissions, growth and exact producer/consumer output across 64 lists. It passes and retains 3 MiB in the synthetic case. Barrier/image and indirect regressions, Windows all-target checks and the app build also pass in the integration. Other GPUs, native Windows drivers and long-session behavior remain unverified. Credit: yoraudev's alternative [Marvisak #1648](https://github.com/Marvisak/VIctory/pull/1648) already uses global intermediate storage. Our experiment adapts that idea to this fallback allocator and translator rather than introducing another emulation implementation. Its benefit is not intrinsically limited to 8-GiB GPUs, but native mesh draws bypass these buffers. No native-path 7900 XTX speedup is claimed. These are local integration results with follow-up changes, not validation of this PR's unmodified head. The narrow follow-up patches still need extraction against the agreed fallback base; unrelated experiments and private captures/shaders/executables will be excluded. AI-assisted investigation and synthetic regression work with Codex. The same findings also apply to the related [7900 fallback draft #20](https://github.com/avatarmanz/VIctory-7900XTX/pull/20).
vorgales commented 2026-11-28 13:44:36 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by vorgales on 2026-11-28T13:44:36Z.


Real-Title Polaris Validation Report: AMD Radeon RX 580 8GB (3D Scene Entry, Open-World Stability & Recent Regression)

Following the recent Polaris (RX 470) and 8GB AMD progress here by @AtsonMelo, @zlwbbb-del, @delacor, and @ColorMeBoom, I would like to share real-title test data from physical Polaris 20 (RX 580 8GB) hardware that may help both the mesh-compute fallback effort and upstream 8GB AMD stability.

  1. Hardware & Test Environment

• GPU: AMD Radeon RX 580 8GB (Polaris 20, GCN 4th Gen — native Wave64 only, no hardware Ray Tracing or Mesh Shaders)
• CPU & RAM: AMD Ryzen 5 5500 (Zen 3, compiled locally with RUSTFLAGS="-C target-cpu=native") / 32 GB DDR4
• OS / Target Profile: Windows 10/11 x64 (--console series-s, -width 1280 -height 720)
• Tested Branches:
• Earlier AMD Baseline (Belobug-AMD / local Polaris build): Successfully entered the 3D prison scene (usa_story), rendered character/environment geometry (~2–3 FPS), and remained completely crash-free even after transitioning into open-world gameplay.
• Latest Merged Tree (VIctory-cycle-vi): Reaches ~37 FPS at loading with 0 texture errors, then hits a driver hang (0x80070057 -> 0x887A0005) at the exact transition into the 3D scene.

  1. Proven Low-Footprint Memory & Stability Configuration (8GB Polaris)

To prevent the 22–52 GB process RAM spikes and 4.2+ GB VRAM OOM/TDR hangs observed on default settings, the following runtime configuration kept memory strictly bounded on Polaris:
• Launch Arguments:
--console series-s -novid -norestrictions -width 1280 -height 720 -availablevidmem 6144 --disableRayTracing --enableFSR --fsrQuality 2 --lodScale 0.5 --ptdLodBias 0.75
• Environment Variables:
AMD_DEBUG=nodcc, VICTORY_HOIST_CLAMPS=7, VICTORY_AMBIENT=0.5, VICTORY_HAIR=0, VICTORY_SHADER_LOOP_LIMIT=65536
• Measured Footprint & Behavior:
• Menu / loading VRAM stayed locked at ~994–1188 MB and system RAM at ~6.3 GB with 0 texture failures (159–338 pipelines built, CPU frame time ~0.2 ms).
• On the earlier AMD branch, this exact preset sustained crash-free open-world execution without hitting device removal or memory exhaustion.
• Critical Crash Boundaries on Polaris: Setting VICTORY_HOIST_CLAMPS=0 or 1, or disabling VICTORY_CARD_BUFFERS=0, causes immediate null-pointer access violations (write 0x0, 0xc0000005) inside victory-image-*.dll.
• Shader / Format Guards Used: Enforcing native Wave64 execution and guarding B8G8R8X8_UNORM -> R32_UINT SRV views prevented early pipeline refusals on Polaris.

  1. Exact Regression Blocking 3D Scene Entry in Newer Trees (0x80070057 -> 0x887A0005)

Unlike the earlier AMD build that entered the 3D scene cleanly, newer merged trees fail at the exact 3D scene threshold with E_INVALIDARG (0x80070057) followed by DXGI_ERROR_DEVICE_HUNG (0x887A0005):

  1. Cross-Family Depth-Twin CopyResource Rejection (crates/victory-gpu/src/host.rs -> record_twin_copy):
    • Creating a UAV of a depth texture (format: 55 / R16_TYPELESS) reaches copy::full_copy_resource(list, from, to) (through: None).
    • The Polaris DX12 driver (atikmdag) rejects CopyResource between a typeless depth texture (R16_TYPELESS) and its colour twin, returning 0x80070057 inside state prelude and hanging the device.

  2. FFX FSR2 / FSR4 Pipeline Failure & Unsafe Wave32 Fallback:
    • SerializeRootSignature / DeserializeComputePipelineState fails (hr=0x80070057 / 0x80004005) on Ffx_FSR2_Pass_* and FFX_FSR4_PASS_* (FFX FSR4 PASS 21–26, SPD AUTOEXPOSURE, RCAS), falling back to Wave32, which is unsupported on Wave64-only Polaris hardware.

  3. Actionable Takeaways for Polaris / Pre-RDNA Support

• Guard record_twin_copy (host.rs): Skip or replace copy::full_copy_resource with a compatible subresource/compute copy path when from is a typeless depth resource (R16_TYPELESS / R32_TYPELESS) on Polaris/GCN adapters.
• Prevent Wave32 Fallback & Add an FFX Bypass Flag: When Ffx_FSR2 / FSR4 passes fail on Wave64-only GPUs, block fallback to Wave32 or expose a toggle (e.g., VICTORY_DISABLE_FFX=1) to skip unsupported upscaling passes cleanly.
• Combine Shared Pool Budgeting with Low-VRAM Clamping: Pairing @delacor's shared output storage approach with the VICTORY_HOIST_CLAMPS=7 + -availablevidmem preset provides a strong baseline for 8GB Polaris/RDNA1 GPUs.
"As an older-generation GPU user, even if the game gets ported to these cards, making it genuinely playable requires tremendous engineering effort. Best of luck and keep up the great work!"

<!-- greyfinch-sync:Marvisak/VIctory:comment:7240153206 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7240153206). Originally posted by [vorgales](https://github.com/vorgales) on 2026-11-28T13:44:36Z. --- Real-Title Polaris Validation Report: AMD Radeon RX 580 8GB (3D Scene Entry, Open-World Stability & Recent Regression) Following the recent Polaris (RX 470) and 8GB AMD progress here by @AtsonMelo, @zlwbbb-del, @delacor, and @ColorMeBoom, I would like to share real-title test data from physical Polaris 20 (RX 580 8GB) hardware that may help both the mesh-compute fallback effort and upstream 8GB AMD stability. 1. Hardware & Test Environment • GPU: AMD Radeon RX 580 8GB (Polaris 20, GCN 4th Gen — native Wave64 only, no hardware Ray Tracing or Mesh Shaders) • CPU & RAM: AMD Ryzen 5 5500 (Zen 3, compiled locally with RUSTFLAGS="-C target-cpu=native") / 32 GB DDR4 • OS / Target Profile: Windows 10/11 x64 (--console series-s, -width 1280 -height 720) • Tested Branches: • Earlier AMD Baseline (Belobug-AMD / local Polaris build): Successfully entered the 3D prison scene (usa_story), rendered character/environment geometry (~2–3 FPS), and remained completely crash-free even after transitioning into open-world gameplay. • Latest Merged Tree (VIctory-cycle-vi): Reaches ~37 FPS at loading with 0 texture errors, then hits a driver hang (0x80070057 -> 0x887A0005) at the exact transition into the 3D scene. 2. Proven Low-Footprint Memory & Stability Configuration (8GB Polaris) To prevent the 22–52 GB process RAM spikes and 4.2+ GB VRAM OOM/TDR hangs observed on default settings, the following runtime configuration kept memory strictly bounded on Polaris: • Launch Arguments: --console series-s -novid -norestrictions -width 1280 -height 720 -availablevidmem 6144 --disableRayTracing --enableFSR --fsrQuality 2 --lodScale 0.5 --ptdLodBias 0.75 • Environment Variables: AMD_DEBUG=nodcc, VICTORY_HOIST_CLAMPS=7, VICTORY_AMBIENT=0.5, VICTORY_HAIR=0, VICTORY_SHADER_LOOP_LIMIT=65536 • Measured Footprint & Behavior: • Menu / loading VRAM stayed locked at ~994–1188 MB and system RAM at ~6.3 GB with 0 texture failures (159–338 pipelines built, CPU frame time ~0.2 ms). • On the earlier AMD branch, this exact preset sustained crash-free open-world execution without hitting device removal or memory exhaustion. • Critical Crash Boundaries on Polaris: Setting VICTORY_HOIST_CLAMPS=0 or 1, or disabling VICTORY_CARD_BUFFERS=0, causes immediate null-pointer access violations (write 0x0, 0xc0000005) inside victory-image-*.dll. • Shader / Format Guards Used: Enforcing native Wave64 execution and guarding B8G8R8X8_UNORM -> R32_UINT SRV views prevented early pipeline refusals on Polaris. 3. Exact Regression Blocking 3D Scene Entry in Newer Trees (0x80070057 -> 0x887A0005) Unlike the earlier AMD build that entered the 3D scene cleanly, newer merged trees fail at the exact 3D scene threshold with E_INVALIDARG (0x80070057) followed by DXGI_ERROR_DEVICE_HUNG (0x887A0005): 1. Cross-Family Depth-Twin CopyResource Rejection (crates/victory-gpu/src/host.rs -> record_twin_copy): • Creating a UAV of a depth texture (format: 55 / R16_TYPELESS) reaches copy::full_copy_resource(list, from, to) (through: None). • The Polaris DX12 driver (atikmdag) rejects CopyResource between a typeless depth texture (R16_TYPELESS) and its colour twin, returning 0x80070057 inside state prelude and hanging the device. 2. FFX FSR2 / FSR4 Pipeline Failure & Unsafe Wave32 Fallback: • SerializeRootSignature / DeserializeComputePipelineState fails (hr=0x80070057 / 0x80004005) on Ffx_FSR2_Pass_* and FFX_FSR4_PASS_* (FFX FSR4 PASS 21–26, SPD AUTOEXPOSURE, RCAS), falling back to Wave32, which is unsupported on Wave64-only Polaris hardware. 4. Actionable Takeaways for Polaris / Pre-RDNA Support • Guard record_twin_copy (host.rs): Skip or replace copy::full_copy_resource with a compatible subresource/compute copy path when from is a typeless depth resource (R16_TYPELESS / R32_TYPELESS) on Polaris/GCN adapters. • Prevent Wave32 Fallback & Add an FFX Bypass Flag: When Ffx_FSR2 / FSR4 passes fail on Wave64-only GPUs, block fallback to Wave32 or expose a toggle (e.g., VICTORY_DISABLE_FFX=1) to skip unsupported upscaling passes cleanly. • Combine Shared Pool Budgeting with Low-VRAM Clamping: Pairing @delacor's shared output storage approach with the VICTORY_HOIST_CLAMPS=7 + -availablevidmem preset provides a strong baseline for 8GB Polaris/RDNA1 GPUs. "As an older-generation GPU user, even if the game gets ported to these cards, making it genuinely playable requires tremendous engineering effort. Best of luck and keep up the great work!"
TurboSosiska304 commented 2026-11-29 14:58:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TurboSosiska304 on 2026-11-29T14:58:04Z.


On Proton/Wine this branch's fallback pipelines fail before they run: the
helper HLSL in mesh_indirect.rs and indirect.rs reads through
RWByteAddressBuffer.Load*(), and Wine's compiler rejects it with

E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer'

so CreateComputePipelineState fails with 0x80070057 (that is the 483
pipelines in the RDNA1 report above). Indexed access compiles to the same DXIL
on Windows and works under Wine: count[0] and args[i * stride] instead of
Load(0) / Load(i * stride), count_buf[count_offset], and
uint2(args[at], args[at + 1]) / uint3(args[at], args[at + 1], args[at + 2])
for Load2/Load3.

I ported this branch onto HumanlyDev/HUMAN with that change and it builds and
passes clippy there: github.com/TurboSosiska304/HUMAN@50ae2a4.
Happy to send it as a patch against this branch if it is useful here.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7257714825 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7257714825). Originally posted by [TurboSosiska304](https://github.com/TurboSosiska304) on 2026-11-29T14:58:04Z. --- On Proton/Wine this branch's fallback pipelines fail before they run: the helper HLSL in `mesh_indirect.rs` and `indirect.rs` reads through `RWByteAddressBuffer.Load*()`, and Wine's compiler rejects it with ``` E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer' ``` so `CreateComputePipelineState` fails with `0x80070057` (that is the 483 pipelines in the RDNA1 report above). Indexed access compiles to the same DXIL on Windows and works under Wine: `count[0]` and `args[i * stride]` instead of `Load(0)` / `Load(i * stride)`, `count_buf[count_offset]`, and `uint2(args[at], args[at + 1])` / `uint3(args[at], args[at + 1], args[at + 2])` for `Load2`/`Load3`. I ported this branch onto HumanlyDev/HUMAN with that change and it builds and passes clippy there: https://github.com/TurboSosiska304/HUMAN/commit/50ae2a4. Happy to send it as a patch against this branch if it is useful here.
dyxiguajun commented 2026-12-01 06:29:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by dyxiguajun on 2026-12-01T06:29:02Z.


Tesla P100 test of Mesh-to-Compute and divergent Wave64 first-lane reads

Thank you @EduBertozzi and the contributors to this mesh fallback. We have a Pascal data point that may help test its interaction with Wave64 lowering. Our build adapts the Mesh-to-Compute approach from this PR at 31568ced and includes substantial additional fork changes. We have not tested this PR's current head as a standalone build, so this is not a test of the PR itself.

Environment. NVIDIA Tesla P100-PCIE-16GB, Windows build 26300, driver 31.0.15.3713, D3D12 Shader Model 6.7, Mesh Shader Tier 0, 32 GiB system RAM. Series X profile, 1280×720 internal scene and 2560×1440 output, frame generation off. The tested Windows GNU diagnostic build is based on local commit 6950e6d1b83c8e84fdd7ac3c744cc81fedc84b47.

Translation failure. An earlier run recorded 22 distinct Mesh programs refused because v_readfirstlane_b32 occurred under divergent execution, where an exact cross-half exchange could not be lowered by our existing path. Three affected pipelines repeatedly dropped draws in the marked missing-face scene. We have not identified which draw produces the skin.

Experiment. In the next build, Mesh-to-Compute first attempts the existing exact lowering and retries. Only when these fail with the specific divergent first-lane error, and only with the opt-in VICTORY_MESH_HALF_FIRST_LANE=1, it retries with each 32-lane host wave reading its own first active lane. Other failures retain their existing behavior. This is deliberately approximate: the upper and lower halves can observe different values, including different attributes. It is not a general Wave64 emulation and pipeline creation alone does not establish correct geometry or materials.

The R20 log recorded 34 shader recoveries through this fallback. The user saw character facial skin restored, continued interacting and exited normally after approximately eight minutes. Earlier and later runs reached different scenes and other fork changes were present, so neither the counts nor the visual result independently establish that this approximation alone caused the recovery. Additional visual defects remained.

Synthetic testing. A local synthetic Mesh-to-Compute regression run reported 9 passed and 1 ignored benchmark on a P100 and Microsoft software adapter. It exercised generated vertices and indices, rasterization, interpolation and depth. An initial test incorrectly expected the two halves to agree on one attribute. GPU readback showed the discrepancy, and a later test-only commit (f062bc743c9c3bce81bc1407048dc931dfbc6e5a) corrected that expectation. The tested R20 executable predates that test-only change. Full CI and a native Wave64 comparison have not been run for this experiment.

Performance context. In the final marked indoor window, approximately 26 seconds, there were 0.631 presents per second containing draws. The user observed roughly 0.5 FPS on the overlay. These are one run's present and display observations, not a verified rate of correct frames. Peak process private commit was 31.09 GiB. No broad performance claim is intended.

Questions for follow-up. Would a synthetic regression covering divergent first-lane behavior and geometry attributes be useful on top of this PR or the Wave64 work in #189? Is there an existing exact lowering appropriate for this case that we should test first? We can provide a minimal source/test patch after adapting it to the chosen base and verifying that it contains only independent synthetic inputs. The local R20 commit is not yet published, so the commit IDs above are provenance for the local experiment rather than publicly resolvable links.

Related prior work includes the comparison in #1132, which already documents half-local first-lane results and their inexactness, #2220, and ElSeba0811's GTX-oriented #2203. Thanks also to the authors of those analyses and of #189. No game data, screenshots or shader dumps are attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7302925519 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7302925519). Originally posted by [dyxiguajun](https://github.com/dyxiguajun) on 2026-12-01T06:29:02Z. --- ### Tesla P100 test of Mesh-to-Compute and divergent Wave64 first-lane reads Thank you @EduBertozzi and the contributors to this mesh fallback. We have a Pascal data point that may help test its interaction with Wave64 lowering. Our build adapts the Mesh-to-Compute approach from this PR at `31568ced` and includes substantial additional fork changes. We have not tested this PR's current head as a standalone build, so this is not a test of the PR itself. **Environment.** NVIDIA Tesla P100-PCIE-16GB, Windows build 26300, driver `31.0.15.3713`, D3D12 Shader Model 6.7, Mesh Shader Tier 0, 32 GiB system RAM. Series X profile, 1280×720 internal scene and 2560×1440 output, frame generation off. The tested Windows GNU diagnostic build is based on local commit `6950e6d1b83c8e84fdd7ac3c744cc81fedc84b47`. **Translation failure.** An earlier run recorded 22 distinct Mesh programs refused because `v_readfirstlane_b32` occurred under divergent execution, where an exact cross-half exchange could not be lowered by our existing path. Three affected pipelines repeatedly dropped draws in the marked missing-face scene. We have not identified which draw produces the skin. **Experiment.** In the next build, Mesh-to-Compute first attempts the existing exact lowering and retries. Only when these fail with the specific divergent first-lane error, and only with the opt-in `VICTORY_MESH_HALF_FIRST_LANE=1`, it retries with each 32-lane host wave reading its own first active lane. Other failures retain their existing behavior. This is deliberately approximate: the upper and lower halves can observe different values, including different attributes. It is not a general Wave64 emulation and pipeline creation alone does not establish correct geometry or materials. The R20 log recorded 34 shader recoveries through this fallback. The user saw character facial skin restored, continued interacting and exited normally after approximately eight minutes. Earlier and later runs reached different scenes and other fork changes were present, so neither the counts nor the visual result independently establish that this approximation alone caused the recovery. Additional visual defects remained. **Synthetic testing.** A local synthetic Mesh-to-Compute regression run reported 9 passed and 1 ignored benchmark on a P100 and Microsoft software adapter. It exercised generated vertices and indices, rasterization, interpolation and depth. An initial test incorrectly expected the two halves to agree on one attribute. GPU readback showed the discrepancy, and a later test-only commit (`f062bc743c9c3bce81bc1407048dc931dfbc6e5a`) corrected that expectation. The tested R20 executable predates that test-only change. Full CI and a native Wave64 comparison have not been run for this experiment. **Performance context.** In the final marked indoor window, approximately 26 seconds, there were 0.631 presents per second containing draws. The user observed roughly 0.5 FPS on the overlay. These are one run's present and display observations, not a verified rate of correct frames. Peak process private commit was 31.09 GiB. No broad performance claim is intended. **Questions for follow-up.** Would a synthetic regression covering divergent first-lane behavior and geometry attributes be useful on top of this PR or the Wave64 work in [#189](https://github.com/Marvisak/VIctory/pull/189)? Is there an existing exact lowering appropriate for this case that we should test first? We can provide a minimal source/test patch after adapting it to the chosen base and verifying that it contains only independent synthetic inputs. The local R20 commit is not yet published, so the commit IDs above are provenance for the local experiment rather than publicly resolvable links. Related prior work includes the comparison in [#1132](https://github.com/Marvisak/VIctory/issues/1132), which already documents half-local first-lane results and their inexactness, [#2220](https://github.com/Marvisak/VIctory/issues/2220), and ElSeba0811's GTX-oriented [#2203](https://github.com/Marvisak/VIctory/pull/2203). Thanks also to the authors of those analyses and of [#189](https://github.com/Marvisak/VIctory/pull/189). No game data, screenshots or shader dumps are attached.
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/961:upstream-pr/961'
git switch 'upstream-pr/961'

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