startup_gfx2hlsl_fma_mix_dispatch_hardware fails on RX 9070 XT: -0 addend reads back as +0 #2738

Open
opened 2026-11-26 05:33:56 +00:00 by MasterDomino · 10 comments
MasterDomino commented 2026-11-26 05:33:56 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T05:33:56Z.


startup_gfx2hlsl_fma_mix_dispatch_hardware (added in #2055) fails on an AMD Radeon RX 9070 XT, while its WARP variant passes. I first saw it on several unrelated PR heads during reviews. It also fails on a main revision that includes #2055 (de75613f), in both the dev and release presets, so none of those PRs caused it.

Environment: Windows 11 build 26300; AMD Radeon RX 9070 XT (1002:7550), driver 32.0.32029.2010; WARP 10.0.26100.9818. Synthetic fixture only.

ctest --preset release --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V
adapter=Microsoft Basic Render Driver ... all fma_mix checks passed
adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
hardware: negated inline 0 addend keeps a -0 product readback: MISMATCH
  expected 80000000, got 00000000
hardware: control without the high-half shift reads the low half in all 4 high-half cases: MISMATCH

Both failures come from one case. The row v_fma_mix_f32 v1, v2, v3, -0 op_sel:[0,1,0] op_sel_hi:[0,1,0] translates to v1 = U(F(v2) * f16tof32(v3 >> 16) + (-0.0));. The fixture sets v2 = 0x80000000 (OVERRIDES), so the product is -0. IEEE gives -0 + -0 = -0; WARP returns 0x80000000 and the RX 9070 XT returns +0. The second check fails for the same reason, because that -0 row is one of the 4 high-half rows the control compares.

Likely cause (hypothesis, not confirmed against the driver's ISA): D3D float math without precise isn't required to preserve the sign of zero. The AMD compiler appears to treat the -0.0 addend, or the sum, as +0. The translation is IEEE-correct, but nothing tells the driver to keep signed zeros there.

Possible fixes for the translator owner:

  • Drop the addend: emit the product alone when the addend is an inline -0 (x + (-0.0) == x exactly in IEEE). No signed-zero add is left for the compiler to fold.
  • Mark it precise: mark that expression precise, and check that DXC and the AMD driver then keep -0.

Either fix should be checked on this adapter with the existing case, plus the same case on a non-zero product as a control.

@Not-Saii, this is your fixture from #2055; happy to rerun a fix on the RX 9070 XT.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6620248963 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T05:33:56Z. --- `startup_gfx2hlsl_fma_mix_dispatch_hardware` (added in #2055) fails on an AMD Radeon RX 9070 XT, while its WARP variant passes. I first saw it on several unrelated PR heads during reviews. It also fails on a `main` revision that includes #2055 (`de75613f`), in both the `dev` and `release` presets, so none of those PRs caused it. **Environment:** Windows 11 build 26300; AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.32029.2010; WARP 10.0.26100.9818. Synthetic fixture only. ```powershell ctest --preset release --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V ``` ``` adapter=Microsoft Basic Render Driver ... all fma_mix checks passed adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 hardware: negated inline 0 addend keeps a -0 product readback: MISMATCH expected 80000000, got 00000000 hardware: control without the high-half shift reads the low half in all 4 high-half cases: MISMATCH ``` **Both failures come from one case.** The row `v_fma_mix_f32 v1, v2, v3, -0 op_sel:[0,1,0] op_sel_hi:[0,1,0]` translates to `v1 = U(F(v2) * f16tof32(v3 >> 16) + (-0.0));`. The fixture sets `v2 = 0x80000000` (`OVERRIDES`), so the product is `-0`. IEEE gives `-0 + -0 = -0`; WARP returns `0x80000000` and the RX 9070 XT returns `+0`. The second check fails for the same reason, because that `-0` row is one of the 4 high-half rows the control compares. **Likely cause (hypothesis, not confirmed against the driver's ISA):** D3D float math without `precise` isn't required to preserve the sign of zero. The AMD compiler appears to treat the `-0.0` addend, or the sum, as `+0`. The translation is IEEE-correct, but nothing tells the driver to keep signed zeros there. **Possible fixes for the translator owner:** - **Drop the addend:** emit the product alone when the addend is an inline `-0` (`x + (-0.0) == x` exactly in IEEE). No signed-zero add is left for the compiler to fold. - **Mark it `precise`:** mark that expression `precise`, and check that DXC and the AMD driver then keep `-0`. Either fix should be checked on this adapter with the existing case, plus the same case on a non-zero product as a control. @Not-Saii, this is your fixture from #2055; happy to rerun a fix on the RX 9070 XT. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 06:02:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T05:39:40Z.


Thanks for isolating this on the RX 9070 XT and checking an unaffected main build. The RX 5700 XT report in #2729 reproduces the same signed-zero word mismatch. Its probe also found that removing the addend alone still returned +0, so please use the same focused candidate from #2729 for the RDNA 4 retest. On the exact candidate, record the signed-zero word, a nonzero product, and the wrong-half mutation separately on the RX 9070 XT and WARP. Keep the raw-bit expectation in the existing test.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7183689214 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7183689214). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T05:39:40Z. --- Thanks for isolating this on the RX 9070 XT and checking an unaffected main build. The RX 5700 XT report in #2729 reproduces the same signed-zero word mismatch. Its probe also found that removing the addend alone still returned +0, so please use the same focused candidate from #2729 for the RDNA 4 retest. On the exact candidate, record the signed-zero word, a nonzero product, and the wrong-half mutation separately on the RX 9070 XT and WARP. Keep the raw-bit expectation in the existing test.
MasterDomino commented 2026-11-26 07:00:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T06:50:16Z.


Same class, more cases: on this RX 9070 XT, startup_gfx2hlsl_f16_alu_draw_hardware also fails on main (WARP passes).

  • Packed: seven v_pk_mul_f16 cases from #2738 read a -0 product back as +0.
  • SDWA: one SDWA case from #2739, v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge, set 0, lane 2 (-0 × +0), expected e000abcd, read back 6000abcd.

Both fail with FXC and DXC. So a fix for signed zero, such as precise or avoiding a fold the driver can take, likely needs to cover f16 multiplies as well as the fma_mix addend.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7184831943 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7184831943). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T06:50:16Z. --- Same class, more cases: on this RX 9070 XT, `startup_gfx2hlsl_f16_alu_draw_hardware` also fails on `main` (WARP passes). - **Packed:** seven `v_pk_mul_f16` cases from #2738 read a -0 product back as +0. - **SDWA:** one SDWA case from #2739, `v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge`, set 0, lane 2 (-0 × +0), expected `e000abcd`, read back `6000abcd`. Both fail with FXC and DXC. So a fix for signed zero, such as `precise` or avoiding a fold the driver can take, likely needs to cover f16 multiplies as well as the fma_mix addend. AI-assisted; commands listed were executed locally.
thepatrickworld commented 2026-11-26 08:01:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T07:33:40Z.


RDNA 4 retest of the #2729 candidate on b457f7ff (26200.9974): a zero product from an operand widened out of binary16 reads back +0, and the same expression under precise keeps -0.

Not a code change; measurements only.

Environment

  • Windows 10.0.26200.9974 (25H2, UBR 0x26f6); MSVC BuildTools toolset 14.44.35207; DXC from Windows Kits\10\bin\10.0.26100.0\x64\, reporting dxcompiler.dll: 1.9(5184-21d28f72)(1.9.2602.17).
  • main b457f7ff (b457f7ffa48fe4adb87e6b7d58a21a179dfee221), preset dev.
  • Adapter AMD Radeon RX 9070 XT vendor=1002 device=7550, driver 32.0.32029.2010. warp reports Microsoft Basic Render Driver vendor=1414 device=008c, driver 10.0.26100.9818. Every mode line reports debug_layer=unavailable.

It reproduces on this build

ctest --preset dev --no-tests=error -R "^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$" -V

1027: adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
1027: driver=32.0.32029.2010
1027: hardware: negated inline 0 addend keeps a -0 product readback: MISMATCH
1027:   expected 80000000, got 00000000
1027: hardware: control without the high-half shift reads the low half in all 4 high-half cases: MISMATCH
1027: hardware: control changes 4 of 4 high-half results: ok
1027: FAILED: 2 check(s): hardware: negated inline 0 addend keeps a -0 product readback, hardware: control without the high-half shift reads the low half in all 4 high-half cases
1026: warp: control changes 3 of 4 high-half results: ok
1/2 Test #1026: startup_gfx2hlsl_fma_mix_dispatch_warp .......   Passed    0.74 sec
2/2 Test #1027: startup_gfx2hlsl_fma_mix_dispatch_hardware ...***Failed    0.90 sec

The other 16 readback checks and every decode check pass on both backends. The second failure is the test's own negative control (mutated = line.replace(' >> 16)', ')')); it is the same zero-product case, and it is consistent with the same sign loss, but I did not take its per-row words apart (that dump goes to a temporary directory).

