RX 5700 XT (RDNA 1): ExecuteIndirect Dispatch with max count > 1 runs only the first command (startup_indirect_count_hardware) #2618
Open
opened 2026-11-25 23:30:41 +00:00 by ColorMeBoom
·
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#2618
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 ColorMeBoom on 2026-11-25T23:30:41Z.
Commit or build
ae5d482aReproduction
Expected behavior
startup_indirect_count_hardwarepasses, asstartup_indirect_count_warpdoes. With the GPU-written count word 2, the first two of the three Dispatch records(2,1,1),(1,2,1),(1,1,3)run and the result word grows by 15 (0x31415926to0x31415935).In general,
ExecuteIndirectwith a Dispatch command signature andMaxCommandCount> 1 runs min(count, MaxCommandCount) commands, or all of them without a count buffer.Observed behavior
At commit
ae5d482a,startup_indirect_count_hardwarefails at its first case:The result grew by 3, which is record 0
(2,1,1)alone.startup_indirect_count_warppasses.Standalone check without
d3d12_xs.ei2.cpp(below) uses plain D3D12. Anumthreads(1,1,1)compute shader atomically adds, for each group,1 + x + 10y + 100zto word 0 and 1 to word 1. It runs that shader throughExecuteIndirectwith a 12-byte Dispatch signature, max count 3, and no count buffer, over the records(2,1,1),(1,2,1),(1,1,3). The two numbers in each cell are groups run / expected and result sum / expected.(1,1,1)recordsnumthreads(64,1,1)ExecuteIndirectcalls, max count 1 eachAn earlier version tested the fixture's own layout: count word at byte 4 of the argument buffer, records at byte 8. It also tested the count in a separate buffer, records at byte 16 with stride 12 or 16, and a count word of 3. Each gave 3 on the RX 5700 XT and the expected 15 or 318 on WARP. In every multi-command variant the adapter runs exactly one command, and separate single-command calls are exact. No call returned an error, and the device was not removed.
Driver versions. I forced each display driver INF onto the adapter (no reboot) and reran
ei2.exe:I did not test older drivers, other RDNA 1 adapters or the debug layer, and I did not find this in AMD's release notes. The cause is not established. Variant 8 suggests that one call per record would be exact on this adapter, but I did not test that with a GPU-written count.
Other
_hardwarefailures on this adapter, for completeness. The fulldevsuite gave 1,855/1,862, and three of the failures passed when rerun serially. The remaining three match results already indocs/experiments.md:gpu_alias_lookup_writes_hardware:array_atomics ... expected=64 actual=256,256,256,256, with 0 fixture mismatches.gpu_alias_window_hardware:gpu=0x300081000 gpu_page_aligned=0, a 4 KiB aligned GPU base.compute_store_aot_mac_f32_hardware: 320/320 words match. The hardware-onlyfused mad()mutation is not detected, because DXC emitsFMad(op 46) forprecise mad()and this adapter returns the unfused result.ei2.cppAI-assisted with Claude Code (Claude Opus 5.5).
Environment
Windows 11 Home build 26200.9974, D3D12Core 10.0.26100.9818
VS 2022 Build Tools, MSVC 19.44.35230, Windows SDK 10.0.26100.0, DXC 1.9.2602.17, Python 3.12.10
AMD Radeon RX 5700 XT (RDNA 1, vendor 1002, device 731f), driver 32.0.21045.29003 (Adrenalin 26.11.2), hardware backend
Debug layer unavailable (Graphics Tools not installed)
WARP reference: 10.0.26100.9818
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:53:39Z.
Thanks for reproducing this with plain D3D12. The strongest comparison is the no-count-buffer case: three records produce 2 groups and sum 3 on the RX 5700 XT, while three separate calls produce 7 groups and sum 318 on the same adapter. That puts the observed difference outside the shim on this machine. Let’s keep the hardware test’s strict readback. If another RDNA 1 owner can run the standalone mixed-record and split-call cases, please post the adapter, Windows build, driver, and both group/sum pairs. A matched run with the GPU-written count on a second adapter would help distinguish the scope before considering a workaround.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T00:12:35Z.
I ran the published nine-case standalone program on Windows 11 build 26100.9711. The original source block was SHA-256
10b5264dbb2fb0547229ce9b3bc75095ffdac452cd34b98844ce131d211aa50d. For the Intel run the only edit was selecting DXGI's minimum-power adapter. Each row below gives the observed group count and weighted sum.On the RTX 4060 and WARP I also ran the project's
startup_indirect_dispatch <hardware|warp> countat the tested integration. With the GPU-written count 2 both returned0x31415935. Count 9 clamped to three records and returned0x31415a64, and count 0 retained0x31415926. Both strict runs exited 0.For a negative control I limited the standalone program's multi-command calls to one record, keeping the expected groups and sums. The mixed case then gave 2 groups and sum 3 on RTX and WARP, and the split-call case still gave 7 and 318. Eight of the nine variants detected the change. The cause on RDNA 1 remains open. Build and hosted WARP controls
The project's count fixture currently selects the first eligible hardware adapter, even with
XBOX2WINDOWS_ADAPTER=Intel. I’ll follow up on adapter selection in that fixture so owners of multi-GPU systems can run the GPU-written count on a named card with the same strict readback.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:29:14Z.
The Intel UHD 770 and RTX 4060 results give us two hardware controls for the standalone test. The one-record mutation also reproduces the RX 5700 XT’s 2-group / 3-sum pattern on those controls. Please take the adapter-selection follow-up for the project’s count fixture. Reuse the existing adapter-selection helper where possible, print the adapter and driver actually selected, and add a control that a named unavailable adapter produces a clear diagnostic instead of silently running on another one. Keep the strict zero, two-record, and clamped count readbacks. A second RDNA 1 adapter is still the open hardware check.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T00:34:50Z.
The project's GPU-written count fixture now ran on the second physical card using
XBOX2WINDOWS_ADAPTER=uHd GrApHiCs 770. On the Intel UHD Graphics 770 (32.0.101.5973, Windows 11 build 26100.9711), count 2 executed two records and returned0x31415935. Count 9 executed three records at the maximum and returned0x31415a64. Count 0 retained0x31415926. Omitting the count buffer executed all three records and returned0x31415a64. The printed adapter and driver confirm which device executed the dispatches.I repeated the same readbacks on the RTX 4060 and WARP. The test commands, source and runtime revisions are in PR #2652. An independent RDNA 1 run would still help identify the scope of the RX 5700 XT observation.
Imported from R0Y00/Xbox2Windows. Originally posted by ColorMeBoom on 2026-11-26T01:06:17Z.
Thanks for the RTX 4060, UHD 770 and WARP controls. One more RX 5700 XT observation follows, then a workaround I have tested locally but not proposed as a PR. The second RDNA 1 adapter is still open, so I'd like your view on scope first.
A single-command call also ignores its count buffer. Same machine and driver as above (32.0.21045.29003, Windows 11 build 26200.9974, debug layer unavailable). Records
(2,1,1),(1,2,1),(1,1,3), each call withMaxCommandCount1, and a count buffer holding a per-record 0 or 1 written by a compute pass:So on this adapter, splitting into single-command calls is exact only when no count buffer is used.
Workaround that is exact here. A compute pass copies the count word and records into a scratch buffer, and rewrites record
ias itself whilei < min(count, MaxCommandCount)and as(0,0,0)otherwise. ThenMaxCommandCountsingle-command calls without a count buffer read the rewritten records. In a standalone program, counts 0, 1, 2, 3 and 9 matched on the RX 5700 XT and on WARP.I wired this into slot 61 on a local branch based on
ae5d482a, not pushed. Main has not changedlist_execute_indirectsince then. The pass replaces the compute root and pipeline, so the title's pipeline, compute root and upload SRVs (slots 25, 33 and 43) are set again before the calls, as the indexed-draw validation already does and as #2470 does after its Dispatch. Two parts change the fixture side, which I'd like your opinion on:startup_indirect_count_hardwarepasses on the RX 5700 XT (counts 2, 9 and 0, omitted writer, no count buffer, five refusals). WithX2W_SPLIT_INDIRECT_DISPATCH=0it fails as before (0x31415929, expected0x31415935). Newstartup_indirect_count_split_(warp|hardware)tests run the same cases with the split forced, and both pass. The fulldevsuite gave 1,861/1,864; the three failures are the RX 5700 XTgpu_alias_window_hardware,gpu_alias_lookup_writes_hardwareandcompute_store_aot_mac_f32_hardwareresults already reported, and the 131 capability skips are unchanged.The split covers Dispatch with a desktop compute pipeline only, not the translated slot 67 path in #2470 or the indirect follow-up under #2492.
Questions before any PR:
X2W_SPLIT_INDIRECT_DISPATCH=1) now and enabled by device id later?startup_indirect_count_hardwarestay unsplit, so it keeps showing the driver behavior, with the_splittests covering the workaround?AI-assisted with Claude Code (Claude Opus 5.5).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:12:09Z.
Yes, a narrow opt-in PR is welcome now. Keep the native Dispatch path as the default on every adapter. A second RDNA 1 result is still needed before considering any automatic enablement. Keep
startup_indirect_count_hardwareunsplit and strict so it can continue to expose the reported driver behavior. Exercise the opt-in in its own WARP/hardware tests, with the GPU-written counts 0, 1, 2, 3 and above max, and verify that a count of zero leaves the output untouched.Prefer binding the output UAV through the existing shim-tracked path if the fixture can do that. A fixture-only hook is acceptable if it feeds the same binding and restoration code as the real caller and stays outside the guest ABI. Please demonstrate that a subsequent normal dispatch sees its original compute root and bindings, and that scratch records remain valid until the submission retires. Scope this to bounded desktop-PSO Dispatch. Leave the translated path in #2470 and other indirect command kinds independent.
Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T02:43:15Z.
Independent AMD RDNA 4 result on
0c8f5dab:startup_indirect_count_hardwarepasses on this adapter.Not the second RDNA 1 adapter you asked for — a different AMD generation, on the same fixture, at a revision whose indirect path is unchanged from the report.
Why this revision is comparable
0c8f5dab(the report is atae5d482a),git rev-parse HEADprinted on the machine, tracked tree clean.list_execute_indirectinsrc/startup_stubs/d3d12_xs_device.cppis byte-identical between the two revisions: the whole function, signature through closing brace,diffempty. It ends in one call that hands the driver the whole batch —list->ExecuteIndirect(<real desktop signature>, count, draw_arguments, draw_offset, counts, counts ? count_offset : 0)— with no per-record loop anywhere. The only otherExecuteIndirectinvocation insrc/is the translated-draw one (d3d12_draw.inl:2321,:2324), which always passesMaxCommandCount1 and is not on this path.tests/startup_indirect_dispatch.cppbetweenae5d482aand0c8f5dabis adapter selection (adapter_name_filter.h,AdapterNameFilter,filter.no_match()).So the same forwarding code ran here, and what differs from the report is the adapter and the driver package.
Environment
Windows 11 25H2, build
10.0.26200.9974. AMD Radeon RX 9070 XT (PCI\VEN_1002&DEV_7550, gfx1201, RDNA 4), driver32.0.32029.2010. MSVC19.44.35230.0(BuildTools14.44.35207), CMake4.4.4, Ninja, presetdev(Debug). D3D12 debug layer not installed (d3d12SDKLayers.dllabsent).Commands
Run from the repository root:
Then the fixture directly, three times, to see the readbacks rather than the verdict:
Observed
ctestselected six tests and reported100% tests passed out of 6;startup_indirect_count_hardwarepassed in 0.27 s. The capture does not echo the selection regex; the six names in it are the six that regex matches inCMakeLists.txt(add_testat lines 1515-1517,SKIP_RETURN_CODE 77at 1520), and none returned 77. No line of it saysSkipped.The fixture, verbatim:
Read
executed=with care: the fixture computes it (min(count word, max count),tests/startup_indirect_dispatch.cpp:258-259), so it is an expectation, not a measurement. The measured side is the result word, read back from the compute shader's output buffer, and it moved by exactly 15 for count 2 and by 318 for count 9 and for the no-count-buffer call — 3 + 12 + 303, the sum over all three records under the fixture's1+x+10y+100zweight. A single executed record would move it by 3, which is the0x31415929in the report. The fixture printed noword N: got ...line and exited 0, and the three consecutive runs produced identical lines above.The five refusal controls (count offset without a count buffer, count word outside a placed buffer, invalid count offset, argument record outside a placed buffer, missing signature) each left the sentinel
0x31415926untouched.Scope, attributed
ae5d482a0c8f5dabThese rows are reported outcomes from different hosts, Windows builds, driver packages and revisions. They are not a controlled comparison.
Limits
32.0.21045.xpackage on this card to hold the driver still.D3D12GetDebugInterfaceattests/startup_indirect_dispatch.cpp:310-313, the stored-message loop at:439-451) is skipped: no D3D12 validation message was inspected. This is a readback result, not a validated one.AI-assisted; runs executed on the machine above.