Repository navigation
Recompiler: cube sc / tc negate by the sign bit on both backends - #2348
Victorbriez wants to merge 1 commit into
Conversation
1a116f0 to
a5b3149
Compare
|
Tested: current PR head merged onto current The new test goes red on this lane, but only on the
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. |
a5b3149 to
eda3db7
Compare
Both backends negated with `fsub -0.0, x`: the HLSL helpers through `-x`, the direct lowering through `fneg`. With no denormal option a driver may flush a denormal there. NVIDIA does on the HLSL path (v_cubetc_f32 returned ±0 for a denormal source on an RTX 3070), and RADV under vkd3d-proton does on the direct path (reported on xcl-dev#2348). Both now flip the sign bit, as the direct backend's directed-rounding path already does for source modifiers (`fsrc_bits`). The VALU fuzzer of xcl-dev#2169 found 58 of 256 cases differing between the backends on NVIDIA; with this change it finds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, you are right, and the description was wrong about the direct backend: its eda3db7 (on AI use: Claude Code (Claude Opus 5.5) checked the report against the code, wrote the change and this reply; I checked it before posting. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Both backends negated with `fsub -0.0, x`: the HLSL helpers through `-x`, the direct lowering through `fneg`. With no denormal option a driver may flush a denormal there. NVIDIA does on the HLSL path (v_cubetc_f32 returned ±0 for a denormal source on an RTX 3070), and RADV under vkd3d-proton does on the direct path (reported on xcl-dev#2348). Both now flip the sign bit, as the direct backend's directed-rounding path already does for source modifiers (`fsrc_bits`). The VALU fuzzer of xcl-dev#2169 found 58 of 256 cases differing between the backends on NVIDIA; with this change it finds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eda3db7 to
bc43fd6
Compare
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Thanks a lot, this is the AMD / native wave64 run and the regression run this PR was missing.
AI use: Claude Code (Claude Opus 5.5) read the report and drafted this reply; I checked it before posting. |
bmjask
left a comment
There was a problem hiding this comment.
No source-level defect found. The sign-bit XOR is consistent across HLSL and Direct-DXIL, preserves bit patterns, and the new GPU test covers both backends with denormals; the submitted RDNA4 report and head smoke are encouraging. Merge readiness is administrative: all current PR-description checks fail because the required full main baseline smoke block is missing (a summary is not enough). Please add the complete main block and rerun the description check.
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
Both backends negated the sources of
v_cubesc_f32/v_cubetc_f32withfsub -0.0, x: the HLSL helpers through-x, the direct lowering throughfneg. A driver may flush a denormal there: NVIDIA does on the HLSL path, sov_cubetc_f32returned ±0 for a denormal source; RADV under vkd3d-proton does on the direct path (reported below). Both now flip the sign bit. Fixes #2347.What is in it
neg_bitshelper in the HLSL prelude, used bycube_scandcube_tc(crates/xcl/src/gpu/recomp/emit.rs); anfneg_bitshelper used bycubein the direct lowering (crates/xcl/src/gpu/dxil/prelude.rs); and the GPU testgpu_cube_coordinates_negate_denormals_by_signon both backends (crates/xcl/src/gpu/recomp/tests.rs)Tested
main3ceb550), no uncommitted changesmain(hlsl lane 0: tc0x80000000, want0x80000001) and passes with the fix on both backendscargo test --workspace --no-fail-fast -- --test-threads=4:main3ceb550 1346 passed, 1 failed, 46 ignored; this PR 1347 passed, 1 failed, 46 ignored (the new test). The one failure is the same on both,a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrierfrom Recompiler: a bridged mask write in the split form meets no barrier #2074, and is not touched hereV_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32, Recompiler: the per-lane form takes f16 converts and products from #1426 #2182); 1 × no heap windows; 1 × Developer Mode off (0x887A002D); 2 × no xgameruntime.dllvalu_fuzz_backends_agree(its file added locally, not part of this PR):main1 instruction differs (V_CUBETC_F32, 58 of 256); this PR 0 differ, 333 of 341 compared (on eda3db7, the same change before this rebase; not rerun on bc43fd6)Regression run
scripts/smoke.ps1onmainand on this head, I will add both blocks here. Until then this stays a draft.Not tested
AI use
🤖 Generated with Claude Code