The candidate rows, on this adapter

Standalone cs_6_0 shader through offscreen_check --raw-uav-dump (the tool's bindings: t0 = its 2x1 R32_FLOAT texture 0.25/0.75, u0 = raw buffer pre-filled with raw_uav_fill_word). Operands are u0.Load(k) ^ constant against fill words whose value is fixed by the tool, so nothing folds; rows 10-12 store the operands themselves. Two shaders, identical except that one also declares the precise form:

row expression (v2 = -0.0, v3 = 0x44003A00 → high 4.0, low 0.75) A: RX 9070 XT A: WARP B: RX 9070 XT B: WARP
0 F(v2) * f16tof32(v3 >> 16) + (-0.0) — the translated line 80000000 80000000 00000000 80000000
1 same, no addend 80000000 80000000 00000000 80000000
2 F(v2) * f16tof32(v3 & 0xffff) + (-0.0) — low half 00000000 80000000 00000000 80000000
3 mad(F(v2), f16tof32(v3 >> 16), -0.0) 80000000 80000000 00000000 80000000
4 F(v2) * F(v3f) + (-0.0), binary32 operand (4.015625) 80000000 80000000 80000000 80000000
5 precise mul + add 80000000 80000000 repeat of row 0 repeat of row 0
6 precise mad 80000000 80000000 repeat of row 3 repeat of row 3
7 F(v2) * f16tof32(v3 >> 16) + 0.0 80000000 80000000 00000000 80000000
8 0.25 * f16tof32(v3 >> 16) — nonzero product 3f800000 3f800000 3f800000 3f800000
9 0.25 * f16tof32(v3 & 0xffff) — wrong half 3e400000 3e400000 3e400000 3e400000
10-12 operands as stored words 80000000, 44003a00, 40808000 same same same

The three records you asked for: the signed-zero word is rows 0-7; the nonzero product is rows 8-9, identical on both adapters (1.0 and 0.1875), so the multiply and the readback are sound; the wrong-half mutation is row 9, distinct from row 8, so reading the wrong half is separable whenever the product is not zero.

DXIL, which is what separates the rows

In shader B (no precise anywhere), every store above maps to one of four instructions:

%16 = fmul fast float %15, %6      ; %15 = legacyF16ToF32(high half)  -> stores 0, 4, 20, 28 -> rows 0, 1, 5, 7
%20 = fmul fast float %19, %6      ; legacyF16ToF32(low half)         -> store 8           -> row 2
%22 = tertiary.f32 = FMad(%6, %15, -0.0)                              -> stores 12, 24     -> rows 3, 6
%24 = fmul fast float %11, %6      ; binary32 operand                 -> store 16          -> row 4

+ (-0.0) is not in the DXIL at all (folded away, and the identity is exact), so the sign is lost on the multiply, not on the addend: row 1, which has no addend, fails the same way. The rows that lose the sign are the ones whose operand is widened out of binary16 through legacyF16ToF32; the fmad row 3 is not a fmul fast and loses it too, while the binary32 row 4 is a fmul fast and keeps it. So neither the addend nor the fast-math flag alone is the criterion.

In shader A, the same four instructions carry !dx.precise: %16 becomes fmul without fast (and is shared by stores 0, 4, 20, 28 through CSE), %17 is the tertiary with !dx.precise for rows 3 and 6, and those rows keep -0 on the card.

What this establishes, and what it does not

  • Establishes: on this adapter and driver, a multiply or mad whose operand is widened out of binary16 drops the sign of a zero result; WARP keeps it; the same probe with a binary32 operand keeps it; and the precise form keeps it on both.
  • Does not establish where the sign is dropped. precise changes at least the multiply's fast-math flag, the !dx.precise metadata on the conversion and on the tertiary, and which instructions CSE merges, so this is not a one-variable experiment and I am not naming the driver or the compiler as the cause. No ISA disassembly was taken.

Reproducing this: one trap, measured

A probe that also contains the precise form of the same expression does not lose the sign on that row (80000000 in shader A above), because the non-fast multiply from the precise declaration is what the plain copy shares through CSE; on the mad rows the same effect comes from !dx.precise on the tertiary instead. My first probe was written that way and read -0 everywhere. Keep precise out of the translation unit to see the loss.

Limits

One adapter and one driver, with WARP as the only reference; cs_6_0; numthreads(1,1,1), one group, so nothing here covers a wave or per-lane behaviour, nor cs_6_6/cs_6_7, nor -enable-16bit-types. The debug layer is unavailable, so it cannot separate "HLSL outside the spec" from a compiler or driver defect through validation.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185588802 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7185588802). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-26T07:33:40Z. --- **RDNA 4 retest of the #2729 candidate on `b457f7ff` (`26200.9974`): a zero product from an operand widened out of binary16 reads back `+0`, and the same expression under `precise` keeps `-0`.** Not a code change; measurements only. ### Environment - Windows `10.0.26200.9974` (25H2, UBR `0x26f6`); MSVC BuildTools toolset `14.44.35207`; DXC from `Windows Kits\10\bin\10.0.26100.0\x64\`, reporting `dxcompiler.dll: 1.9(5184-21d28f72)(1.9.2602.17)`. - `main` `b457f7ff` (`b457f7ffa48fe4adb87e6b7d58a21a179dfee221`), preset `dev`. - Adapter `AMD Radeon RX 9070 XT vendor=1002 device=7550`, driver `32.0.32029.2010`. `warp` reports `Microsoft Basic Render Driver vendor=1414 device=008c`, driver `10.0.26100.9818`. Every mode line reports `debug_layer=unavailable`. ### It reproduces on this build `ctest --preset dev --no-tests=error -R "^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$" -V` ``` 1027: adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 1027: driver=32.0.32029.2010 1027: hardware: negated inline 0 addend keeps a -0 product readback: MISMATCH 1027: expected 80000000, got 00000000 1027: hardware: control without the high-half shift reads the low half in all 4 high-half cases: MISMATCH 1027: hardware: control changes 4 of 4 high-half results: ok 1027: FAILED: 2 check(s): hardware: negated inline 0 addend keeps a -0 product readback, hardware: control without the high-half shift reads the low half in all 4 high-half cases 1026: warp: control changes 3 of 4 high-half results: ok 1/2 Test #1026: startup_gfx2hlsl_fma_mix_dispatch_warp ....... Passed 0.74 sec 2/2 Test #1027: startup_gfx2hlsl_fma_mix_dispatch_hardware ...***Failed 0.90 sec ``` The other 16 readback checks and every decode check pass on both backends. The second failure is the test's own negative control (`mutated = line.replace(' >> 16)', ')')`); it is the same zero-product case, and it is consistent with the same sign loss, but I did not take its per-row words apart (that dump goes to a temporary directory). ### The candidate rows, on this adapter Standalone `cs_6_0` shader through `offscreen_check --raw-uav-dump` (the tool's bindings: `t0` = its 2x1 `R32_FLOAT` texture `0.25/0.75`, `u0` = raw buffer pre-filled with `raw_uav_fill_word`). Operands are `u0.Load(k) ^ constant` against fill words whose value is fixed by the tool, so nothing folds; rows 10-12 store the operands themselves. Two shaders, identical except that one also declares the `precise` form: | row | expression (`v2 = -0.0`, `v3 = 0x44003A00` → high 4.0, low 0.75) | A: RX 9070 XT | A: WARP | B: RX 9070 XT | B: WARP | |---|---|---|---|---|---| | 0 | `F(v2) * f16tof32(v3 >> 16) + (-0.0)` — the translated line | `80000000` | `80000000` | `00000000` | `80000000` | | 1 | same, no addend | `80000000` | `80000000` | `00000000` | `80000000` | | 2 | `F(v2) * f16tof32(v3 & 0xffff) + (-0.0)` — low half | `00000000` | `80000000` | `00000000` | `80000000` | | 3 | `mad(F(v2), f16tof32(v3 >> 16), -0.0)` | `80000000` | `80000000` | `00000000` | `80000000` | | 4 | `F(v2) * F(v3f) + (-0.0)`, binary32 operand (`4.015625`) | `80000000` | `80000000` | `80000000` | `80000000` | | 5 | `precise` mul + add | `80000000` | `80000000` | repeat of row 0 | repeat of row 0 | | 6 | `precise` `mad` | `80000000` | `80000000` | repeat of row 3 | repeat of row 3 | | 7 | `F(v2) * f16tof32(v3 >> 16) + 0.0` | `80000000` | `80000000` | `00000000` | `80000000` | | 8 | `0.25 * f16tof32(v3 >> 16)` — nonzero product | `3f800000` | `3f800000` | `3f800000` | `3f800000` | | 9 | `0.25 * f16tof32(v3 & 0xffff)` — wrong half | `3e400000` | `3e400000` | `3e400000` | `3e400000` | | 10-12 | operands as stored words | `80000000`, `44003a00`, `40808000` | same | same | same | The three records you asked for: the signed-zero word is rows 0-7; the nonzero product is rows 8-9, identical on both adapters (`1.0` and `0.1875`), so the multiply and the readback are sound; the wrong-half mutation is row 9, distinct from row 8, so reading the wrong half is separable whenever the product is not zero. ### DXIL, which is what separates the rows In shader B (no `precise` anywhere), every store above maps to one of four instructions: ``` %16 = fmul fast float %15, %6 ; %15 = legacyF16ToF32(high half) -> stores 0, 4, 20, 28 -> rows 0, 1, 5, 7 %20 = fmul fast float %19, %6 ; legacyF16ToF32(low half) -> store 8 -> row 2 %22 = tertiary.f32 = FMad(%6, %15, -0.0) -> stores 12, 24 -> rows 3, 6 %24 = fmul fast float %11, %6 ; binary32 operand -> store 16 -> row 4 ``` `+ (-0.0)` is not in the DXIL at all (folded away, and the identity is exact), so the sign is lost on the multiply, not on the addend: row 1, which has no addend, fails the same way. The rows that lose the sign are the ones whose operand is widened out of binary16 through `legacyF16ToF32`; the `fmad` row 3 is not a `fmul fast` and loses it too, while the binary32 row 4 is a `fmul fast` and keeps it. So neither the addend nor the fast-math flag alone is the criterion. In shader A, the same four instructions carry `!dx.precise`: `%16` becomes `fmul` without `fast` (and is shared by stores 0, 4, 20, 28 through CSE), `%17` is the `tertiary` with `!dx.precise` for rows 3 and 6, and those rows keep `-0` on the card. ### What this establishes, and what it does not - Establishes: on this adapter and driver, a multiply or `mad` whose operand is widened out of binary16 drops the sign of a zero result; WARP keeps it; the same probe with a binary32 operand keeps it; and the `precise` form keeps it on both. - Does not establish where the sign is dropped. `precise` changes at least the multiply's fast-math flag, the `!dx.precise` metadata on the conversion and on the `tertiary`, and which instructions CSE merges, so this is not a one-variable experiment and I am not naming the driver or the compiler as the cause. No ISA disassembly was taken. ### Reproducing this: one trap, measured A probe that also contains the `precise` form of the same expression does not lose the sign on that row (`80000000` in shader A above), because the non-`fast` multiply from the `precise` declaration is what the plain copy shares through CSE; on the `mad` rows the same effect comes from `!dx.precise` on the `tertiary` instead. My first probe was written that way and read `-0` everywhere. Keep `precise` out of the translation unit to see the loss. ### Limits One adapter and one driver, with WARP as the only reference; `cs_6_0`; `numthreads(1,1,1)`, one group, so nothing here covers a wave or per-lane behaviour, nor `cs_6_6`/`cs_6_7`, nor `-enable-16bit-types`. The debug layer is unavailable, so it cannot separate "HLSL outside the spec" from a compiler or driver defect through validation. _AI-assisted._
RavenCurseBurg commented 2026-11-26 08:01:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T07:43:26Z.


