Repository navigation
Recompiler: translate v_div_fixup_f16 in both backends - #1915
Conversation
v_div_fixup_f16 (VOP3, quotient / denominator / numerator in f16) had no case in the HLSL emitter or in the direct-DXIL lowering, so any program using it was reported as unsupported and fell back. It is v_div_fixup_f32 on half operands: both backends now reuse their existing div_fixup helper and round the result to f16 through the usual f16 result path. The CPU test translates the instruction and checks it is complete and emits div_fixup over the three f16 sources; it fails without the change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
NVIDIA test report for Tested
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; I checked it. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
v_div_fixup_f16(VOP3: quotient, denominator, numerator as f16) had no case in the HLSL emitter or in the direct-DXIL lowering, so a program using it was reported unsupported. It isv_div_fixup_f32on half operands; both backends now reuse their existingdiv_fixuphelper and round through the normal f16 result path (modifiers, op_sel and MODE rounding come with it). No open or closed PR touches it (searcheddiv_fixup,f16); the neighbouringv_qsad/v_mqsad(#909, closed) ands_quadmask(#814, #1473) are not touched.What is in it
gpu/recomp/emit.rs:v_div_fixup_f16in the f16 rounded-op list and the f16 match arm.gpu/dxil/lower_wide.rs,gpu/dxil/lower.rs: the same in the direct-DXIL lowering and its f16 rounding list.gpu/recomp/tests.rs:div_fixup_f16_instruction– translation is complete and emitsdiv_fixupover the three f16 sources. It fails on main (t.complete()is false) and passes with the change.Tested
scripts/smoke.ps1).cargo test -p xcl --lib div_fixup_f16 -- --nocapture(XCL_ADAPTER="RX 7800 XT"): 1 passed, 0 failed (also verified on main with only the test added: 0 passed, 1 failed).cargo test -p xcl --lib gpu::recomp:: -- --test-threads=4 f16(XCL_ADAPTER="RX 7800 XT"): 266 passed, 0 failed, 18 ignored (6SKIPPEDlines: 4 inf16_programs_on_the_gpuand 2 inf32_programs_on_the_gpufor refused#1426per-lane ops).XCL_ADAPTER="RX 7800 XT"):cargo test --workspace --locked -- --test-threads=4(lib): 926 passed, 1 failed, 25 ignored (6SKIPPEDlines above). The 1 failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722: res[30] = 0x1, CPU 0x7fffffff, an unrelatedswitch/waveReadLaneFirstfuzz case).cargo test --workspace --locked --test '*' --bins -- --test-threads=4: 49 passed, 0 failed, 20 ignored (1SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; all e2e tests pass on hardware GPU).XCL_ADAPTER=warp, debug):cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 974 passed, 2 failed (e2eWARP crashes), 45 ignored, 260SKIPPEDlines;cargo clippy -p xcl --all-targets --locked -- -D warningshad 732 pre-existing errors on main and with this change, none in the changed lines.Regression run
scripts/smoke.ps1 -Game <retail title> -Seconds 60withXCL_ADAPTER="RX 7800 XT", release builds from clean trees onmain(689f2db477c3) and PR head (74fe4c2b4935).main:
PR:
PR vs
main: 1575 / 1587 frames (99.2 %), peak commit 15090 / 14956 MB (100.9 %), 0 device removals, 0 crashes.Not tested
v_div_fixup_f16result values (the added test checks HLSL translation and completeness); whether the retail title in the smoke run executesv_div_fixup_f16was not verified.AI use
scripts/smoke.ps1regression pair, updated the description.