GPUs without mesh shaders (RDNA1, GTX 10): draw the two-pass geometry with a pass-through VS – plan #529

Open
opened 2026-11-26 04:24:40 +00:00 by github-bot · 7 comments
Owner

@⁠Abdellah-Khanani on GitHub · 2026-11-24 01:25 UTC · original

On a GPU without D3D12 mesh shaders (AMD RDNA1 like the RX 5700 XT / 5500 XT, NVIDIA GTX 10 and older), XCL does not draw the console's geometry and NGG programs. preflight says so (no mesh shaders: the game's geometry and NGG programs are not drawn). On my RX 5700 XT the two mesh tests are SKIPPED (gpu_geometry_mode_es_gs_strip, gpu_mesh_mode_two_passes: no mesh shaders). A user with an RX 5500 XT asked about it on #486. I found no issue or PR for it, so here is a plan before any code, as CONTRIBUTING asks for something this size.

What makes it tractable: pso::TwoPass already splits a console geometry stage in two. The console program runs as a compute shader that writes one record per thread group (vertices and primitives, MsInterface) into a buffer. Only the second pass, the pass-through mesh shader that rasterises the records, needs mesh shaders. So only that pass needs a replacement on these GPUs.

Proposal: on a device with MeshShaderTier NOT_SUPPORTED, replace the pass-through mesh shader with a pass-through vertex shader with vertex pulling, and keep the compute pass as it is:

  • DrawInstanced(max_prims * 3, records). The VS takes SV_InstanceID as the record and SV_VertexID / 3, % 3 as the primitive and corner. It reads that primitive's vertex index from the record and outputs that vertex's attributes, the same outputs the pass-through MS emits for the pixel shader.
  • A primitive past the record's primitive count, or a culled one, becomes a degenerate triangle (all three corners at the same clip position), so no indirect count is needed in the first version. Records over D3D12's mesh output limit (mesh_groups_per_record > 1) need no splitting here.
  • Same root signature and same PS. The compute pass, the record layout and the mesh path on capable GPUs stay unchanged.

Split into PRs (each with its tests, small):

  1. emit: a pass-through VS generator next to mesh_passthrough_for, from the same MsInterface, with a CPU-side test of its signature against the PS inputs. Not called yet.
  2. pso/runner: build and run a TwoPass with the VS path. GPU test: the existing gpu_mesh_mode_two_passes / gpu_geometry_mode_es_gs_strip fixtures render the same pixels through the VS path as through the MS path, on a mesh-capable GPU, with the VS path forced by an env var. On a GPU without mesh shaders they then run instead of being SKIPPED.
  3. d3d12x/real.rs: take the VS path when the device has no mesh shaders, and update the preflight warning and the README.

Cost: each primitive slot costs three VS invocations even when unused. For a first version that only has to draw at all on these GPUs, that seems fine. An ExecuteIndirect count can come later.

What I can test: an RX 5700 XT (RDNA1, no mesh shaders, native wave64): the whole suite and the GPU fixtures. I have no retail title for smoke.ps1.

Does this fit where you want XCL to go? If it does, I'll start with PR 1. If you'd rather not support these GPUs, I'll leave it.

Written with Claude Code (Claude Opus 5.5) after reading pso.rs, runner.rs, emit.rs and preflight.rs.

