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

Open
github-bot wants to merge 14 commits from github-bot/gh-961 into main AGit
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 14:29 UTC · original
EduBertozzi:pr/mesh-compute-fallback → main · +4132 −68 · 18 files · 14 commits · open

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

**@⁠EduBertozzi** on GitHub · 2026-11-24 14:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/961) `EduBertozzi:pr/mesh-compute-fallback` → `main` · +4132 −68 · 18 files · 14 commits · open 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)
For hosts without mesh shaders (Pascal, RDNA1), whose mesh pipelines are
refused today. `translate_mesh_as_compute` lowers a mesh program with the
same `Lower` as `translate`, so every instruction it handles is handled
the same way. Only the four mesh output operations change; they become
raw stores to three UAVs in the new MESH_OUT_SPACE (space 2):

| mesh op | compute form |
|---|---|
| setMeshOutputCounts | dropped (the declared maxima, as the mesh form) |
| storeVertexOutput | u0: record g * max_vertices + v, 4 dwords per output element |
| emitIndices | u1: 3 indices, with the group's first vertex added; culled or unexported ones are 0, 0, 0 (no area) |
| storePrimitiveOutput | u2: record g * max_primitives + p |

It comes back as a `MeshFallback` with a `MeshLayout` and a generated
vertex shader. The vertex shader reads u0-u2 as t0-t2 and writes the mesh
program's own output signature, so the title's pixel shader (which links
by semantic) stays as it is.

* Without per-primitive outputs, it draws indexed by u1: vertex
  SV_VertexID is record SV_VertexID.
* With them, it draws unindexed, three vertices per primitive (`expanded`).
  Each corner reads its index from t1, and the primitive's record from t2
  becomes constant-interpolated outputs after the vertex rows.

`emit` and `translate` are unchanged.

Tests (emit/mesh_compute_tests.rs) use a hand-assembled three-lane mesh
program: one triangle and two culled primitives per group, optionally
with a per-primitive COLOR0.

* Both forms and the vertex shader pass dxil.dll.
* The compute form writes the expected vertices and indices for two
  groups.
* Drawn into a 32x32 target, the mesh shader and the fallback give the
  same image: within 1e-6 on WARP 1.0.22 (which has mesh shaders), and
  with the same coverage and values within 1e-3 on a GTX 1060 (which has
  none). Both cases are checked, with and without per-primitive outputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a host without mesh shaders, or anywhere with VICTORY_MESH_FALLBACK=1
for comparing, a mesh pipeline is no longer refused.

Pipelines. The mesh program's `MeshFallback` is made once per shader.
The host pipeline gets:

* the mesh stage's root parameters visible to all stages;
* root UAVs u0-u2 and root SRVs t0-t2 in MESH_OUT_SPACE;
* a compute pipeline for the mesh program;
* as its graphics pipeline, the fallback vertex shader with the title's
  pixel shader and graphics state.

It is refused, with one log line, when the compute form binds otherwise
than the mesh form.

Direct mesh dispatches (x groups):

1. Bind the mesh stage with the title's graphics root arguments on the
   compute bindings. To allow that, `bind_as` separates which root
   arguments are read from where they are set.
2. Dispatch x groups into a default-heap buffer of the list's own.
3. Move the buffer to index-buffer and shader-resource state and draw as
   any draw: 3 * max_primitives * x indices, or vertices when expanded.
4. Restore the title's topology and put the buffer back to COMMON.

Each fallback draw of a list gets its own buffer, reused after the list
is reset.

Indirect mesh dispatches (mesh_indirect.rs). After the argument clamp, an
HLSL pass (compiled by the system's compiler, like the clamp) walks the
records and their count. It writes:

* compute commands: u0-u2 root UAV addresses, each record after the
  previous records' groups, then the dispatch;
* draw commands: a t0 root SRV address, then a draw starting at the
  record's first index or vertex (t1 and t2 stay at their regions'
  starts).

Two ExecuteIndirect calls follow, under command signatures made with the
pipeline's root signature. Each execution writes at most 32 MiB; records
past that run empty.

Tests:

