Recompiler: geometry mode's ES s_setpc_b64 ends a block before gs_start (#1360) #1365
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1375"
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?
Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T15:22:16Z.
In geometry mode the ES hands over to the GS with an
s_setpc_b64that has no resolved target.term()took it for a fall-through, andedgeshad no ES → GS edge. So with branches in the ES or GS,structured_spanmerged the ES's last block and the first GS blocks into one stretch, dropped thes_setpcflow, and gavegs_startnopcblock. In split wave64 the ES phase ran on into the GS code before the barrier, and the GS phase (xcl_entry_pc = gs_start) matched no block and emitted nothing. Fixes #1360.What is in it
crates/xcl/src/gpu/recomp/mod.rs:term(): an indirect branch without a known target ends its block (Term::Other), as other terminators do.edgesgets the ES → GS edge.crates/xcl/src/gpu/recomp/tests.rs:geometry_es_setpc_ends_a_block_before_gs_start(CPU only) translates the issue's ES + GS with a branch in the GS, native and split wave64. It checks for apcblock atgs_startand the ES phase'sselect(xcl_es_phase, …)jump.Tested
cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvcpasses (C code stubbed, nothing linked).gpu::recompbuilt on its own (macOS), not a GPU run:main, neither form has apcblock atgs_start; with this change, both do.shaders.rpf: 5 of 8 158 change, all completely translated before and after. They are ES variants of one VS (VS_VoxelizeGeneric_*) ending ins_setpc_b64: they now end there instead of falling into theirs_endpgmblock, with one morepcblock boundary.63ad831:geometry_es_setpc_ends_a_block_before_gs_startand #1528'smulti_block_es_gs_treats_s_setpc_as_terminator_and_tracks_handoff_edgeboth pass.cargo test -p xcl --lib gpu_geometrypasses 2 tests with no GPU skips. (review)main:cargo test -p xcl --lib, all passed. (report)Regression run
Not run. I have no Windows machine here.
Not tested
gpu_geometry_mode_es_gs_stripand the two wave32 geometry tests, on any adapter.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:41:53Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.Thanks!
Imported from ivall/xcl. Originally posted by GonZiin on 2026-11-24T18:04:24Z.
Review: COMMENTED
I ran the two competing fixes for #1360 against each other's regression tests. Both implementations pass both fixtures. They also pass the same two geometry GPU tests on the RX 9070 XT. The results support keeping one PR for the ES-to-GS handoff, with both regression fixtures. #1375 is the smaller implementation and a reasonable branch to consolidate into.
Tested
XCL_ADAPTER=RX 9070 XTandXCL_REQUIRE_GPU=wave64,mesh.63ad831c2147fcfada4e6247a2869106aa302644and #1528c04e60f2ab6f49eab2b349f4a353e24107749407, rancargo test -p xcl --lib <filter> -- --test-threads=1with the filtersgeometry_es_setpc_ends_a_block_before_gs_startandmulti_block_es_gs_treats_s_setpc_as_terminator_and_tracks_handoff_edge. I copied only the other branch's fixture for each cross-check. Each command reported 1 passed, 0 failed and 0 ignored.cargo test -p xcl --lib gpu_geometry -- --test-threads=1on each clean head reported 2 passed, 0 failed, 0 ignored and 0 GPU skips.git merge-tree --write-treecombined each branch separately withmainat9e3831ewithout conflicts. Combining the two PR branches with each other conflicts ingpu/recomp/mod.rs.Not tested
Full workspace, NVIDIA, and retail titles. These tests do not establish equivalence on all geometry shaders.
AI use
Codex (
gpt-6.2-sol) compared the implementations, ran the tests and drafted this review.Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T19:23:03Z.
Thank you, @GonZiin, for checking both fixtures against both implementations. That's in Tested, along with @DavidM1911's run, and the PR is ready for review. #1375 came first (15:22 vs 17:17 UTC). If the maintainer wants #1528's fixture here too, I'm happy to add it with @OtavioTadeu credited.
Written with Claude Code (Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by Mischief8713 on 2026-11-24T20:36:49Z.
GPU run of
63ad831on Windows (NVIDIA GTX 1660 Ti, Turing): 708 passed, 0 failed, 21 ignoredTested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4; build exit 0, test exit 0gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64)main(9039900). It was run as it is.gpu::recomp::tests::gpu_geometry_mode_es_gs_stripran on the GPU and passed (this GPU has mesh shaders). The other geometry tests passed:geometry_es_setpc_ends_a_block_before_gs_start,geometry_wave32_rejects_cross_half_operations,geometry_wave_path_selection_preserves_native_wave64, and the e2eretail_es_gs_voxelize_geometry_mode.gpu_geometry_wave32_prefix_count_over_a_maskprinted SKIPPED (no wave64).Not tested
scripts/smoke.ps1run, so no regression runAI use
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:27:13Z.
Regression run of
63ad831con the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:16Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:33:19Z.
Triage (#1607) – head
63ad831The #1360 problem is fixed on main another way. In geometry mode,
structured_spannow stops at an ESs_setpc_b64with no target and atgs_entry(= gs_start), in both split and native wave64. That came in87d421b(#1689) and2de1544(#1873), with testsgeometry_split_phases_with_branches_have_entry_and_exit,geometry_early_setpc_ends_the_es_in_every_wave_formandgeometry_padding_before_gs_start_keeps_its_entry.#1528 (closed) made the same
term()/ES-to-GS-edge change as this PR.Recommendation: close (superseded by main commits
87d421band2de1544).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:44:52Z.
Closing as superseded: this change is already on
main(2de1544d). main mod.rs adds gs_start as leader and ends the block after the ES s_setpc (leaders ~1980), structured_span breaks at ES s_setpc and gs_entry (87d421b4,2de1544d); tests geometry_early_setpc_ends_the_es_in_every_wave_form and geometry_padding_before_gs_start_keeps_its_entry cover the PR's scenario (translate not run here)Two independent checks found this: Foniass's close list on #1607 and ours against current
main. If something here is still missing onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.
Pull request closed