**@⁠Abdellah-Khanani** on GitHub · 2026-11-24 01:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/529) On a GPU without D3D12 mesh shaders (AMD RDNA1 like the RX 5700 XT / 5500 XT, NVIDIA GTX 10 and older), XCL does not draw the console's geometry and NGG programs. `preflight` says so (`no mesh shaders: the game's geometry and NGG programs are not drawn`). On my RX 5700 XT the two mesh tests are SKIPPED (`gpu_geometry_mode_es_gs_strip`, `gpu_mesh_mode_two_passes`: no mesh shaders). A user with an RX 5500 XT asked about it on #486. I found no issue or PR for it, so here is a plan before any code, as CONTRIBUTING asks for something this size. **What makes it tractable:** `pso::TwoPass` already splits a console geometry stage in two. The console program runs as a **compute** shader that writes one record per thread group (vertices and primitives, `MsInterface`) into a buffer. Only the second pass, the pass-through mesh shader that rasterises the records, needs mesh shaders. So only that pass needs a replacement on these GPUs. **Proposal:** on a device with `MeshShaderTier` NOT_SUPPORTED, replace the pass-through mesh shader with a **pass-through vertex shader** with vertex pulling, and keep the compute pass as it is: - `DrawInstanced(max_prims * 3, records)`. The VS takes `SV_InstanceID` as the record and `SV_VertexID / 3`, `% 3` as the primitive and corner. It reads that primitive's vertex index from the record and outputs that vertex's attributes, the same outputs the pass-through MS emits for the pixel shader. - A primitive past the record's primitive count, or a culled one, becomes a degenerate triangle (all three corners at the same clip position), so no indirect count is needed in the first version. Records over D3D12's mesh output limit (`mesh_groups_per_record > 1`) need no splitting here. - Same root signature and same PS. The compute pass, the record layout and the mesh path on capable GPUs stay unchanged. **Split into PRs** (each with its tests, small): 1. `emit`: a pass-through VS generator next to `mesh_passthrough_for`, from the same `MsInterface`, with a CPU-side test of its signature against the PS inputs. Not called yet. 2. `pso`/`runner`: build and run a `TwoPass` with the VS path. GPU test: the existing `gpu_mesh_mode_two_passes` / `gpu_geometry_mode_es_gs_strip` fixtures render the same pixels through the VS path as through the MS path, on a mesh-capable GPU, with the VS path forced by an env var. On a GPU without mesh shaders they then run instead of being SKIPPED. 3. `d3d12x/real.rs`: take the VS path when the device has no mesh shaders, and update the `preflight` warning and the README. **Cost:** each primitive slot costs three VS invocations even when unused. For a first version that only has to draw at all on these GPUs, that seems fine. An `ExecuteIndirect` count can come later. **What I can test:** an RX 5700 XT (RDNA1, no mesh shaders, native wave64): the whole suite and the GPU fixtures. I have no retail title for `smoke.ps1`. Does this fit where you want XCL to go? If it does, I'll start with PR 1. If you'd rather not support these GPUs, I'll leave it. Written with Claude Code (Claude Opus 5.5) after reading `pso.rs`, `runner.rs`, `emit.rs` and `preflight.rs`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:40 +00:00
Author
Owner

@⁠Win-DVD on GitHub · 2026-11-24 02:00 UTC · original

Commenting here to say supporting older mesh shader-less GPUs would be very helpful in the current expensive GPU market. Lots of people still on older RNDA1 or even Polaris AMD GPUs. Not to mention Maxwell and Pascal still pretty popular due to the cheap price.

If it can be implemented in a good way it would be awesome if it could be supported.

**@⁠Win-DVD** on GitHub · 2026-11-24 02:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7119669737) Commenting here to say supporting older mesh shader-less GPUs would be very helpful in the current expensive GPU market. Lots of people still on older RNDA1 or even Polaris AMD GPUs. Not to mention Maxwell and Pascal still pretty popular due to the cheap price. If it can be implemented in a good way it would be awesome if it could be supported.
Author
Owner

@⁠NathanTheophile on GitHub · 2026-11-24 07:16 UTC · original

I'd like to help with this, in coordination with you: my RTX 4060 has mesh shaders, so I can draw the same records through the pass-through MS and through your VS and compare them bit for bit (the existing two fixtures, plus culling, strip winding, flat/provoking vertex and clip-distance cases), which your RX 5700 XT cannot. Note that on main nothing executes two-pass pipelines yet (#724 adds DispatchMesh / ExecuteIndirect), so the runtime switch would stack on it.

Proposed split: (1) runner generalisation + shared vertex-fill helper, no behaviour change; (2) vertex_passthrough_for + the differential GPU tests; (3) device detection and execution on top of #724; (4) preflight/README. Happy to take 1–2 and leave 3 to you, or any split you prefer, so we don't both write it.

Written with Claude Code (Claude Opus 5.5) after reading pso.rs, emit.rs, runner.rs, real.rs and #724.

**@⁠NathanTheophile** on GitHub · 2026-11-24 07:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7124816765) I'd like to help with this, in coordination with you: my RTX 4060 has mesh shaders, so I can draw the same records through the pass-through MS and through your VS and compare them bit for bit (the existing two fixtures, plus culling, strip winding, flat/provoking vertex and clip-distance cases), which your RX 5700 XT cannot. Note that on `main` nothing executes two-pass pipelines yet (#724 adds `DispatchMesh` / `ExecuteIndirect`), so the runtime switch would stack on it. Proposed split: (1) runner generalisation + shared vertex-fill helper, no behaviour change; (2) `vertex_passthrough_for` + the differential GPU tests; (3) device detection and execution on top of #724; (4) preflight/README. Happy to take 1–2 and leave 3 to you, or any split you prefer, so we don't both write it. Written with Claude Code (Claude Opus 5.5) after reading `pso.rs`, `emit.rs`, `runner.rs`, `real.rs` and #724.
Author
Owner

@⁠ThatzOkay on GitHub · 2026-11-24 08:32 UTC · original

Would love to see support for GPU's without mesh shaders. I could possibly test some stuff since i have a older GTX 1080 myself

**@⁠ThatzOkay** on GitHub · 2026-11-24 08:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7126268892) Would love to see support for GPU's without mesh shaders. I could possibly test some stuff since i have a older GTX 1080 myself
Author
Owner

@⁠Abdellah-Khanani on GitHub · 2026-11-24 14:24 UTC · original

Thanks, Nathan — this split works for me. Please take steps 1–2 (runner generalisation/shared vertex-fill helper, then vertex_passthrough_for plus parity tests). I can take steps 3–4 (device detection/runtime fallback, preflight and README), validated on my RX 5700 XT (RDNA1, wave64), once #724 is a stable base.

I tested #724 head 2624f00c4e2d8b87aa1828233fb2f60899eb9533 on the RX 5700 XT:

  • cargo test --workspace --no-fail-fast -- --test-threads=4: 700 passed, 1 failed, 41 ignored.
  • gpu_geometry_mode_es_gs_strip and gpu_mesh_mode_two_passes were skipped with no mesh shaders.
  • The only failure was gpu_nonfused_mad_and_mac_prevent_fma_contraction; it also fails on the merge base f4ce27ceb6d1b0576d0c659b713b674778bf1968 when run alone.

This gives us an RDNA1 baseline for #529. Maintainers, does this split fit? I’ll wait for confirmation before starting the #529 runtime code.

AI use: Codex (GPT-6) ran these tests and drafted this comment.

**@⁠Abdellah-Khanani** on GitHub · 2026-11-24 14:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7134324146) Thanks, Nathan — this split works for me. Please take steps 1–2 (runner generalisation/shared vertex-fill helper, then `vertex_passthrough_for` plus parity tests). I can take steps 3–4 (device detection/runtime fallback, preflight and README), validated on my RX 5700 XT (RDNA1, wave64), once #724 is a stable base. I tested #724 head `2624f00c4e2d8b87aa1828233fb2f60899eb9533` on the RX 5700 XT: - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 700 passed, 1 failed, 41 ignored. - `gpu_geometry_mode_es_gs_strip` and `gpu_mesh_mode_two_passes` were skipped with `no mesh shaders`. - The only failure was `gpu_nonfused_mad_and_mac_prevent_fma_contraction`; it also fails on the merge base `f4ce27ceb6d1b0576d0c659b713b674778bf1968` when run alone. This gives us an RDNA1 baseline for #529. Maintainers, does this split fit? I’ll wait for confirmation before starting the #529 runtime code. AI use: Codex (GPT-6) ran these tests and drafted this comment.
Author
Owner

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

Hi everyone.
I have an AMD Radeon RX 5600 XT (RDNA1, 6 GB VRAM, native wave64, no hardware mesh shaders) with a Ryzen 5 5500 and 16 GB RAM on Windows 11, and I can help test PRs for #529 (including on a retail title) as soon as implementation starts.

For reference, I also tested VIctory's pr/mesh-compute-fallback (compute pass + pass-through VS) on this same RX 5600 XT: the compute+VS fallback path itself works on RDNA1 without driver hangs, though that run hit E_OUTOFMEMORY (0x8007000E) during world loading on 6 GB VRAM / 16 GB RAM. Since XCL already has much stronger VRAM/commit management, this plan looks very promising here — I'll stay available for any updates/testing, and I'm continuing local tests and exploring alternatives

**@⁠Ueslii** on GitHub · 2026-11-24 21:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7145144087) Hi everyone. I have an **AMD Radeon RX 5600 XT** (RDNA1, 6 GB VRAM, native wave64, no hardware mesh shaders) with a Ryzen 5 5500 and 16 GB RAM on Windows 11, and I can help test PRs for `#529` (including on a retail title) as soon as implementation starts. For reference, I also tested VIctory's `pr/mesh-compute-fallback` (compute pass + pass-through VS) on this same RX 5600 XT: the compute+VS fallback path itself works on RDNA1 without driver hangs, though that run hit `E_OUTOFMEMORY` (`0x8007000E`) during world loading on 6 GB VRAM / 16 GB RAM. Since XCL already has much stronger VRAM/commit management, this plan looks very promising here — I'll stay available for any updates/testing, and I'm continuing local tests and exploring alternatives
Author
Owner

