Repository navigation
Recompiler: match decoded opcodes directly in round-mode scan - #1575
pmilewsskiedu-gif wants to merge 1 commit into
Conversation
Avoid one temporary lowercase String per decoded instruction when classifying f16/f64 rounding and barriers. Add an invariant test for uppercase names in both instruction tables. On a local 26,698-program shader-pack scan, two debug runs each averaged 119.01 s on main and 116.62 s with the change. All 26,698 programs translated successfully, with unchanged aggregate HLSL size. Assisted-by: Chat On Steroids Core (GPT-6)
|
Independent AMD and generated-HLSL comparison on Tested
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. |
|
Test report for #1575 at Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
No open or merged PR makes the same change. The lines shared with #1630 are opcode names in its new opt.rs, not this change; #1630 still lowercases in this scan. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Part 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.