I will take the packed v_pk_mul_f16 and SDWA v_mul_f16 signed-zero cases reported in this thread. I will check the generated shaders for both compiler targets, isolate the multiply and its sign controls, and send a focused candidate if the existing code loses that guarantee. I can run Intel UHD 770, RTX 4060 and WARP locally. The RDNA 4 retest would use the same submitted candidate. The v_fma_mix candidate in #2729 remains with its author.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185764386 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7185764386). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T07:43:26Z. --- I will take the packed `v_pk_mul_f16` and SDWA `v_mul_f16` signed-zero cases reported in this thread. I will check the generated shaders for both compiler targets, isolate the multiply and its sign controls, and send a focused candidate if the existing code loses that guarantee. I can run Intel UHD 770, RTX 4060 and WARP locally. The RDNA 4 retest would use the same submitted candidate. The `v_fma_mix` candidate in #2729 remains with its author.
RavenCurseBurg commented 2026-11-26 09:04:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T08:24:47Z.


The packed and SDWA multiply candidate for the additional RDNA 4 cases is #2779 at 3fdbaa40. On the SDWA edge set, lane 2 reads e000abcd on WARP, Intel UHD 770 and RTX 4060 under both FXC and DXC. An explicit sign-clearing control gives 6000abcd and fails all six comparisons. The PR includes the exact CTest command for the RX 9070 XT retest.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7186562373 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7186562373). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T08:24:47Z. --- The packed and SDWA multiply candidate for the additional RDNA 4 cases is [#2779 at 3fdbaa40](https://github.com/R0Y00/Xbox2Windows/pull/2779). On the SDWA edge set, lane 2 reads `e000abcd` on WARP, Intel UHD 770 and RTX 4060 under both FXC and DXC. An explicit sign-clearing control gives `6000abcd` and fails all six comparisons. The PR includes the exact CTest command for the RX 9070 XT retest.
Not-Saii commented 2026-11-26 12:04:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T11:38:48Z.


