shader: verify cross-quad WQM and EXECZ in a native pixel draw #2907
Closed
opened 2026-11-26 18:46:45 +00:00 by R0Y00
·
7 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#2907
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 R0Y00 on 2026-11-26T18:46:45Z.
Part of #870 and related to #2125. Target branch
cpp-migration.Claim. Open to a contributor with a GPU that can run the relevant wave operations. Comment here before starting. @roansystemlabs owns the related Python whole-wave reduction work in #2125. This issue covers a native C++ pixel draw with a WQM/EXECZ dependency and a fenced color comparison.
Deliverable. Extend the source-built pixel fixture in
tests/native_graphics_wqm_check.pywith one bounded cross-quad case. Arrange different mask states for two quads in the same guest wave, then check the EXECZ branch result, the output of surviving pixels and the untouched sentinel pixels after exact coverage is restored. Establish in the fixture that the participating quads share the expected wave topology and use a CPU mask and coverage reference.Negative control. Replace the cross-quad decision with a quad-local decision and require a pixel mismatch. Preserve the diagnostic for a continuation whose required helper lanes or wave participation cannot be proven.
Reproduction. Build with
cmake --build --preset dev --target compile_dxil offscreen_check. Extend and runctest --preset dev --no-tests=error -R '^native_graphics_wqm_hardware$' -V. Include the commit, Windows build, GPU, driver, wave width and debug-layer status. If the adapter lacks the required capability, record the skip separately and include a passing quad-local baseline on a supported adapter.Use only source-built shader containers and synthetic raster inputs.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T19:09:59Z.
Releasing this claim: we are focusing on #2908, so this one is open for anyone who wants it.
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-26T19:22:35Z.
I'd like to take this, on an RTX 3070 (32-lane waves, debug layer on) plus WARP for the quad-local baseline. WARP runs one quad per wave, so the cross-quad case will skip there with 77.
Plan, on
cpp-migration:WaveActiveAnyTrueof the surviving lanes. Cross-lane reads inside the region and an unproven helper or wave participation keep the current refusal;One design question before I write the translator part: is a vote over the desktop wave acceptable here, under the same packing contract as #2835 and #2854 (a correct program cannot depend on which quads the console groups into one wave)? Or do you want the decision kept to cases where that contract isn't needed?
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T21:21:23Z.
@roansystemlabs, some input on the design question. The decision is @R0Y00's. This is only how the case lines up with what #2835 and #2854 already rely on.
1. The EXECZ vote fits the contract's reasoning, with one caveat about what it means for a program to depend on it.
s_cbranch_execzchanges no per-lane result. A skipped block run with EXEC = 0 writes no VGPR, LDS or export, because all of those are masked by EXEC. Only effects outside EXEC can differ: SALU/SGPR writes, scalar memory ands_sendmsg. So quad B's pixels can only depend on the outcome when the program carries quad A's coverage into quad B through such a scalar effect. That outcome depends on which quads share a console wave, which is exactly what #2835's contract says a correct program cannot rely on. Reading the vote over the desktop wave is therefore consistent with that contract. Your fixture builds that dependency on purpose, so its CPU reference has to come from the measured desktop wave membership, as you plan. It shows that the lowering votes over the desktop wave. It does not show console equivalence for that quad-B output, and the docs note should say so.2. The part #2835 and #2854 did not cover: helper lanes.
Both accepted the lowering only while EXEC was still the entry mask, with no
s_wqmbefore it. On the console the helper lanes were then out of EXEC, and on the desktop they are left out of wave operations, which #2835 measured. Your branch is under WQM, so that agreement no longer holds automatically. On the console,s_cbranch_execztests EXEC afters_wqm, so a quad whose surviving lanes are only helpers keeps the wave from skipping. By default, D3D wave intrinsics do not count helper lanes; Shader Model 6.7 adds the[WaveOpsIncludeHelperLanes]entry attribute to change that. A plainWaveActiveAnyTrueover the surviving lanes can therefore skip where the console would not. If the block has an effect outside EXEC, that difference is visible.Two ways to keep the vote over the same lane set the console tests:
[WaveOpsIncludeHelperLanes](SM 6.7, so a capability gate and a 77 below it) or with a per-quadQuadAnyof the live lanes, then the wave vote;Either way, a case in the fixture where the only lanes left in a quad are helpers would pin it. That case should differ between the plain vote and the WQM-mask vote.
3. Adapter note for your plan. WARP runs 4-lane waves, so the cross-quad case skips there, as you expect. @thepatrickworld measured 64-lane pixel waves on an RX 9070 XT on #2835. A wave64 adapter would give the topology check a second layout besides your RTX 3070's 32 lanes. I can run it on an RX 9070 XT once there is a branch. One caveat: native pixel draws through
offscreen_checkon this branch currently crash on that adapter with0xC0000005(#2915),native_graphics_wqm_hardwareincluded, so that has to be resolved first.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T21:26:06Z.
@roansystemlabs, following up on my comment above: this one is our call as maintainers, so here is the decision.
Yes, vote over the desktop wave, but over the lanes the console's EXEC holds at the branch, not only the surviving pixels.
The vote: take the translator's modelled EXEC predicate at the
s_cbranch_execz. OR it across the quad withQuadReadAcrossX,QuadReadAcrossYandQuadReadAcrossDiagonal; quad operations read helper lanes, and they are available from SM 6.0. Then useWaveActiveAnyTrueof that quad-complete bit for the branch. No SM 6.7[WaveOpsIncludeHelperLanes]gate is needed.A correction to my comment above:
s_wqmnever makes a zero mask non-zero. So when EXEC at the branch is just the WQM expansion of the surviving lanes, a plain vote over the survivors gives the same answer. The two differ only when EXEC holds bits in a quad that has no survivor, for example a WQM mask taken before the filter. The quad-complete vote is right in both cases, so use it and do not rely on which case a program happens to be.The contract: this rests on the same contract as #2835 and #2854: a correct program cannot depend on which quads share a console wave. The fixture's reference therefore has to use the measured desktop wave membership, as you planned. The note should state that it shows the vote over the desktop wave, not console equivalence for an output that depends on another quad.
Fixture cases, on top of your plan:
Keep refusing anything inside the region that reads other lanes, and anything where helper or wave participation cannot be proven, as you proposed.
Go ahead on
cpp-migration. I can run it on an RX 9070 XT, which has 64-lane pixel waves, once #2915 is out of the way.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-26T21:59:03Z.
Thanks @MasterDomino, clear. Going ahead on
cpp-migrationwith the quad-complete vote: the modelled EXEC predicate at thes_cbranch_execz, OR-ed across the quad withQuadReadAcrossX/Y/Diagonal, thenWaveActiveAnyTrueof that bit. The fixture will add the case where a quad's EXEC bits come only from lanes without a surviving pixel (plain survivor vote and quad-complete vote must give different pixels), next to the quad-local negative control, the all-empty wave and the sentinels. Reads of other lanes inside the region and unproven helper or wave participation stay refused, and the docs note will say it shows the vote over the desktop wave, not console equivalence for a cross-quad output. I'll post the RTX 3070 + WARP results here; a wave64 run on your RX 9070 XT after #2915 would be very welcome.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-26T22:39:39Z.
Opened #2946 on
cpp-migration. The vote is the quad-complete EXEC bit (QuadReadAcrossX/Y/Diagonal) underWaveActiveAnyTrue, as decided above. It is checked against the measured desktop quads on an RTX 3070 and WARP, with the helper-only, non-survivor, quad-local, empty-wave and sentinel cases. WARP runs one quad per wave, so it names the quad-local control as skipped and passes the rest. @MasterDomino, thanks for the RX 9070 XT offer; the branch is ready for it whenever #2915 allows.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T22:54:10Z.
Closed by #2946 (@roansystemlabs), merged into
cpp-migrationasea07313b: the quad-complete EXEC vote decided above.native_graphics_wqm_{hardware,warp,ir}pass on WARP (4 lanes), an RTX 3070 (32 lanes) and an RX 9070 XT (64 lanes, debug layer on, 0 errors). On the RX 9070 XT, dropping the diagonal quad read fails the hardware test. AI-assisted.