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
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
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 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 amainrevision that includes #2055 (de75613f), in both thedevandreleasepresets, 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.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 tov1 = U(F(v2) * f16tof32(v3 >> 16) + (-0.0));. The fixture setsv2 = 0x80000000(OVERRIDES), so the product is-0. IEEE gives-0 + -0 = -0; WARP returns0x80000000and the RX 9070 XT returns+0. The second check fails for the same reason, because that-0row 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
preciseisn't required to preserve the sign of zero. The AMD compiler appears to treat the-0.0addend, 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:
-0(x + (-0.0) == xexactly in IEEE). No signed-zero add is left for the compiler to fold.precise: mark that expressionprecise, 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.
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.
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_hardwarealso fails onmain(WARP passes).v_pk_mul_f16cases from #2738 read a -0 product back as +0.v_mul_f16_word_1_word_0_word_1_preserve_plain_plain_edge, set 0, lane 2 (-0 × +0), expectede000abcd, read back6000abcd.Both fail with FXC and DXC. So a fix for signed zero, such as
preciseor 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.
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 underprecisekeeps-0.Not a code change; measurements only.
Environment
10.0.26200.9974(25H2, UBR0x26f6); MSVC BuildTools toolset14.44.35207; DXC fromWindows Kits\10\bin\10.0.26100.0\x64\, reportingdxcompiler.dll: 1.9(5184-21d28f72)(1.9.2602.17).mainb457f7ff(b457f7ffa48fe4adb87e6b7d58a21a179dfee221), presetdev.AMD Radeon RX 9070 XT vendor=1002 device=7550, driver32.0.32029.2010.warpreportsMicrosoft Basic Render Driver vendor=1414 device=008c, driver10.0.26100.9818. Every mode line reportsdebug_layer=unavailable.It reproduces on this build
ctest --preset dev --no-tests=error -R "^startup_gfx2hlsl_fma_mix_dispatch_(warp|hardware)$" -VThe 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_0shader throughoffscreen_check --raw-uav-dump(the tool's bindings:t0= its 2x1R32_FLOATtexture0.25/0.75,u0= raw buffer pre-filled withraw_uav_fill_word). Operands areu0.Load(k) ^ constantagainst 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 thepreciseform:v2 = -0.0,v3 = 0x44003A00→ high 4.0, low 0.75)F(v2) * f16tof32(v3 >> 16) + (-0.0)— the translated line8000000080000000000000008000000080000000800000000000000080000000F(v2) * f16tof32(v3 & 0xffff) + (-0.0)— low half00000000800000000000000080000000mad(F(v2), f16tof32(v3 >> 16), -0.0)80000000800000000000000080000000F(v2) * F(v3f) + (-0.0), binary32 operand (4.015625)80000000800000008000000080000000precisemul + add8000000080000000precisemad8000000080000000F(v2) * f16tof32(v3 >> 16) + 0.0800000008000000000000000800000000.25 * f16tof32(v3 >> 16)— nonzero product3f8000003f8000003f8000003f8000000.25 * f16tof32(v3 & 0xffff)— wrong half3e4000003e4000003e4000003e40000080000000,44003a00,40808000The 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.0and0.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
preciseanywhere), every store above maps to one of four instructions:+ (-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 throughlegacyF16ToF32; thefmadrow 3 is not afmul fastand loses it too, while the binary32 row 4 is afmul fastand 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:%16becomesfmulwithoutfast(and is shared by stores 0, 4, 20, 28 through CSE),%17is thetertiarywith!dx.precisefor rows 3 and 6, and those rows keep-0on the card.What this establishes, and what it does not
madwhose 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 thepreciseform keeps it on both.precisechanges at least the multiply's fast-math flag, the!dx.precisemetadata on the conversion and on thetertiary, 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
preciseform of the same expression does not lose the sign on that row (80000000in shader A above), because the non-fastmultiply from theprecisedeclaration is what the plain copy shares through CSE; on themadrows the same effect comes from!dx.preciseon thetertiaryinstead. My first probe was written that way and read-0everywhere. Keeppreciseout 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, norcs_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.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T07:43:26Z.
I will take the packed
v_pk_mul_f16and SDWAv_mul_f16signed-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. Thev_fma_mixcandidate in #2729 remains with its author.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
e000abcdon WARP, Intel UHD 770 and RTX 4060 under both FXC and DXC. An explicit sign-clearing control gives6000abcdand fails all six comparisons. The PR includes the exact CTest command for the RX 9070 XT retest.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 onmainas of02075500(#2818): the lowering now goes through aprecisemad, as the probes here suggested. The cache revision moves tox2w-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
02075500or later?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 packedv_pk_mul_f16and SDWAv_mul_f16cases from this thread went in separately with #2779; this run does not cover them.AI-assisted with Claude Code (Claude Opus 5.5).
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_checkrebuilt at that commit (build date 2026-11-26 12:41:36).Nothing skipped: two entries selected, two executed, no
***Skipped.The two lines you named, verbatim from the hardware entry (#1036):
Adapter and debug-layer state, from that same entry (#1036 — the header is reprinted before every readback batch, identical each time):
So this is not a WARP result wearing the label.
debug_layer=unavailableis 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
: oksuffix an actual check carries):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,devpreset. This run says nothing about the packedv_pk_mul_f16or the SDWAv_mul_f16cases — those are #2779.AI-assisted.
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-0case read00000000on this card. At02075500it 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_f16cases and the SDWAv_mul_f16cases instartup_gfx2hlsl_f16_alu_draw_hardware. #2779 (4bbe52ee) addspreciseto 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 onmainat02075500or later?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).
Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T13:02:01Z.
Rerun at
da782506(which contains02075500):startup_gfx2hlsl_f16_alu_draw_hardwarepasses on the RX 9070 XT, and the SDWA case you named reads backe000abcdunder 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 HEADexits 0. For ordering: the head of my earlier post-merge receipt (4bbe52ee) is itself an ancestor of02075500, 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
git status --porcelain --untracked-files=nowas 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
The
warpentry reportsadapter=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 intests/startup_flat_param.cpp; theset N:line printsexpected, so the two lines agreeing is what makes the lane reade000abcd):What the entry actually covers
Passed.MISMATCHline and noskipline in either log.: ok, 66 of which are per-op controls (control "…" detects a wrong lowering).Delta from the sha you named
Between
02075500andda782506,tools/startup/gfx2hlsl.pymoves 38+/2- — a scalar destination mask discard inStage, anSQ_RSRC_IMG_2D_ARRAYdimension test, andmesh57's null-export early exit — and the fixture does not move. No changed line mentionsmul16. At the measured head the helper still readsfloat mul16(float a, float b) { precise float product = a * b; return product; }, and bothv_mul_f16andv_pk_mul_f16call it.Limits
debug_layer=unavailable, so no API-validation output is part of this result.96a7b4fbfailing sixteen draws, and removing onlyprecisereproducing those same sixteen) was measured on the earlier head and is not re-measured here; it is in #2779's thread.AI-assisted.
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_hardwarepasses at02075500.v_pk_mul_f16and SDWAv_mul_f16(#2779):startup_gfx2hlsl_f16_alu_draw_hardwarepasses atda782506. The SDWA edge case readse000abcdunder 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).