Repository navigation
Recompiler: clamp out-of-range format codes to INVALID instead of format 77 (#1488) - #2336
slopgobblercobbler wants to merge 1 commit into
Conversation
|
Independent Windows check of Tested
Not tested Direct DXIL translation, the parent revision, retail titles, or the full workspace suite. The added test exercised the HLSL translation path. AI use OpenAI Codex (GPT-6.2 Sol) prepared and ran the tests, verified the results, and wrote this report. |
|
Tested: current PR head merged onto current
The clamped format-code lookup behaves identically on RDNA3 under Wine; no delta in the suite. 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. |
|
NVIDIA test report for Tested
Direct-DXIL path
Regression run ( base ( this PR: Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD. AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report. |
|
Confirmed the direct-DXIL gap reported by @frenziedcoder on exact head
let info = self.s.m.load(p, 4);
let valid = self.cmpc(Pred::ULe, fmt, 77);
self.sel(valid, info, z)With this local change, the direct-DXIL format-80 test passed 1/0/0, and the broader AI use: OpenAI Codex (GPT-6) reproduced the failure, tested the local fix, and prepared this report. |
|
Two contributors checked independently and found that this PR makes the same change as #1574 (for #1488): #1607, group D84. They suggest keeping #1574. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bmjask
left a comment
There was a problem hiding this comment.
P1: this fixes invalid format codes only in HLSL, not Direct DXIL. HLSL changes emit.rs:1780/1816, but Direct DXIL lower_mem.rs:286-304 still applies umin(fmt, 77) in fmt_info for both loads/stores, so codes 78-127 remain interpreted as format 77 instead of INVALID under XCL_DIRECT_DXIL=1. Reports on this head reproduce format 80 returning 0x11223344 rather than zero. Keep umin only for a safe table index and select zero info when original fmt > 77; add Direct-DXIL coverage. This is also functionally duplicated by #1574 and should be consolidated.
|
This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why. |
Resolves XCL-BT-010 in #1488.
What is in it
crates/xcl/src/gpu/recomp/emit.rs(bothBufKind::FormatLoadandBufKind::FormatStore):FMT_INFO[min({fmt}, 77u)]with({fmt} <= 77u) ? FMT_INFO[{fmt}] : 0u;.78..127) now evaluate to0u(INVALID), turning out-of-range format loads into0and stores into no-ops instead of decoding as format77(32_32_32_32_FLOAT).crates/xcl/src/gpu/recomp/tests.rs:format_codes_above_77_evaluate_to_invalidtesting both HLSL emission and GPU execution with format code80in both V# descriptor and MTBUF format immediate.Tested
cargo test -p xcl -- recomp(195 passed, 0 failed, 18 ignored)git diff --check upstream/main..HEADclean with zero trailing whitespacepython -I scripts/check_no_game_data.py crates/xcl/src/gpu/recomp/emit.rs crates/xcl/src/gpu/recomp/tests.rsconfirmed cleanNot tested
AI use