* The argument pass runs on the GPU in mesh_indirect/tests.rs: records of
  2, 0 and 5 groups, indexed and expanded, with and without a count.
  Each gets its own addresses and draw.
* The pipeline and draw paths need the title's device. They have not run
  against the title (no game data here). The shader side is covered by
  victory-shader's mesh_compute_tests.

Not done:

* The compute form is not in the shader cache.
* There is one buffer per draw.
* A wave64 mesh program keeps its lane layout as compute, so on 32-lane
  hosts it hits what #578 refuses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The compute form of a mesh program (`MeshFallback`) was translated afresh
on every run. It now goes through the shader cache like the plain
translations: same build key, content-addressed and written atomically,
but under its own converter id (`shader.mesh-fallback`). So a container
has one entry for each form.

`cached` becomes `cached_as` over an entry kind (id, encode, decode). The
fallback's encoding is new: both shaders in the existing encoding,
length-prefixed, then `expanded` and the layout's words.

Tests: the fallback comes back from disk without translating again, and
apart from the same container's plain translation. Its entries round-trip
and refuse truncated, padded or foreign bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each mesh fallback draw had a default-heap buffer of its own, kept until
the list was reset: memory grew with the draws per list. Now a list has
two pools of 64 MiB chunks (bigger requests get a power-of-two chunk of
their own). Each draw takes the next 256-byte-aligned region:

* Data: what the mesh program writes.
* Commands: what an indirect draw executes. It is kept apart because an
  indirect draw reads its commands (INDIRECT_ARGUMENT) while it writes
  its data (UAV), and a chunk has one state.

Chunks rest in UNORDERED_ACCESS between draws. A chunk's first use in the
list moves it out of COMMON before anything that can fail, and each draw
moves its chunk to the read state and back around its reads. Those
transitions order earlier draws' reads before later writes to other
regions of the chunk. After the list runs, the chunks decay to COMMON
like any buffer and serve again after the reset.

Test (on a device of its own): regions are aligned and apart, only a
chunk's first region asks for the COMMON transition, a big request gets
its own chunk, and a reset hands the first chunk out again from COMMON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every mesh program of the title is wave64. On 32-lane hosts (every NVIDIA
GPU) they hang the GPU (#778) or, with #578, are all refused. Whether the
compute fallback can run them in #439's console flow depends on things
nobody has counted yet: their group sizes (that flow takes at most 64
threads), LDS, s_barrier, lane reads, and branches on EXEC.

`victory mesh-census [paths]` finds the mesh programs, as `translate`
does, and prints a table by thread-group size: programs, wave64, LDS,
s_barrier, lane reads (DPP, swizzles, permutes, v_readlane /
v_writelane / v_permlane), v_mbcnt, EXEC branches, and how many translate
as a mesh shader and as compute. After the table come the reasons
translations stop, most common first. It prints counts only, nothing of
the programs, so the output can be shared.

Tests: the facts of synthetic mesh programs (a barrier, a DPP move, an
EXEC branch, LDS; and a compute program not counted), and the report's
rows, totals and reasons. On an empty folder it prints the empty table.
Not run on the title here (no game data).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
D3D12 refuses a mesh shader whose outputs per group exceed 32 KiB
(4 bytes per component of every vertex element times the vertex maximum
rounded up to 32, plus the same for primitives). Testers on #3 found 53 of
the title's mesh programs over it. The compute form writes to buffers and
has no such limit, so a pipeline whose mesh program is over it now takes
the compute fallback on every host, mesh shaders or not, with a log line.

`emit::mesh_output_bytes` counts it from the container as the
translation declares the signatures; `Shader::mesh_over_limit` caches it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
An ignored benchmark (`fallback_frame_cost`, run with --ignored) draws a
synthetic 32-lane mesh program through the fallback in frames of
1,000-7,000 draws and prints the GPU time three ways: per draw as
victory-gpu records it today (compute, transition, draw, transition back),
with every compute pass batched before the draws, and the draws alone.

On a GTX 1060 (no mesh shaders), 7,000 draws of 4 groups take 31-33 ms
per draw, 1.9 ms batched and 0.35 ms as draws alone. Dropping the
barriers (measured separately, not kept: it races) saves little, so the
cost is switching between compute and graphics work on every draw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Initialize every declared primitive index record in the compute fallback
CI's clippy (-D warnings) refuses `chunks_exact` with a constant size
(clippy::chunks_exact_with_const_size); the readback added with the
primitive-tail fix used it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A fallback pipeline's root signature gives the mesh stage's parameters
visibility ALL (the compute pass sees only that), and the pixel stage's
own parameters PIXEL. Both stages declare user data at b0 (and their
immediate samplers at s<n>, root views at their slots) in the same
spaces, so the ranges overlapped and D3D12 refused the root signature:
165 times in a run with the title on an RX 470 (#961). Sharing one
parameter between the two stages would not do: each stage's user data
is its own.

The compute form now moves its user data and immediate samplers to space
8 and its root views to space 9 (MESH_COMPUTE_SPACES), and victory-gpu
builds the mesh stage's parameters there when it takes the fallback.
HostShader::space_shift says which shaders are moved (a mesh program
lowered as compute), read from the DXIL, so cached fallbacks need no new
format; the shader crate's own root signatures follow it.

Test: a mesh program reading user data, lowered as compute, next to a
pixel shader with its own b0. In the usual spaces D3D12 refuses the
root signature; in the moved ones it accepts it and the compute pipeline
builds against it (and fails to, with the move left out of the
emission).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every list that made one fallback draw kept a 64 MiB chunk per pool from
then on, and each indirect mesh draw reserved its worst case (32 MiB) in
a region of its own. On an 8 GB RX 470 with the title, dozens of lists
ran the card out of memory (E_OUTOFMEMORY on 64 MiB buffers, #961).

A list's first chunk is now 1 MiB and each further one doubles, up to
64 MiB. Past 64 MiB a pool reuses its chunks from the start instead of
making more. That is safe because each fallback draw ends with its chunks
moved from read back to UNORDERED_ACCESS, which waits for the draw's
reads before any later write. Per list, a pool now holds at most its
budget plus one region, where it held one chunk per 64 MiB used before.

Tests: a list with one small draw keeps 1 MiB; chunks double and stay
under the cap; forty 32 MiB regions stay within the budget and come
round to the first offset, with no new chunk past it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two image tests panicked where no device (hardware or WARP) has mesh
shaders to draw the reference, after the fallback's own images had
passed their coverage checks. They now say so and stop there, as the
other GPU tests skip what the host lacks. Reported on #961 from a GTX
1070 Ti, whose WARP has no mesh shaders.

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

@⁠EduBertozzi on GitHub · 2026-11-24 14:33 UTC · original

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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 14:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134564061) 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).
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 14:44 UTC · original

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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 14:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134866852) 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.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 14:47 UTC · original

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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 14:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7134957093) 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).
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 15:13 UTC · original

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).

**@⁠Zipettte** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7135656385) 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)._
Author
Owner

@⁠zlwbbb-del on GitHub · 2026-11-24 16:55 UTC · original

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

**@⁠zlwbbb-del** on GitHub · 2026-11-24 16:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7138407767) 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)
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 17:23 UTC · original

@⁠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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139132025) @⁠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).
Author
Owner

@⁠L1DRE on GitHub · 2026-11-24 17:41 UTC · original

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.

**@⁠L1DRE** on GitHub · 2026-11-24 17:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139557265) 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.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 17:42 UTC · original

@⁠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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 17:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7139591994) @⁠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://git.gtahub.st/github/Marvisak--VIctory/pulls/961). 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).
Author
Owner

@⁠L1DRE on GitHub · 2026-11-24 18:00 UTC · original

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.

**@⁠L1DRE** on GitHub · 2026-11-24 18:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7140018955) 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.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 18:16 UTC · original

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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 18:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7140398446) 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).
Author
Owner

@⁠zlwbbb-del on GitHub · 2026-11-24 19:09 UTC · original

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

