Repository navigation
Conversation
Checked: xcl-dev#3327, xcl-dev#3011 C4 and xcl-dev#2092. Budget primitive indices too. Keep legal indirect dimensions, reject over-limit arguments with the existing feedback, and distinguish native meshes in the GPU timestamps and watch ring. Assisted-by: Codex (GPT-6.2-Sol)
|
Retail title on RTX 4090: no mesh program passes the native preflight at Applying Tested
Not tested: the full workspace suite, a world scene, GPU timings, and any native draw on this title, since none was eligible. AI use: Claude Code (Claude Opus 5.5) built both executables, ran the tests and replays, and wrote this report. The person running these tests asked for it. |
|
@minimalhipster990 thank you, this is exactly the number we did not have (our own Not tested listed "the number of eligible programs in the title"). So as it stands this PR draws no mesh program of the retail title natively: the preflight takes one wave32 with one vertex and primitive per lane, and the title's programs are wave64 groups of 128 threads with 128 vertices and 128 primitives. Those still fit D3D12's mesh limits (128 threads, 256 vertices / primitives), so the next slice is a native group of 128 threads that runs each console wave64 as two hardware waves, the way the two-pass path already splits them, plus the 32 KiB output check at 128/128 (your 154 of 171 that fit). I'm moving this back to draft and will say in the description what it covers today (the entry and draw path, tested on our fixtures) and what it does not (any retail program). The 17 that do not fit the output budget stay on two passes either way. AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 3.8 Flash. |
|
Ran the native mesh shader tests at System
Results
What this adds Not tested AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used. |
|
Review (head 427330b, diff read, not a merge-check; draft, conflicts with main (one trivial hunk in
Fine: with AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
No open or merged PR emits console mesh programs as native D3D12 mesh shaders. #3350 (same author) and #2092 change the two-pass path instead. The path is opt-in ( AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Keep v5 ranges disjoint across every launched wave, including programs whose output extents exceed declared threads. Add CPU tests for the output-extent and wave-rounding cases. Checked: xcl-dev#3350 review 7306364917, xcl-dev#3327 interaction, REPO-TRACKER.md and search-two-pass-lanes.md.
Checked: xcl-dev#3011 C4, xcl-dev#3040, xcl-dev#3042, xcl-dev#1936, xcl-dev#1937 and xcl-dev#3243. This entry refuses wave64, including split lowering. Add GPU pixel parity and two-pass fallback coverage. Assisted-by: Codex (GPT-6.2-Sol)
Checked: xcl-dev#3011 C4, xcl-dev#3040, xcl-dev#3042, xcl-dev#2092, xcl-dev#1936 and xcl-dev#1937. Keep the existing two-pass PSO as fallback. Retain GPU bounds checks for indirect launches and forward the title count. Assisted-by: Codex (GPT-6.2-Sol)
Checked: xcl-dev#3327, xcl-dev#3011 C4 and xcl-dev#2092. Budget primitive indices too. Keep legal indirect dimensions, reject over-limit arguments with the existing feedback, and distinguish native meshes in the GPU timestamps and watch ring. Assisted-by: Codex (GPT-6.2-Sol)
427330b to
1e65e6a
Compare
Launch enough whole console waves to cover max(threads, max_vertices, max_primitives), keep EXEC at entry limited to the declared threads, and use the launched width as v5's per-group step in both backends. Compute programs are unchanged. Update mesh shader surveys and barrier fixtures to use the launched width. Add CPU coverage for output extents and wave rounding, plus a two-group GPU draw that checks the v5 step and matching records and pixels from HLSL and direct DXIL. Checked: xcl-dev#3350 review 7325409956, xcl-dev#3011 C54, and xcl-dev#3327 interaction.
Launch enough whole console waves to cover max(threads, max_vertices, max_primitives), keep EXEC at entry limited to the declared threads, and use the launched width as v5's per-group step in both backends. Compute programs are unchanged. Update mesh shader surveys and barrier fixtures to use the launched width. Add CPU coverage for output extents and wave rounding, plus a two-group GPU draw that checks the v5 step and matching records and pixels from HLSL and direct DXIL. Checked: xcl-dev#3350 review 7325409956, xcl-dev#3011 C54, and xcl-dev#3327 interaction.
Part of C4 in #3011. In our RTX 5090 measurements, two-pass mesh work took about 40–48% of GPU frame time. This adds an experimental native mesh path that avoids the separate NGG compute pass, record buffer and inter-pass barrier for eligible draws. Enable it with
XCL_NATIVE_MESH=1. The default is off.Rebased onto
main6bfb5c51; the head is now1e65e6a2(was427330b5). One conflict, inreal.rs(translated_mesh_stream_once):mainnow takes the render-target formats fromstream_rt_formatsearlier in that function and dropped the inline block that read them; this PR's only line there,let state_start = out.0.len();, is kept and the old block is not brought back. The other two commits rebased without changes.A native wave64 translator from Kalmarv will follow as a PR stacked on this one.
What is in it
511d4d01(wasc943d157) adds the native entry ingpu/recomp/native_mesh.rsandemit.rs. It reuses XCL's instruction lowering for a single 32-lane hardware wave with lane-owned triangle vertices and primitives, supported exports and bounded output.gpu/recomp/pso.rscompiles the candidate. The GPU fixture ingpu/recomp/tests.rscompares native and two-pass pixels.39a39796(wasbf7f7e82) adds the optional native PSO inhle/d3d12x/real.rs. D3D12 must accept the mesh and pixel signatures together. Unsupported programs and rejected native PSOs fall back to the existing two-pass PSO.hle/d3d12x/bind.rsrecords one nativeDispatchMeshfor an eligible direct draw. Eligible plain meshExecuteIndirectkeeps the existing GPU bounds pass and forwards the title's original count buffer to the native call. This slice changes the HLSL translator source identity, so affected HLSL cache entries rebuild once.Tested
At the rebased head
1e65e6a2, RTX 5090 32 GB, driver 621.40, Ryzen 7 9800X3D, Windows 11 Pro build 26200.9974, Rust 1.99.1, debug:cargo build --workspacepassed;cargo test -p xcl --lib -- native_mesh --nocapture --test-threads=4: 3 passed, 0 failed, 0 skipped (gpu_native_mesh_matches_two_pass,gpu_native_mesh_indirect_preserves_legal_dimensions,native_mesh_output_budget_includes_alignment_and_row_limit);-- mesh: 60 passed, 0 failed.At
1e65e6a2on the RTX 3090 VM (NVIDIA 621.24, Intel Core i7-10700T, Windows 11 build 26300.9974, Rust 1.99.1, debug), againstmain6bfb5c51on the same machine:cargo test --workspace --no-fail-fast -- --test-threads=4: 2894 passed, 5 failed, 51 ignored (main: 2891 passed, 5 failed, 51 ignored; the 3 more are this PR'snative_meshtests). The same 5 failures on both,main's own:title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels, the 3stream_recheck_*tests, e2etest_title_runs_and_game_folder_is_untouched. SKIPPED: 11 on both (7 no wave64, 3 no debug layer, 1 no heap windows). On both commits the lib binary died with an access violation in the 4-thread run, and its counts are from the runner's 1-thread rerun of it; the run leaves out the 3uma_drivercoherent-window remake tests, as above.Before the rebase:
RTX 3090 VM, NVIDIA 621.24, Intel Core i7-10700T, Windows 11 build 26300.9974, Rust 1.99.1, DXC 1.9.2602.17. Tested at
bf7f7e8296760f08b7387ab406f1b60814e1db2a, then the follow-up below at427330b54638ce7eb7ee14e3b577087a4af4d6e9.cargo build --workspacepassed in debug.cargo test -p xcl --lib --no-runandcargo test -p xcl --lib --release --no-runpassed.cargo test -p xcl --lib -- native_mesh --nocapture --test-threads=1passed 2/2, with 0 skipped. The eligible triangle produced identical pixels on the native and two-pass paths. The ineligible fixture was rejected by the native entry and drew the same pixels through two passes.cargo test --workspace --no-fail-fast -- --test-threads=4at427330b5: 2603 passed, 5 failed, 49 ignored. SKIPPED: 30 (21 no wave64, 3 refused f16/f32 per-lane forms, 3 no debug layer, 2 no heap windows, 1 driver cache cannot be disabled). The run leaves out the 3uma_drivercoherent-window remake tests that kill the lib binary on 621.x. The 5 failures are main's own (they fail on mainfa204595on this machine):title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels, the 3stream_recheck_*tests, e2etest_title_runs_and_game_folder_is_untouched.Regression run
These blocks are from
427330b5, before the rebase; a pair on1e65e6a2follows when the RTX 5090 is free.RTX 5090 32 GB, driver 621.24, Ryzen 7 9800X3D, the retail title, 200 s each,
scripts/smoke.ps1with preparation on (-Prep), normal priority and default worker counts,XCL_NATIVE_MESHunset (the native path off, as by default) in both runs. Both runs started from a copy of the same cache (made by an earlier run ofmainfa204595) and used this machine's usual settings (XCL_UMA_WINDOWS=16,XCL_UMA_DRIVER=mixed:1536:1792,XCL_COHERENT_MB=4095,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=1,XCL_HUGE_PSO_CONCURRENCY=3). So this pair shows the default path unchanged, not the native path.main
fa204595:this head
427330b5:1e65e6a2(was427330b5), the follow-up after review (triangle-index budget in the output check, legal multidimensional counts above 65,535 groups kept, rejected arguments reported through the existing feedback, native draws in the timing and watch logs): RTX 3090 VM, debug workspace build,cargo test -p xcl --lib --no-rundebug and release,-- native_mesh: 3 passed, 0 failed, 0 skipped.Not tested
No mesh program of the retail title is eligible yet: on an RTX 4090 all 171 that reached the preflight are wave64 groups of 128 threads with 128 vertices and 128 primitives (#3327 (comment)), and this slice takes one wave32 with one vertex and primitive per lane. So in the title it changes nothing even when switched on; the next slice (128-thread native groups) is needed for that. Also not tested: runtime indirect count handling, AMD, Intel, wave64/C2 interplay.
AI use
Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR