Recompiler: XCL_RDNA_FLOAT changes the direct DXIL but is in no cache key, so a run with =0 can load translations made with it on #3520
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from ivall/xcl. Originally posted by Grimkaaah on 2026-11-30T11:40:09Z.
XCL_RDNA_FLOAT(default on,=0turns it off) changes the DXIL the direct translator emits:v_fract_f32becomes a singledx.op.unary(Frc)andmul_legacy/fma_legacydrop their== 0checks for known constants (crates/xcl/src/gpu/dxil/prelude.rs:9-15, used at:85,:223,:248).On
main9dfbe3eit is in none of the places that keep translations and pipelines apart:translated::identity_from_source(crates/xcl/src/gpu/recomp/pso.rs:363-393) tagsXCL_DIRECT_COMPACT,XCL_DIRECT_COMPACT_NEST, the dispatch split,XCL_X_LDS_ORDERandXCL_PER_LANE, but notXCL_RDNA_FLOAT;semantic_pipeline_setting(crates/xcl/src/shaders.rs:30-41), which keys the warm list and the saved pipelines, does not list it.So after a normal run, a run with
XCL_RDNA_FLOAT=0(the obvious thing to try when a float result looks wrong) loads the translations and driver blobs made with it on, and the switch seems to do nothing. The other way round, a cache filled with=0serves its programs to a default run.This is the same class as #1409 / #2327 (
XCL_SAFE_BARRIER), on the direct DXIL side.Proposed fix (small; I can open the PR):
identity_from_source, whenrdna_float_enabled()is false, tag the identity (identity_for(&id.to_string(), "xcl-rdna-float-0")), the same way asXCL_X_LDS_ORDER=0; the default identity stays unchanged, so existing caches stay valid;"XCL_RDNA_FLOAT"tosemantic_pipeline_setting;Found by reading the code (a cross-check against how the Victory Grimkaaah translator keys its switches); not reproduced on a title yet.
AI use: Claude Code (Claude Opus 5.5) found this while comparing code and drafted this issue at my request.
Imported from ivall/xcl. Originally posted by kole07139 on 2026-12-01T20:02:59Z.
@Grimkaaah I'd like to take this one, unless you already have it in progress: say so and I'll drop mine and test yours instead.
While checking it I found a second switch of the same kind:
XCL_WATERFALL_COLLAPSE=0(added in4250e761on 11-29) turns off the sampler-waterfall collapse ingpu/dxil/waterfall.rs, so it changes the direct DXIL too, and it is in neitheridentity_from_sourcenorsemantic_pipeline_setting.The fix follows your proposal, for both switches: a switch that is off tags the direct identity (also
direct_output_identity, which keys the enormous programs rerouted to the direct translator on the HLSL path), the default gets no tag, and both names joinsemantic_pipeline_setting. Its unit tests fail without it. The PR follows once the full suite and the two smoke runs are done.AI use: Claude Code (Claude Opus 5.5).