@⁠yesntOG on GitHub · 2026-11-25 06:04 UTC · original · edited 2026-11-25 06:35 UTC

I built steps 1–2 of this independently before finding the issue, and it's tested on Polaris
(RX 580 8 GB), which isn't covered here yet. Offering it to @⁠NathanTheophile in case it saves time.

What's in it (patch attached, 4 files in crates/xcl/src/gpu/recomp/)

  • emit::vs_passthrough_for + vs_passthrough_vertices: no vertex buffer, records read by
    SV_VertexID / SV_InstanceID, DrawInstanced(3 * max_primitives, records); bad/unused
    triangles collapse to a point. No split form needed (no 32 KB limit).
  • Vertex loading shared with mesh_passthrough_for via a helper (MS output byte-identical).
  • pso::vertex_passthrough, runner::vertex_draw (mesh_draw_split refactored onto a shared
    two_pass_draw).
  • Tests: vs_passthrough_shape (CPU) and gpu_mesh_mode_vertex_fallback (GPU; same program
    as gpu_mesh_mode_two_passes, compares pixels to the MS path when the GPU has mesh shaders).

Tested

  • RX 580 8 GB, driver 25.8.1, Windows 11, debug
  • cargo test -p xcl --lib vs_passthrough_shape: 1 passed
  • cargo test -p xcl --lib gpu_mesh_mode_vertex_fallback: 1 passed, no SKIPPED
  • cargo test --workspace -- --test-threads=4: did not complete. The lib test binary crashes in
    gpu_wave64_ps_whole_wave_reductions (STATUS_ACCESS_VIOLATION). The same test also crashes
    with the patch reverted, so it's pre-existing on Polaris.
  • Before the crash, 21 GPU instruction tests failed on this card (f16 / f64 / ldexp / NaN compares /
    rounding modes / a few wave tests, e.g. gpu_f64_roots, gpu_ldexp_f32,
    gpu_nonfused_mad_and_mac_prevent_fma_contraction). None of them use the changed code; I have
    not re-run them without the patch.
  • SKIPPED: gpu_mesh_mode_two_passes, gpu_geometry_mode_es_gs_strip (no mesh shaders)

