Repository navigation
Recompiler: run a s_sendmsg GS_DONE's emit/cut op like MSG_GS - #2509
kotekompotek wants to merge 1 commit into
Conversation
…v#2412) MSG_GS_DONE (msg 3) carries the same GS_OP field as MSG_GS (msg 2): the final emit, cut or emit+cut of a GS is routinely folded into it. Both translators only ran the op for msg 2, so a GS_DONE carrying an op lost its last vertex and the strip triangle it closes. Assisted-by: Devin (SWE-2 High)
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
Tested
Not tested
AI use
|
Fixes #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