Recompiler: run a s_sendmsg GS_DONE's emit/cut op like MSG_GS #2509
No reviewers
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!2509
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2509"
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?
@kotekompotek on GitHub · 2026-11-25 21:09 UTC · original
kotekompotek:fix/gs-done-emit-cut→main· +159 −12 · 3 files · 1 commits · openFixes #2412.
s_sendmsg MSG_GS_DONE(msg 3) carries the same GS op field asMSG_GS(msg 2) — SIMM16[5:4]: 1 cut, 2 emit, 3 emit+cut, stream at [9:8] — and also marks the shader done. Both translators ran the op only forMSG_GSand silently dropped it onGS_DONE, so a geometry program that folds its final emit/cut intoGS_DONEloses those records.What is in it
gpu/dxil/lower_geom.rs(direct DXIL lowering) andgpu/recomp/emit.rs(HLSL backend, which even said "GS_DONE (3) – nothing to do") now run aGS_DONE's emit/cut op likeMSG_GS's — stream 0, op != NOP.geometry_tests.rs: adone_programwhose only emit/cut ridesMSG_GS_DONE;geometry_forms_validate/geometry_done_emit_cut_lowerssee the op reach the DXIL and the emitted HLSL;gpu_geometry_done_emit_cut_recordscompares the produced records against theMSG_GSform's model (skips without a GPU).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4: 1352 passed, 7 failed, 46 ignored (SKIPPED GPU tests: 343 — this adapter has no SM 6.6 / mesh shaders)gpu_raw_window_view_reaches_its_top,a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier,execute_indirect_reads_the_arguments_written_before_it,origin_events_issue_tokens_and_flips_have_statistics,statistics_name_each_frames_origin_and_rescheduled_handles_outlive_the_clock_tick,gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark,stale_blob_cannot_bypass_the_offline_pipeline_cap— not caused by this changegeometry_done_emit_cut_lowersand the newgeometry_forms_validatecase fail when the fix is reverted (checked by restoring the old condition in each translator)Regression run
main:
PR:
Not tested
-Seconds1–8 the log showsunhandled exception 0x80000003thenprocess ends with status 0x80000003). The blocks above end it throughXCL_RUN_SECONDS=0before that point — they cover host boot, game loading and shutdown, no frames, no shaders.gpu_geometry_done_emit_cut_records; the emit/cut correctness is verified only at the DXIL/HLSL text level.GS_DONEhandling on a real RDNA2 console program (the test here is a hand-encoded stream-0 program).AI use
@SlopTart on GitHub · 2026-11-25 21:21 UTC · original
gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.No new test functions in the diff; the suite exercises the GS_DONE production change end to end through the existing geometry tests, all clean here.
@DavidM1911 on GitHub · 2026-11-25 21:23 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
@emirduran707 on GitHub · 2026-11-25 21:42 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
4bc111d1f3924437b8bf6353c8e1195960b43f68(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1356 passed, 3 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.gpu::dxil::geometry_tests::geometry_done_emit_cut_lowersandgpu_geometry_done_emit_cut_records.main:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) andfuzz_validate_and_gpu_3(seed 1599) on this GPU, plusgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(from50a9fde/ #2074, fixed later onmainin #2420).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@Oliwettoo on GitHub · 2026-11-25 22:20 UTC · original
Heads-up: #2485, #2494 and #2509 make the same change (
MSG_GS_DONEruns its emit/cut op likeMSG_GS, #2412). Read from the diffs (c256c7e,3da50b0,4bc111d), not run:emit.rs) and Direct DXIL (lower_geom.rs). #2485 changes only Direct DXIL, so with it the HLSL path still dropsGS_DONE's emit/cut.op != 0/1..=3guards in #2494 and #2485 change nothing.gs_emit_cutand the HLSL arm only act onop & 1/op & 2, so op 0 is already a no-op in #2509 too.@ahmetbagci8 on GitHub · 2026-11-25 22:22 UTC · original
Tested
4bc111d1f3924437b8bf6353c8e1195960b43f6832.0.16.1714), Windows 11 Pro (Build 26300), DXCv1.9.2609cargo test -j 2 -p xcl --lib geometry -- --test-threads=4:12 passed; 0 failed; 0 ignored (2.96s)Not tested
scripts/smoke.ps1(no unpacked title locally).AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.