**@⁠zlwbbb-del** on GitHub · 2026-11-24 19:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7141682786) 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)
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 19:10 UTC · original

@⁠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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7141708161) @⁠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).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 20:06 UTC · original

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.
**@⁠fuzeofficlal** on GitHub · 2026-11-24 20:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7143061541) 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.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 20:07 UTC · original

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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 20:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7143081959) 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).
Author
Owner

@⁠elderdragon0 on GitHub · 2026-11-24 21:06 UTC · original

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.

**@⁠elderdragon0** on GitHub · 2026-11-24 21:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7144485064) 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.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 21:06 UTC · original

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).

**@⁠EduBertozzi** on GitHub · 2026-11-24 21:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7144492927) 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).
Author
Owner

@⁠elderdragon0 on GitHub · 2026-11-24 21:36 UTC · original

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** on GitHub · 2026-11-24 21:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7145149208) 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.
Author
Owner

@⁠elderdragon0 on GitHub · 2026-11-24 22:05 UTC · original

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.

**@⁠elderdragon0** on GitHub · 2026-11-24 22:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7145792743) 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.
Author
Owner

@⁠michi-feny on GitHub · 2026-11-24 23:11 UTC · original

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.

**@⁠michi-feny** on GitHub · 2026-11-24 23:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7147117935) 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.
Author
Owner

@⁠Witredd on GitHub · 2026-11-24 23:37 UTC · original

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.

**@⁠Witredd** on GitHub · 2026-11-24 23:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7147610507) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:30 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7148576378) <!-- 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)_
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-25 04:45 UTC · original

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.

**@⁠ElSeba0811** on GitHub · 2026-11-25 04:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7153132463) 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.
Author
Owner

@⁠zlwbbb-del on GitHub · 2026-11-25 05:13 UTC · original

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).

**@⁠zlwbbb-del** on GitHub · 2026-11-25 05:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7153563392) 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).
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-25 07:50 UTC · original

@⁠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.

**@⁠ElSeba0811** on GitHub · 2026-11-25 07:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7156310712) @⁠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.
Author
Owner

@⁠zlwbbb-del on GitHub · 2026-11-25 09:45 UTC · original

@⁠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.

**@⁠zlwbbb-del** on GitHub · 2026-11-25 09:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7158752925) @⁠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.*
Author
Owner

@⁠AtsonMelo on GitHub · 2026-11-26 01:14 UTC · original

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.

**@⁠AtsonMelo** on GitHub · 2026-11-26 01:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7179574307) ### 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.
Author
Owner

@⁠ElSeba0811 on GitHub · 2026-11-26 02:05 UTC · original

@⁠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.

**@⁠ElSeba0811** on GitHub · 2026-11-26 02:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7180456846) @⁠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://git.gtahub.st/github/Marvisak--VIctory/pulls/2203) 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.
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-24 14:32 UTC · original · approved these changes

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).

**@⁠DenRakEiw** on GitHub · 2026-11-24 14:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#pullrequestreview-6041142918) · **approved these changes** 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).
Author
Owner

@⁠AtsonMelo on GitHub · 2026-11-26 11:40 UTC · original

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.

**@⁠AtsonMelo** on GitHub · 2026-11-26 11:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191026358) ### 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.
Author
Owner

@⁠AtsonMelo on GitHub · 2026-11-26 11:53 UTC · original

@⁠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** on GitHub · 2026-11-26 11:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191307471) @⁠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.
Author
Owner

@⁠AtsonMelo on GitHub · 2026-11-26 12:17 UTC · original

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

**@⁠AtsonMelo** on GitHub · 2026-11-26 12:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/961#issuecomment-7191814925) Eu gostaria de saber onde posso baixar o executável disponibilizado recentemente pelo Cyberleek
This pull request has changes conflicting with the target branch.
  • 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/lower.rs
  • crates/victory-shader/src/emit/mod.rs
  • crates/victory-shader/src/emit/shader.rs
  • crates/victory-shader/src/emit/valu_tests.rs
  • crates/victory-shader/src/emit/waterfall_tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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

No due date set.

Dependencies

No dependencies set

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