Recompiler: match decoded opcodes directly in round-mode scan #1575
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!1575
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1575"
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?
@pmilewsskiedu-gif on GitHub · 2026-11-24 17:50 UTC · original
pmilewsskiedu-gif:perf/shader-1269→main· +61 −53 · 2 files · 1 commits · openPart of #1269.
Em::configure_round_modesscans every decoded instruction and previously allocated a lowercaseStringfrom each decoder mnemonic. Those mnemonics are already uppercase. This matches the static names directly, preserving f16/f64 rounding-mode, barrier, and end-of-program classification.Change
crates/xcl/src/gpu/recomp/emit.rs: remove one unnecessary lowercase allocation per scanned instruction and compare static uppercase mnemonics.crates/xcl/src/gpu/recomp/tests.rs: assert that all generated RDNA2 and console decoder names satisfy the uppercase invariant.Validation
Windows 11 Pro 26200, Ryzen 7 7700, NVIDIA RTX 4060 Ti 8 GB (driver 32.0.16.1088), Rust 1.100.0, DXC 1.9.2602.17.
cargo build --workspace: passed.cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored. Capability-related SKIPPED messages: 2 native-wave64 tests and 1 heap-window test.xcl shaders <local pack> --recomp --top 0: 26,698 programs, 44,422,713 decoded instructions, 9,665.7 MB of generated HLSL, no translation errors. All aggregate report lines match between builds except the total time.9e3831e: 120.41 s / 117.60 s wall time. On this PRa6c1fbe: 116.91 s / 116.33 s. Mean 119.01 s → 116.62 s (2.0% reduction). This is a small two-pair local measurement, subject to system noise.Regression run
The title folder name is redacted; no game files are included. Frame counts vary with cache/startup state, so no runtime FPS benefit is claimed.
Not tested
AMD and Intel GPUs; prolonged gameplay; a matched cold GPU-driver-cache comparison.
AI use
ChatGPT (GPT-6), through Chat On Steroids Core, implemented the patch and regression test, ran the builds, full test suite, benchmark and smoke checks, and wrote this description.
@nnonno91 on GitHub · 2026-11-24 18:03 UTC · original
Independent AMD and generated-HLSL comparison on
a6c1fbef0e15a61153e7f33726206b235c7bd179.Tested
cargo build --workspace --lockedpassed.cargo test --locked -p xcl --lib -- round_mode gpu_safe_s_barrier_multi_warp_and_early_endpgm --test-threads=1 --nocapturepassed all four tests, including the f16 rounding and barrier GPU tests, with zero skips.cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputreported 777 passed, 0 failed, and 41 ignored. One reported GPU skip (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows). The bundled title passed.cargo test --locked -p xcl --test round_mode_probe -- --exact compare_generated_rounding_shaders --nocapture --test-threads=1, generated HLSL and logged the translator’scomplete,unsupported_why, andignoredresults on base9e3831e1f570d3646e53ab753b19ec07eb8f1485and this PR. The seven synthetic programs exercise f16, f32 and f64 rounding, an SGPR MODE write, and a barrier with an early terminator. Across wave32, native wave64 and split wave64, all 21 generated HLSL files and diagnostics matched byte for byte. Both revisions completed 15 and refused the same six unsupported-mode cases.Not tested
Retail shaders, retail title runs, and performance. The comparison used seven synthetic programs.
AI use
OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary comparison, ran the checks, and drafted this report.
@lows78 on GitHub · 2026-11-24 18:06 UTC · original
Test report for #1575 at
a6c1fbef0e15a61153e7f33726206b235c7bd179(clean tree), on an RTX 4090. I am not a graphics developer: Claude Code ran this on my PC, and I can rerun things if that helps.Tested
XCL_SAMPLE_*unset.cargo build --workspace && cargo test --workspace -- --test-threads=4, one run each:main9e3831e: 776 passed, 0 failed, 41 ignoreda6c1fbe: 777 passed, 0 failed, 41 ignoredgpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)cargo test -p xcl --lib round -- --test-threads=4, 10 runs: 23 passed, 0 failed, no skip in eachemit.rsdiff: the 54 string literals it removes and the 54 it adds are the same, in the same order, apart from case, and every new one is all uppercaseNot tested
smoke.ps1run) and retail shaders, release builds, AMD, Intel, native wave64AI use
@DavidM1911 on GitHub · 2026-11-24 19:51 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.