GPUs without mesh shaders (RDNA1, GTX 10): draw the two-pass geometry with a pass-through VS – plan #529
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#529
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@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.
preflightsays 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::TwoPassalready 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
MeshShaderTierNOT_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 takesSV_InstanceIDas the record andSV_VertexID / 3,% 3as 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.mesh_groups_per_record > 1) need no splitting here.Split into PRs (each with its tests, small):
emit: a pass-through VS generator next tomesh_passthrough_for, from the sameMsInterface, with a CPU-side test of its signature against the PS inputs. Not called yet.pso/runner: build and run aTwoPasswith the VS path. GPU test: the existinggpu_mesh_mode_two_passes/gpu_geometry_mode_es_gs_stripfixtures 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.d3d12x/real.rs: take the VS path when the device has no mesh shaders, and update thepreflightwarning 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
ExecuteIndirectcount 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.rsandpreflight.rs.@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.
@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
mainnothing executes two-pass pipelines yet (#724 addsDispatchMesh/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.rsand #724.@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
@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_forplus 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
2624f00c4e2d8b87aa1828233fb2f60899eb9533on the RX 5700 XT:cargo test --workspace --no-fail-fast -- --test-threads=4: 700 passed, 1 failed, 41 ignored.gpu_geometry_mode_es_gs_stripandgpu_mesh_mode_two_passeswere skipped withno mesh shaders.gpu_nonfused_mad_and_mac_prevent_fma_contraction; it also fails on the merge basef4ce27ceb6d1b0576d0c659b713b674778bf1968when 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.
@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 hitE_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@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 bySV_VertexID / SV_InstanceID,
DrawInstanced(3 * max_primitives, records); bad/unusedtriangles collapse to a point. No split form needed (no 32 KB limit).
mesh_passthrough_forvia a helper (MS output byte-identical).pso::vertex_passthrough,runner::vertex_draw(mesh_draw_split refactored onto a sharedtwo_pass_draw).vs_passthrough_shape(CPU) andgpu_mesh_mode_vertex_fallback(GPU; same programas
gpu_mesh_mode_two_passes, compares pixels to the MS path when the GPU has mesh shaders).Tested
cargo test -p xcl --lib vs_passthrough_shape: 1 passedcargo test -p xcl --lib gpu_mesh_mode_vertex_fallback: 1 passed, no SKIPPEDcargo test --workspace -- --test-threads=4: did not complete. The lib test binary crashes ingpu_wave64_ps_whole_wave_reductions(STATUS_ACCESS_VIOLATION). The same test also crasheswith the patch reverted, so it's pre-existing on Polaris.
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 havenot re-run them without the patch.
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 changedunderneath it), so here's a rebased version, attached.
mesh_passthrough_for(thepassthrough_max_vertices/ compact-group logic is untouched,and the generated MS source is identical to main's in the cases I checked).
main(zip downloaded Nov 25, 2026), RX 580 8 GB:cargo test -p xcl --lib vs_passthrough_shape: 1 passedcargo test -p xcl --lib gpu_mesh_mode_vertex_fallback: 1 passed, no SKIPPEDThe full-suite results and the
gpu_wave64_ps_whole_wave_reductionscrash in my earliercomment were on the older zip; I haven't re-run the full suite on this one.
mesh-fallback-v2.patch
@adriadam10 on GitHub · 2026-11-25 11:08 UTC · original
Test report for @yesntOG's
mesh-fallback-v2.patch(sha2566af173dbda78…) on Pascal, an NVIDIA GPU without mesh shaders, which is not covered yet.Tested
main5478c4a.git applyfails there ontests.rs(both the patch and the newermesh_passthrough_strips_rdna2_edge_flag_bitsadd a test at the same place); applied with-3and 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_fallbackruns 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_shapepasses.Not tested
AI use