Not tested: full suite counts (blocked by the crash above); the VS-vs-MS pixel comparison
(needs a mesh-capable GPU); no runtime wiring (waits for #724).

mesh-fallback.patch
(outdated, see the rebased patch below)

AI use: written with Claude (Claude Opus 5.5, in the Claude app); I applied it and ran the tests.

Update: the patch above no longer applies to current main (emit.rs / tests.rs changed
underneath it), so here's a rebased version, attached.

  • Same change; the shared vertex-loading helper is redone on top of the new
    mesh_passthrough_for (the passthrough_max_vertices / compact-group logic is untouched,
    and the generated MS source is identical to main's in the cases I checked).
  • Re-tested on current main (zip downloaded Nov 25, 2026), RX 580 8 GB:
    • cargo test -p xcl --lib vs_passthrough_shape: 1 passed
    • cargo test -p xcl --lib gpu_mesh_mode_vertex_fallback: 1 passed, no SKIPPED

The full-suite results and the gpu_wave64_ps_whole_wave_reductions crash in my earlier
comment were on the older zip; I haven't re-run the full suite on this one.

mesh-fallback-v2.patch

**@⁠yesntOG** on GitHub · 2026-11-25 06:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7154417121) · edited 2026-11-25 06:35 UTC I built steps 1–2 of this independently before finding the issue, and it's tested on Polaris (RX 580 8 GB), which isn't covered here yet. Offering it to @⁠NathanTheophile in case it saves time. **What's in it** (patch attached, 4 files in `crates/xcl/src/gpu/recomp/`) - `emit::vs_passthrough_for` + `vs_passthrough_vertices`: no vertex buffer, records read by SV_VertexID / SV_InstanceID, `DrawInstanced(3 * max_primitives, records)`; bad/unused triangles collapse to a point. No split form needed (no 32 KB limit). - Vertex loading shared with `mesh_passthrough_for` via a helper (MS output byte-identical). - `pso::vertex_passthrough`, `runner::vertex_draw` (mesh_draw_split refactored onto a shared `two_pass_draw`). - Tests: `vs_passthrough_shape` (CPU) and `gpu_mesh_mode_vertex_fallback` (GPU; same program as `gpu_mesh_mode_two_passes`, compares pixels to the MS path when the GPU has mesh shaders). **Tested** - RX 580 8 GB, driver 25.8.1, Windows 11, debug - `cargo test -p xcl --lib vs_passthrough_shape`: 1 passed - `cargo test -p xcl --lib gpu_mesh_mode_vertex_fallback`: 1 passed, no SKIPPED - `cargo test --workspace -- --test-threads=4`: did not complete. The lib test binary crashes in `gpu_wave64_ps_whole_wave_reductions` (STATUS_ACCESS_VIOLATION). The same test also crashes with the patch reverted, so it's pre-existing on Polaris. - Before the crash, 21 GPU instruction tests failed on this card (f16 / f64 / ldexp / NaN compares / rounding modes / a few wave tests, e.g. `gpu_f64_roots`, `gpu_ldexp_f32`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`). None of them use the changed code; I have not re-run them without the patch. - SKIPPED: `gpu_mesh_mode_two_passes`, `gpu_geometry_mode_es_gs_strip` (no mesh shaders) **Not tested**: full suite counts (blocked by the crash above); the VS-vs-MS pixel comparison (needs a mesh-capable GPU); no runtime wiring (waits for #724). [mesh-fallback.patch](https://github.com/user-attachments/files/35395625/mesh-fallback.patch) (outdated, see the rebased patch below) **AI use**: written with Claude (Claude Opus 5.5, in the Claude app); I applied it and ran the tests. Update: the patch above no longer applies to current `main` (emit.rs / tests.rs changed underneath it), so here's a rebased version, attached. - Same change; the shared vertex-loading helper is redone on top of the new `mesh_passthrough_for` (the `passthrough_max_vertices` / compact-group logic is untouched, and the generated MS source is identical to main's in the cases I checked). - Re-tested on current `main` (zip downloaded Nov 25, 2026), RX 580 8 GB: - `cargo test -p xcl --lib vs_passthrough_shape`: 1 passed - `cargo test -p xcl --lib gpu_mesh_mode_vertex_fallback`: 1 passed, no SKIPPED The full-suite results and the `gpu_wave64_ps_whole_wave_reductions` crash in my earlier comment were on the older zip; I haven't re-run the full suite on this one. [mesh-fallback-v2.patch](https://github.com/user-attachments/files/35396984/mesh-fallback-v2.patch)
Author
Owner

@⁠adriadam10 on GitHub · 2026-11-25 11:08 UTC · original

Test report for @⁠yesntOG's mesh-fallback-v2.patch (sha256 6af173dbda78…) on Pascal, an NVIDIA GPU without mesh shaders, which is not covered yet.

Tested

  • NVIDIA GeForce GTX 1050 Ti 4 GB (Pascal, driver 32.0.15.8266, no mesh shaders), Intel Core i5-8400, 16 GB RAM, Windows 11 build 26100, Rust 1.100.0, release build
  • Patch applied on main 5478c4a. git apply fails there on tests.rs (both the patch and the newer mesh_passthrough_strips_rdna2_edge_flag_bits add a test at the same place); applied with -3 and kept both tests, no other change.
  • cargo test --release -p xcl --lib -- passthrough mesh_mode --test-threads=4: 6 passed, 0 failed, 0 ignored; 2 SKIPPED (gpu_mesh_mode_two_passes, passthrough_mesh_stream_accepts_a_triangle_driver_blob: no mesh shaders)
  • gpu_mesh_mode_vertex_fallback runs its vertex path here (it skips only the mesh comparison): both groups' triangles at the expected pixels, the empty slots draw nothing, and the 16-input pixel shader draws the same pixels. vs_passthrough_shape passes.

Not tested

  • the whole suite with the patch; a retail title (the patch is not wired into the runtime yet)

AI use

  • Claude Code (Claude Opus 5.5) applied the patch, ran the tests on the machine above and wrote this report.
**@⁠adriadam10** on GitHub · 2026-11-25 11:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/529#issuecomment-7160635868) Test report for @⁠yesntOG's `mesh-fallback-v2.patch` (sha256 `6af173dbda78…`) on **Pascal**, an NVIDIA GPU without mesh shaders, which is not covered yet. **Tested** - NVIDIA GeForce GTX 1050 Ti 4 GB (Pascal, driver 32.0.15.8266, no mesh shaders), Intel Core i5-8400, 16 GB RAM, Windows 11 build 26100, Rust 1.100.0, release build - Patch applied on `main` `5478c4a`. `git apply` fails there on `tests.rs` (both the patch and the newer `mesh_passthrough_strips_rdna2_edge_flag_bits` add a test at the same place); applied with `-3` and kept both tests, no other change. - `cargo test --release -p xcl --lib -- passthrough mesh_mode --test-threads=4`: 6 passed, 0 failed, 0 ignored; 2 SKIPPED (`gpu_mesh_mode_two_passes`, `passthrough_mesh_stream_accepts_a_triangle_driver_blob`: no mesh shaders) - `gpu_mesh_mode_vertex_fallback` runs its vertex path here (it skips only the mesh comparison): both groups' triangles at the expected pixels, the empty slots draw nothing, and the 16-input pixel shader draws the same pixels. `vs_passthrough_shape` passes. **Not tested** - the whole suite with the patch; a retail title (the patch is not wired into the runtime yet) **AI use** - Claude Code (Claude Opus 5.5) applied the patch, ran the tests on the machine above and wrote this report.
This discussion has been locked. Commenting is limited to contributors.
No description provided.