pixel_aot_hardware: wrong v_dot4_i32_i8 clamp results in check_dot_draw on Intel UHD Graphics #730
Closed
opened 2026-11-22 23:58:30 +00:00 by romn4rch
·
2 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#730
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 romn4rch on 2026-11-22T23:58:30Z.
Commit or build
787ace7(mainat the time of the run). The dot helpers intools/pixel_aot.py,DOT_BODYandcheck_dot_draware unchanged on currentmain(434fabe).Reproduction
Expected behavior
All four
dotcases pass, as they do on the NVIDIA GeForce RTX 3050 6GB Laptop GPU and on WARP on the same host.Observed behavior
In 3 of 3 runs,
check_dot_drawreports['pass', 'mismatch', 'mismatch', 'mismatch']. Only channel 2 differs:Channel 2 is
nibble_dot(v25, 0x12341234) + nibble_dot(v26, 0x43214321). Herev25isv_dot4_i32_i8 v25, v19, v20, v21 clampandv26isv_dot4_u32_u8.v26is exact on this adapter (see the isolated probes below). The three values therefore correspond tov25=80007df4,7fffc012and80000000instead of7fffffff,80000000andfffffe04. Cases 1 and 2 are not saturated. Case 3 is saturated even though-512 + 4is in range.pixel_aot_hardwarestops at the first failing check. I also rancheck_render(..., core_only=True)locally with each namedcheck_*wrapped so that a failure is recorded and the run continues. On Intel,check_dot_drawis the only failing check. The other 13 pass:dpp_int32,dpp,vop3p,bitwise,fma_mix,pk_int16,narrow,mode_register,movk,half,rgb_sample,trigandaffine_lod.Isolated probes (local only). Each probe is
v_mov_b32of s44..s47 into v18..v21, one dot instruction into v25, andv_cvt_f32_ubyte0..3of v25 into the four channels. It goes through the sametranslate,compile_shaderand--check-pixel-batchpath. The inputs are the fourDOT_SETSand five extra accumulator/sum combinations (9 sets):v_dot4_i32_i8 ... clampwith the current helperv_dot4_i32_i8without clamp;v_dot4_u32_u8andv_dot8_i32_i4with and without clamp;v_dot8_u32_u4,v_dot2_i32_i16andv_dot2_u32_u16with clampv_dot4_i32_i8 ... clampwith the helper rewritten as a 32-bit overflow test (below)80007df4,7fffc012)v_dot8_i32_i4 ... clampwith the same rewritedotprogram with both rewritesThe rewrite that was tested:
The five mutation controls of
check_dot_drawwere detected with both helper versions on all three backends. The DXIL listings of the full program are byte-identical across the three runs (DXC 1.9.2602.17). The 32-bit adds that can wrap carry nonswflag. The current helper, as compiled in the full program (comments added):The rewrite, as compiled in the full program:
Inference, not a confirmed cause. Every Intel result above matches one substitution: wherever the byte-product sum is used next to
sum + c, the driver behaves as if it usedsum + c.sumbecomes the sign word ofsum + c. That gives exactly80007df4,7fffc012and80000000for cases 1–3.asuint(sum) ^ rbecomes 0, so the overflow test is never true. That gives the two unsaturated values and leaves the 7 non-overflowing sets correct.The isolated probe of the current helper is not affected, so the substitution depends on the surrounding code.
Possible workaround, not yet run on hardware. The 4 × 8-bit product sum lies in [-65024, 65536], and the 8 × 4-bit sum in [-448, 512]. Saturation can therefore be decided from
candralone, without a second use ofsum:In Python, this matched the exact reference for the 9 probe sets and for 19,565 random and boundary cases. I plan to run it on the same three backends: the isolated probes, and the full program with its five mutation controls.
If it passes everywhere, would a
shader:PR that changesv_dot4_i32_i8andv_dot8_i32_i4this way be welcome? Or should Intel be recorded as an adapter exception indocs/experiments.md?v_dot2_i32_i16would keep the 64-bit pair, because its sum can reach 2^31.Environment
8086:468B), driver32.0.101.7026.10DE:25EC, driver32.0.16.2114) and WARP10.0.26100.10068.Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T00:26:56Z.
Yes, a focused PR is welcome if the bounded overflow check passes the full dot program and the isolated probes on Intel, NVIDIA and WARP. Keep the existing wrapped results, saturation endpoints and mutation controls, and add an input just inside each signed endpoint. Please report the exact shader and commit for the comparison. Keep the 16-bit product helper unchanged. The observed result is a context-dependent mismatch. The proposed driver substitution can stay as a hypothesis.
Imported from R0Y00/Xbox2Windows. Originally posted by romn4rch on 2026-11-23T14:25:10Z.
Follow-up: the bounded 32-bit check passes the full
dotprogram and the isolated probes on Intel, NVIDIA and WARPSource:
34d03c7(mainat the time of the run), one build, one host. The Intel driver is now 32.0.101.7092 (the first report used 32.0.101.7026). The current helper still fails there with the same values.Change under test. In
tools/pixel_aot.py,v_dot4_i32_i8andv_dot8_i32_i4end with the bounded check from the first report instead ofdot_i64_add/dot_i64_sat:v_dot2_i32_i16and the three unsigned forms keep the 64-bit pair. Intests/pixel_aot_check.py,DOT_SETSkeeps Sets 1–4 and the five mutation controls, and gains one input just inside each signed endpoint:(pack_f16_pair(-0.5, 1.0), 0x00070007, 0x0003ffff, 0x7ffffff0):v_dot2_i32_i16,v_dot4_i32_i8andv_dot8_i32_i4give0x7ffffffe.(pack_f16_pair(-0.5, 1.0), 0x00050005, 0xfffeffff, 0x80000010): the same three give0x80000001.Exact shader. The program
check_dot_drawdraws,translate(with_constants(DOT_BODY)), compiled bycompile_shaderwith the Windows SDK DXC 1.9.2602.17. The sets are constants, so the shader does not depend on them.54b6fae38df4efe26557ad12e622c0c445e1533612bf27a7c155e5f35c4428e1c76adeeebe88facaae0d078024f9670c6c0c9d9d148d9406c925fa9ca217a3820d9b896dd5ac5083b7c962cccd2eac0d29a3f564cb82840e25474fd387082c84f4a67ad94bb23d463aa0698be2b913604a8db12d49e41dbde847d96c73c4a99eAt current
main(58da18a) the dot helpers,DOT_BODYandDOT_SETSare unchanged, and the same translation gives byte-identical HLSL for both helpers (checked offline).1. CTest, with
XBOX2WINDOWS_ADAPTERset toIntelorNVIDIA:34d03c7check_dot_draw['pass', 'mismatch', 'mismatch', 'mismatch'], channel 2 = 225, 282, 9334d03c7+ change2. Every
draw-corecheck on Intel. As in the first report,check_render(..., core_only=True)ran with each namedcheck_*wrapped so that a failure is recorded and the run continues. On34d03c7,check_dot_drawis the only one of the 15 checks that fails. With the change, all 15 pass.3. Full
dotprogram through the sametranslate,compile_shaderand--check-pixel-batchpath, all six sets, Intel twice:All five mutation controls are detected with both helpers on all three adapters.
4. Isolated probes, built as in the first report. Each probe gets 11 inputs: the six
DOT_SETSand the five extra accumulator/sum combinations.v_dot4_i32_i8 v25, v19, v20, v21 clamp, bounded checkv_dot4_i32_i8 v25, v19, v20, v21, bounded checkv_dot8_i32_i4 v25, v19, v20, v21 clamp, bounded checkv_dot8_i32_i4 v25, v19, v20, v21, bounded checkv_dot4_i32_i8 ... clamp, current helperv_dot4_i32_i8 ... clamp, the overflow-test rewrite from the first report80007df4,7fffc012)Sets 5 and 6 pass with both helpers on all three adapters, so they add no failure of their own. They detect a clamp that fires one step early. By the formulas of
dot_reference, channel 1 (v_dot2_i32_i16) would read 479 instead of 475 and channel 2 (v_dot4_i32_i8) 386 instead of 382 in Set 5. In Set 6 they would read 51 instead of 55 and 71 instead of 75.Offline check. In Python, the bounded check equals exact signed saturation in 5,382,600 cases. The accumulators sweep around 0, ±2^30,
INT32_MAXandINT32_MINand include random values. The sums cover [-65024, 65536] and [-448, 512], each case with and withoutclamp.The cause on Intel stays a hypothesis.
Environment. Windows 11 build 26300.10075, MSVC 19.44.35230, Windows SDK 10.0.26100, DXC 1.9.2602.17, CMake 4.5.1, Python 3.14.7. Intel(R) UHD Graphics (
8086:468B, driver 32.0.101.7092); NVIDIA GeForce RTX 3050 6GB Laptop GPU (10DE:25EC, driver 32.0.16.2114); WARP 10.0.26100.10068. Debug layer unavailable on all three (Graphics Tools not installed).I'm opening a focused
shader:PR with this change and a matching sentence indocs/experiments.md.AI-assisted.