Repository navigation
Recompiler: geometry mode's ES s_setpc_b64 ends a block before gs_start (#1360) - #1375
tiagonogueiraa-bit wants to merge 1 commit into
Conversation
…rt (xcl-dev#1360) In geometry mode the ES hands over to the GS with an s_setpc_b64 that has no resolved target, so term() took it for a fall-through, and `edges` had no ES -> GS edge. With branches in the ES or GS, structured_span then merged the ES's last block and the first GS blocks into one stretch. Its s_setpc flow was dropped and gs_start got no `pc` block. 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. term() now ends a block at an indirect branch without a known target, as it does at other terminators, and `edges` gets the ES -> GS edge. Over the retail pack (every program translated on the CPU, macOS), 5 of 8 158 programs change. All are ES variants of one VS that end in s_setpc_b64; they now end there instead of falling into their s_endpgm block. geometry_es_setpc_ends_a_block_before_gs_start (CPU only) translates an ES + GS with a branch in the GS, both native and split wave64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v#1305-xcl-dev#1379 Integrate 22 open upstream PRs targeting world rendering, shader correctness, DirectStorage terrain loads, and crash/memory stability: - xcl-dev#1321 (xcl-dev#1307): fall back to pc blocks when structured CFG HLSL grows oversized (eliminates the 148 MB HLSL / 1 GB/s commit explosion from b8b1f49 so XCL_PSO_PRELOAD=1 stays flat at ~5.4 GiB) - xcl-dev#549, xcl-dev#1312: DirectStorage late page-array queue hold (fixes 0x89240009 terrain read failures) and 0-byte memory-source requests - xcl-dev#1365 (xcl-dev#1361): GFX10.30 scratch SADDR 0x7F addresses the immediate offset alone instead of adding v0 - xcl-dev#1368: translated compute PSOs use NodeMask 0 - xcl-dev#1371 (xcl-dev#105): deduplicate packed ISG1 vertex input struct fields - xcl-dev#1375 (xcl-dev#1360): ES s_setpc_b64 ends block before gs_start - xcl-dev#1350, xcl-dev#1351, xcl-dev#1352, xcl-dev#1353, xcl-dev#1349: VS layer/viewport outputs, PS sample index/fixed-point position & SV_Coverage, depth+UAV initial states, console SetPredication - xcl-dev#1305, xcl-dev#1306, xcl-dev#1314, xcl-dev#1319, xcl-dev#1322, xcl-dev#1334, xcl-dev#1339, xcl-dev#1355, xcl-dev#1357, xcl-dev#1379: console_list UMA hold on Release, v_cmp_class_f32 bitwise abs/neg, late_release vram queue wait, root arg clamping, empty BVH / NaN rays, NULL IASetIndexBuffer clearing, MSAA MipLevels=1, VFS lazy-page commits, coherent VirtualFree validation, cpu_writes PAGE_GUARD & stale fence wakeups - README.md: document the integrated PRs, XCL_PSO_PRELOAD=1, and 16 GiB cap Verified on RX 9060 XT / GE-Proton11-14: release build clean, targeted unit tests pass (75 passed, 0 failed), and 80 s run with XCL_PSO_PRELOAD=1 and XCL_MEM_LIMIT=12G stays flat at 5340-5413 MB with 512+ pipelines preloaded (1385 frames, exit 0x0). Assisted-by: Antigravity (Google DeepMind)
…v#1305-xcl-dev#1379 Integrate 22 open upstream PRs targeting world rendering, shader correctness, DirectStorage terrain loads, and crash/memory stability: - xcl-dev#1321 (xcl-dev#1307): fall back to pc blocks when structured CFG HLSL grows oversized (eliminates the 148 MB HLSL / 1 GB/s commit explosion from b8b1f49 so XCL_PSO_PRELOAD=1 stays flat at ~5.4 GiB) - xcl-dev#549, xcl-dev#1312: DirectStorage late page-array queue hold (fixes 0x89240009 terrain read failures) and 0-byte memory-source requests - xcl-dev#1365 (xcl-dev#1361): GFX10.30 scratch SADDR 0x7F addresses the immediate offset alone instead of adding v0 - xcl-dev#1368: translated compute PSOs use NodeMask 0 - xcl-dev#1371 (xcl-dev#105): deduplicate packed ISG1 vertex input struct fields - xcl-dev#1375 (xcl-dev#1360): ES s_setpc_b64 ends block before gs_start - xcl-dev#1350, xcl-dev#1351, xcl-dev#1352, xcl-dev#1353, xcl-dev#1349: VS layer/viewport outputs, PS sample index/fixed-point position & SV_Coverage, depth+UAV initial states, console SetPredication - xcl-dev#1305, xcl-dev#1306, xcl-dev#1314, xcl-dev#1319, xcl-dev#1322, xcl-dev#1334, xcl-dev#1339, xcl-dev#1355, xcl-dev#1357, xcl-dev#1379: console_list UMA hold on Release, v_cmp_class_f32 bitwise abs/neg, late_release vram queue wait, root arg clamping, empty BVH / NaN rays, NULL IASetIndexBuffer clearing, MSAA MipLevels=1, VFS lazy-page commits, coherent VirtualFree validation, cpu_writes PAGE_GUARD & stale fence wakeups - README.md: document the integrated PRs, XCL_PSO_PRELOAD=1, and 16 GiB cap Verified on RX 9060 XT / GE-Proton11-14: release build clean, targeted unit tests pass (75 passed, 0 failed), and 80 s run with XCL_PSO_PRELOAD=1 and XCL_MEM_LIMIT=12G stays flat at 5340-5413 MB with 512+ pipelines preloaded (1385 frames, exit 0x0). Assisted-by: Antigravity (Google DeepMind)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
GonZiin
left a comment
There was a problem hiding this comment.
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
- Windows 11 Pro 26300, Ryzen 7 7800X3D, Radeon RX 9070 XT (driver 32.0.32029.2010), Rust 1.100.0 MSVC, SDK DXC 1.8.2502.11, debug. Used
XCL_ADAPTER=RX 9070 XTandXCL_REQUIRE_GPU=wave64,mesh. - On each of #1375
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.- Linux
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.
|
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). |
|
GPU run of Tested
Not tested
AI use
|
|
Regression run of Against the limits in CONTRIBUTING.md: 101 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
The #1360 problem is fixed on main another way. In geometry mode, AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
Closing as superseded: this change is already on Two independent checks found this: Foniass's close list on #1607 and ours against current AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents. |
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 Recompiler: treat untargeted S_SETPC_B64 as Term::Other and track ES-to-GS edges #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