Recompiler: lower V_MIN_U32, V_MAX_U32, V_MIN_I32, and V_MAX_I32 in p… #2321
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!2321
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2321/head"
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?
@siam4201 on GitHub · 2026-11-25 14:09 UTC · original
siam4201:per-lane-int-minmax→main· +27 −1 · 1 files · 1 commits · merged 2026-11-25 18:37 UTCLower
V_MIN_U32,V_MAX_U32,V_MIN_I32, andV_MAX_I32in the per-lane Direct DXIL recompiler (recomp::lower).What is in it
crates/xcl/src/gpu/recomp/lower.rs: addedV_MIN_U32,V_MAX_U32,V_MIN_I32, andV_MAX_I32toTWO_SOURCEand lowered them viaicmp(Ult/Ugt/Slt/Sgt) +selectcrates/xcl/src/gpu/recomp/lower.rs: added unit testinteger_min_and_maxcovering signed/unsigned min and max edge casesTested
32.0.16.2101), AMD Ryzen 9 7900X, Windows, Rust1.97.1cargo test -p xcl --lib gpu::recomp::lower: 54 passed, 0 failed (includinginteger_min_and_maxandinteger_programs_on_the_gpu).\scripts\test.ps1(cargo test --workspace -- --test-threads=4): 1095 passed, 4 failed (pre-existingfuzz_validate_and_gpu_0..3E_OUTOFMEMORY#1905, same asmain568e7db), 26 ignoredno wave64, 3per-lane form: refused(V_CVT_F16_F32,V_MUL_F16,V_PK_MUL_F16)Regression run
main:PR head:
Not tested
AI use
@nnonno91 on GitHub · 2026-11-25 14:17 UTC · original
Independent GPU readback of all four per-lane integer min/max instructions on
1b017c18138183a2a6d8dfff68b6a3dd259a5fec.Tested
cargo test --locked -p xcl --lib integer_min_and_max -- --nocapture --test-threads=1gave 1 passed, 0 failed on the unchanged head.local_integer_min_max_gpufixture inrecomp/lower_dxil.rs. It invoked the per-lane DXIL kernel directly, then checked all four GPU outputs for each of 32 lanes against Rust signed and unsigned min/max. Inputs included signed extremes, both argument orders, equal values and all-ones versus zero.cargo test --locked -p xcl --lib gpu::recomp::lower_dxil::tests::local_integer_min_max_gpu -- --exact --nocapture --test-threads=1gave 1 passed, 0 failed with each ofXCL_ADAPTER=AMD RadeonandXCL_ADAPTER=NVIDIA GeForce RTX 5090. The runner confirmed the selected adapters and all 128 readbacks matched on each. No ignores or skips. The fixture was removed afterward.Not tested
Native wave64 execution of this fixture, a retail title, and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the checks, verified the logs and wrote this report.
@luckyteagirl on GitHub · 2026-11-25 14:28 UTC · original
Independent RDNA2 native-wave64 verification of exact PR head
1b017c18138183a2a6d8dfff68b6a3dd259a5fec.Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver
30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5.XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=wave64; isolated debug Cargo target.Clean-head tests:
gpu::recomp::lower::tests::integer_min_and_maxpassed 1/0/0 (the four new signed/unsigned operations in the CPU-side unit fixture).gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpupassed 1/0/0, with noSKIPPEDline. That GPU fixture executes native wave64 and wave32, checks the HLSL path, and compares per-lane DXIL register readback against it. In the unchanged fixture, its integer program includesV_MIN_I32andV_MAX_U32.Local fixture extension: I inserted
V_MIN_U32andV_MAX_I32intoINT_ARITHMETICas two additional output registers, leaving production code untouched. The same GPU test again passed 1/0/0 without skips on the selected RX 6800M, comparing all four new operations on wave32 and native wave64. This second result is from a local test-only change, separate from the clean-head results. I removed the two lines and verified the worktree is clean afterward.Limits: Focused synthetic tests only. I did not run the full workspace suite, a title smoke pair, or GPU timing on this head.
AI use: OpenAI Codex (GPT-6; exact variant unavailable in this session) ran the native Windows checks, made and restored the test-only extension, and drafted this report. No game data was used.
@SlopTart on GitHub · 2026-11-25 14:38 UTC · original
Wine/vkd3d-proton lane: verified, clean (RDNA3).
Tested: current PR head merged onto current
origin/main(auto-merge, clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (--release --locked,--test-threads=2): 142 passed / 3 failed / 1 ignored, identical to plainorigin/mainon this rig (the 3 are the rig's known baseline: fuzz seed 1003 of #2115,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed).integer_min_and_maxpasses on this lane too.Complements the NVIDIA and Windows RDNA2 rows with the Wine/vkd3d-proton data point; the lowering behaves the same under RADV translated through the XCL patch.
Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@oni-swr on GitHub · 2026-11-25 15:26 UTC · original
Independent AMD report for
1b017c18138183a2a6d8dfff68b6a3dd259a5fec.Tested
main).cargo test -p xcl --lib integer_min_and_max: 1 passed, 0 failed.cargo test --workspace --no-fail-fast -- --test-threads=4: 1154 passed, 1 failed, 46 ignored. The one failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU 0x7fffffff). It fails identically onmain06c9f550on this adapter (cargo test -p xcl --lib fuzz_validate_and_gpu_1), so it is not caused by this PR.f16_programs_on_the_gpu/f32_programs_on_the_gpuper-lane cases refused forV_MUL_F16,V_PK_MUL_F16orV_CVT_F16_F32, plusheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).scripts/smoke.ps1 -Seconds 60on a real title (same title, same time), release build. main06c9f550: 1531 frames, last presents per 2 s 60 36 38, peak commit 17752 MB, no device removal, no crash. PR head1b017c18: 1523 frames, last presents per 2 s 60 60 60, peak commit 17127 MB, no device removal, no crash. Both exit 0x0.Not tested
Per-lane GPU readback of the four instructions beyond the PR's own test, a title that reaches these instructions, other adapters.
AI use
Claude Code (Claude Sonnet 5.5) ran the tests and the smoke runs and wrote this report. No game files, dumps or shader names are included.
@DavidM1911 on GitHub · 2026-11-25 17:55 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!