The v_fma_mix* part of this issue is addressed on main as of 02075500 (#2818): the lowering now goes through a precise mad, as the probes here suggested. The cache revision moves to x2w-startup-shader-28. WARP and an RTX 4090 pass, but neither failed before, so the RDNA 4 result is still open.

@MasterDomino or @thepatrickworld, could one of you rerun on the RX 9070 XT at 02075500 or later?

ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V

Expected:

  • hardware: negated inline 0 addend keeps a -0 product readback: ok;
  • hardware: control that clears a -0 result fails only the -0 product case: ok.

The mad(4097, 4097, -16785408) line prints whether the card fuses; it is information, not a check. Please include the driver and debug-layer status. The packed v_pk_mul_f16 and SDWA v_mul_f16 cases from this thread went in separately with #2779; this run does not cover them.

AI-assisted with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7190991409 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7190991409). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-26T11:38:48Z. --- The `v_fma_mix*` part of this issue is addressed on `main` as of `02075500` (#2818): the lowering now goes through a `precise` `mad`, as the probes here suggested. The cache revision moves to `x2w-startup-shader-28`. WARP and an RTX 4090 pass, but neither failed before, so the RDNA 4 result is still open. @MasterDomino or @thepatrickworld, could one of you rerun on the RX 9070 XT at `02075500` or later? ```powershell ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V ``` Expected: - `hardware: negated inline 0 addend keeps a -0 product readback: ok`; - `hardware: control that clears a -0 result fails only the -0 product case: ok`. The `mad(4097, 4097, -16785408)` line prints whether the card fuses; it is information, not a check. Please include the driver and debug-layer status. The packed `v_pk_mul_f16` and SDWA `v_mul_f16` cases from this thread went in separately with #2779; this run does not cover them. _AI-assisted with Claude Code (Claude Opus 5.5)._
thepatrickworld commented 2026-11-26 12:04:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T11:49:41Z.


Rerun at 02075500: 2/2 pass — the hardware entry on the RX 9070 XT, the warp entry on WARP. This is the RDNA 4 adapter from the report, so the two lines below are the ones you asked for.

Tree: 02075500eacd1347eb2217193b53a89a47f67e5b, tracked tree clean (ARBRE_PROPRE), offscreen_check rebuilt at that commit (build date 2026-11-26 12:41:36).

cmake --preset dev -DINTAKE_PYTHON=…\out\pe-env\Scripts\python.exe
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V
1/2 Test #1035: startup_gfx2hlsl_fma_mix_dispatch_warp .......   Passed    0.97 sec
2/2 Test #1036: startup_gfx2hlsl_fma_mix_dispatch_hardware ...   Passed    1.28 sec
100% tests passed out of 2
Total Test time (real) =   2.34 sec

Nothing skipped: two entries selected, two executed, no ***Skipped.

The two lines you named, verbatim from the hardware entry (#1036):

hardware: negated inline 0 addend keeps a -0 product readback: ok
hardware: control that clears a -0 result fails only the -0 product case: ok

Adapter and debug-layer state, from that same entry (#1036 — the header is reprinted before every readback batch, identical each time):

backend=hardware debug_layer=unavailable
adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
driver=32.0.32029.2010

So this is not a WARP result wearing the label. debug_layer=unavailable is the state itself: no D3D12 debug layer on this machine, so this run carries no validation-layer assertions — the readback comparisons stand on their own.

The mad line, information only, not a check (the harness prints it without the : ok suffix an actual check carries):

hardware: mad(4097, 4097, -16785408) = 00000000 (unfused)

The WARP entry reports the same value for the same fixture (warp: mad(4097, 4097, -16785408) = 00000000 (unfused), #1035), so that line does not distinguish the two backends.

Limits: one physical adapter (RX 9070 XT, driver 32.0.32029.2010) plus WARP's Microsoft Basic Render Driver (driver 10.0.26100.9818), Windows 11 25H2 build 26200.9974, dev preset. This run says nothing about the packed v_pk_mul_f16 or the SDWA v_mul_f16 cases — those are #2779.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7191216388 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7191216388). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-26T11:49:41Z. --- **Rerun at `02075500`: 2/2 pass — the hardware entry on the RX 9070 XT, the warp entry on WARP.** This is the RDNA 4 adapter from the report, so the two lines below are the ones you asked for. Tree: `02075500eacd1347eb2217193b53a89a47f67e5b`, tracked tree clean (`ARBRE_PROPRE`), `offscreen_check` rebuilt at that commit (build date 2026-11-26 12:41:36). ```powershell cmake --preset dev -DINTAKE_PYTHON=…\out\pe-env\Scripts\python.exe cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$' -V ``` ```text 1/2 Test #1035: startup_gfx2hlsl_fma_mix_dispatch_warp ....... Passed 0.97 sec 2/2 Test #1036: startup_gfx2hlsl_fma_mix_dispatch_hardware ... Passed 1.28 sec 100% tests passed out of 2 Total Test time (real) = 2.34 sec ``` Nothing skipped: two entries selected, two executed, no `***Skipped`. The two lines you named, verbatim from the hardware entry (#1036): ```text hardware: negated inline 0 addend keeps a -0 product readback: ok hardware: control that clears a -0 result fails only the -0 product case: ok ``` Adapter and debug-layer state, from that same entry (#1036 — the header is reprinted before every readback batch, identical each time): ```text backend=hardware debug_layer=unavailable adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 driver=32.0.32029.2010 ``` So this is not a WARP result wearing the label. `debug_layer=unavailable` is the state itself: no D3D12 debug layer on this machine, so this run carries no validation-layer assertions — the readback comparisons stand on their own. The mad line, information only, not a check (the harness prints it without the `: ok` suffix an actual check carries): ```text hardware: mad(4097, 4097, -16785408) = 00000000 (unfused) ``` The WARP entry reports the same value for the same fixture (`warp: mad(4097, 4097, -16785408) = 00000000 (unfused)`, #1035), so that line does not distinguish the two backends. Limits: one physical adapter (RX 9070 XT, driver 32.0.32029.2010) plus WARP's Microsoft Basic Render Driver (driver 10.0.26100.9818), Windows 11 25H2 build `26200.9974`, `dev` preset. This run says nothing about the packed `v_pk_mul_f16` or the SDWA `v_mul_f16` cases — those are #2779. _AI-assisted._
Not-Saii commented 2026-11-26 12:04:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T11:55:22Z.


Thanks @thepatrickworld, that settles the v_fma_mix* part on RDNA 4. Before #2818, the -0 case read 00000000 on this card. At 02075500 it reads correctly, and the sign-clearing control fails only that case.

What's left in this issue is the binary16 multiply part that @MasterDomino reported: seven packed v_pk_mul_f16 cases and the SDWA v_mul_f16 cases in startup_gfx2hlsl_f16_alu_draw_hardware. #2779 (4bbe52ee) adds precise to that product. It was measured on WARP, Intel UHD 770 and an RTX 4060, but not on an RX 9070 XT. Could one of you rerun it on main at 02075500 or later?

ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_f16_alu_draw_(warp|hardware)$' -V

Per the #2779 description, the focused SDWA case (set 0, lane 2) should read e000abcd. If that run passes too, I think this issue can close. #2729 stays open for the RX 5700 XT.

AI-assisted with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7191337526 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7191337526). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-26T11:55:22Z. --- Thanks @thepatrickworld, that settles the `v_fma_mix*` part on RDNA 4. Before #2818, the `-0` case read `00000000` on this card. At `02075500` it reads correctly, and the sign-clearing control fails only that case. What's left in this issue is the binary16 multiply part that @MasterDomino reported: seven packed `v_pk_mul_f16` cases and the SDWA `v_mul_f16` cases in `startup_gfx2hlsl_f16_alu_draw_hardware`. #2779 (`4bbe52ee`) adds `precise` to that product. It was measured on WARP, Intel UHD 770 and an RTX 4060, but not on an RX 9070 XT. Could one of you rerun it on `main` at `02075500` or later? ```powershell ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_f16_alu_draw_(warp|hardware)$' -V ``` Per the #2779 description, the focused SDWA case (set 0, lane 2) should read `e000abcd`. If that run passes too, I think this issue can close. #2729 stays open for the RX 5700 XT. _AI-assisted with Claude Code (Claude Opus 5.5)._
thepatrickworld commented 2026-11-26 13:03:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T13:02:01Z.


Rerun at da782506 (which contains 02075500): startup_gfx2hlsl_f16_alu_draw_hardware passes on the RX 9070 XT, and the SDWA case you named reads back e000abcd under both compilers.

Measured head da7825068fe9eb820701b0c23048d037d3cb67a9 (committed 13:49:24 +0100), executable built at 13:52:24 at that commit. git merge-base --is-ancestor 02075500 HEAD exits 0. For ordering: the head of my earlier post-merge receipt (4bbe52ee) is itself an ancestor of 02075500, so that receipt predates the baseline you asked for and cannot answer this question — which is why this is a fresh run and not a re-post.

Commands

cmake --preset dev -DINTAKE_PYTHON=<shared venv, path elided>
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R "^startup_gfx2hlsl_f16_alu_draw_(warp|hardware)$" -V

git status --porcelain --untracked-files=no was empty before the build. The run's own output does not print the revision, so the ordering evidence is the ancestry check plus the executable timestamp.

Observed

1/2 Test #1007: startup_gfx2hlsl_f16_alu_draw_warp .......   Passed   51.11 sec
2/2 Test #1008: startup_gfx2hlsl_f16_alu_draw_hardware ...   Passed   70.41 sec
100% tests passed out of 2
CTEST_EXIT=0
1008: backend=hardware debug_layer=unavailable
1008: adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
1008: driver=32.0.32029.2010

The warp entry reports adapter=Microsoft Basic Render Driver vendor=1414 device=008c.

The case you named, verbatim from the hardware entry — the first line of each pair is the readback, the second is the expected vector the fixture prints (startup_flat_param words= is printed from the mapped readback buffer in tests/startup_flat_param.cpp; the set N: line prints expected, so the two lines agreeing is what makes the lane read e000abcd):

1008: startup_flat_param words=60001234,60005678,e000abcd,60003456
1008: fxc sdwa v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge set 0: 60001234,60005678,e000abcd,60003456
1008: startup_flat_param words=60001234,60005678,e000abcd,60003456
1008: dxc sdwa v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge set 0: 60001234,60005678,e000abcd,60003456

What the entry actually covers

  • 220 readback records in #1008: 216 labelled case draws (108 per compiler) plus four wrong-value control draws (two per compiler, one expected word perturbed by a single bit) that must be rejected. Neither log carries a failure line for them, and both entries finished Passed.
  • No MISMATCH line and no skip line in either log.
  • 310 lines in #1008 end in : ok, 66 of which are per-op controls (control "…" detects a wrong lowering).

Delta from the sha you named

Between 02075500 and da782506, tools/startup/gfx2hlsl.py moves 38+/2- — a scalar destination mask discard in Stage, an SQ_RSRC_IMG_2D_ARRAY dimension test, and mesh57's null-export early exit — and the fixture does not move. No changed line mentions mul16. At the measured head the helper still reads float mul16(float a, float b) { precise float product = a * b; return product; }, and both v_mul_f16 and v_pk_mul_f16 call it.

Limits

  • One adapter (RX 9070 XT, driver 32.0.32029.2010) plus WARP's Basic Render Driver; debug_layer=unavailable, so no API-validation output is part of this result.
  • The before/after pair on this adapter (96a7b4fb failing sixteen draws, and removing only precise reproducing those same sixteen) was measured on the earlier head and is not re-measured here; it is in #2779's thread.
  • Nothing here covers the RX 5700 XT path tracked in #2729.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7192783341 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7192783341). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-26T13:02:01Z. --- **Rerun at `da782506` (which contains `02075500`): `startup_gfx2hlsl_f16_alu_draw_hardware` passes on the RX 9070 XT, and the SDWA case you named reads back `e000abcd` under both compilers.** Measured head `da7825068fe9eb820701b0c23048d037d3cb67a9` (committed 13:49:24 +0100), executable built at 13:52:24 at that commit. `git merge-base --is-ancestor 02075500 HEAD` exits 0. For ordering: the head of my earlier post-merge receipt (`4bbe52ee`) is itself an ancestor of `02075500`, so that receipt predates the baseline you asked for and cannot answer this question — which is why this is a fresh run and not a re-post. ### Commands ```powershell cmake --preset dev -DINTAKE_PYTHON=<shared venv, path elided> cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R "^startup_gfx2hlsl_f16_alu_draw_(warp|hardware)$" -V ``` `git status --porcelain --untracked-files=no` was empty before the build. The run's own output does not print the revision, so the ordering evidence is the ancestry check plus the executable timestamp. ### Observed ```text 1/2 Test #1007: startup_gfx2hlsl_f16_alu_draw_warp ....... Passed 51.11 sec 2/2 Test #1008: startup_gfx2hlsl_f16_alu_draw_hardware ... Passed 70.41 sec 100% tests passed out of 2 CTEST_EXIT=0 ``` ```text 1008: backend=hardware debug_layer=unavailable 1008: adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 1008: driver=32.0.32029.2010 ``` The `warp` entry reports `adapter=Microsoft Basic Render Driver vendor=1414 device=008c`. The case you named, verbatim from the hardware entry — the first line of each pair is the readback, the second is the expected vector the fixture prints (`startup_flat_param words=` is printed from the mapped readback buffer in `tests/startup_flat_param.cpp`; the `set N:` line prints `expected`, so the two lines agreeing is what makes the lane read `e000abcd`): ```text 1008: startup_flat_param words=60001234,60005678,e000abcd,60003456 1008: fxc sdwa v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge set 0: 60001234,60005678,e000abcd,60003456 1008: startup_flat_param words=60001234,60005678,e000abcd,60003456 1008: dxc sdwa v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge set 0: 60001234,60005678,e000abcd,60003456 ``` ### What the entry actually covers - 220 readback records in #1008: 216 labelled case draws (108 per compiler) plus four wrong-value control draws (two per compiler, one expected word perturbed by a single bit) that must be rejected. Neither log carries a failure line for them, and both entries finished `Passed`. - No `MISMATCH` line and no `skip` line in either log. - 310 lines in #1008 end in `: ok`, 66 of which are per-op controls (`control "…" detects a wrong lowering`). ### Delta from the sha you named Between `02075500` and `da782506`, `tools/startup/gfx2hlsl.py` moves 38+/2- — a scalar destination mask discard in `Stage`, an `SQ_RSRC_IMG_2D_ARRAY` dimension test, and `mesh57`'s null-export early exit — and the fixture does not move. No changed line mentions `mul16`. At the measured head the helper still reads `float mul16(float a, float b) { precise float product = a * b; return product; }`, and both `v_mul_f16` and `v_pk_mul_f16` call it. ### Limits - One adapter (RX 9070 XT, driver 32.0.32029.2010) plus WARP's Basic Render Driver; `debug_layer=unavailable`, so no API-validation output is part of this result. - The before/after pair on this adapter (`96a7b4fb` failing sixteen draws, and removing only `precise` reproducing those same sixteen) was measured on the earlier head and is not re-measured here; it is in #2779's thread. - Nothing here covers the RX 5700 XT path tracked in #2729. _AI-assisted._
Not-Saii commented 2026-11-26 14:00:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T13:04:27Z.


Thanks again @thepatrickworld. With this run, every RX 9070 XT failure reported here passes on main:

  • v_fma_mix* signed zero (#2818): startup_gfx2hlsl_fma_mix_dispatch_hardware passes at 02075500.
  • Packed v_pk_mul_f16 and SDWA v_mul_f16 (#2779): startup_gfx2hlsl_f16_alu_draw_hardware passes at da782506. The SDWA edge case reads e000abcd under FXC and DXC.

Both runs were without the debug layer, which isn't installed on that machine. @MasterDomino, unless you see something else on your card, I think this can be closed. The RDNA 1 retest stays in #2729.

AI-assisted with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7192838441 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2746#issuecomment-7192838441). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-26T13:04:27Z. --- Thanks again @thepatrickworld. With this run, every RX 9070 XT failure reported here passes on `main`: - `v_fma_mix*` signed zero (#2818): `startup_gfx2hlsl_fma_mix_dispatch_hardware` passes at `02075500`. - Packed `v_pk_mul_f16` and SDWA `v_mul_f16` (#2779): `startup_gfx2hlsl_f16_alu_draw_hardware` passes at `da782506`. The SDWA edge case reads `e000abcd` under FXC and DXC. Both runs were without the debug layer, which isn't installed on that machine. @MasterDomino, unless you see something else on your card, I think this can be closed. The RDNA 1 retest stays in #2729. _AI-assisted with Claude Code (Claude Opus 5.5)._
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#2738
No description provided.