startup: run compute pipelines (captured as Scarlett DXIL) and execute Dispatch; dispatches are dropped #1405
Open
opened 2026-11-24 10:56:17 +00:00 by denn0x
·
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#1405
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 denn0x on 2026-11-24T10:56:17Z.
Summary
The startup runtime drops every compute dispatch. Command-list slot 14 (
Dispatch) is a no-op, and compute pipelines created through device slot 62 (D3D12_COMPUTE_PIPELINE_STATE_DESC) are dumped and given a placeholder.Correction (after capturing them): all 52 compute shaders that executable created were DXBC containers holding Scarlett DXIL (parts
SFI0 ISG1 OSG1 PSV0 RTS0 STAT ILDN HASH DXIL), not gfx1013 machine code.tools/dxil_retarget.pyretargets all 52 without error (output unsigned). So the compute path is retarget, sign and run, not ISA translation.For UI-only frames this is invisible. Once an executable leaves its loading phase, compute is most of the GPU work. In a local run of an executable (offline, Windows 11 26300, RX 9070 XT, release build), the command lists after loading averaged per frame:
The executable creates at least 52 compute pipelines through slot 62. The presented surface is black (mean level 0/255) from the first frame after loading. Before that, the UI frames render correctly with the translated vertex and pixel pipelines.
What it needs
tools/dxil_retarget.pyalready retargets these containers, and its--pemode signs them throughroot_probe --signand gates modules that call Xbox-only intrinsics.CSbytecode), keyed by the container's bytes, into the shader cache.RTS0with the Xbox flags cleared).Dispatch(list slot 14).SetComputeRoot*list slots).Steps 1 and 4 need no game data.
Related
tools/compute_store_aot.pyandtools/ffx_dispatch_aot.pytranslate specific compute fixtures, not runtime pipelines.compute_store_aot).AI-assisted (Claude Code).
[GH #1412] startup: translate compute pipelines and execute Dispatch (dispatches are dropped)to [GH #1412] startup: run compute pipelines (captured as Scarlett DXIL) and execute Dispatch; dispatches are droppedImported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T11:11:40Z.
Xbox intrinsics in the captured compute modules
I ran the 52 captured compute containers through
dxil_retarget.retarget_containerandprobe_roots.validate_shader(root_probe, dxil.dll):xbox.*intrinsic, so they can be signed and run as retargeted.External function 'xbox.…' is not a DXIL function, status0x80aa0009).Modules per declared intrinsic:
xbox.global_load_dword_with_cachexbox.ReadLane.i32xbox.s_load_dword_with_cachexbox.Med3_F32xbox.global_load_dwordx3_with_cachexbox.Max3_F32,xbox.Min3_F32xbox.global_load_dwordx4_with_cachexbox.GetLaneIDxbox.LaneSwizzle.i32xbox.global_atomic_add,xbox.global_atomic_subxbox.V_CNDMASK_B32xbox.global_load_dwordx2_with_cache,xbox.MakeUniform.i32,xbox.V_ALIGNBYTE_B32xbox.BFIxbox.V_PK_MAX_F16,xbox.V_PK_MIN_F16,xbox.global_store_dwordx3/x4_with_cache,xbox.Ballot64,xbox.Max3_U32,xbox.Med3_U32,xbox.Min3_U32xbox.global_atomic_fmax,xbox.global_atomic_fminxbox.MBCNT64,xbox.S_BCNT1_U64,xbox.TypedLoad.i32,xbox.MakeUniform.i64,xbox.WaveMin_U32,xbox.global_store_dword_with_cacheSo step 1 above also needs DXIL lowering of
xbox.*calls before signing. Three groups:Med3/Min3/Max3(F32, U32),BFI,V_CNDMASK_B32,V_ALIGNBYTE_B32,V_PK_MIN/MAX_F16,S_BCNT1_U64.ReadLanemaps toWaveReadLaneAt,GetLaneIDtoWaveGetLaneIndex,Ballot64toWaveActiveBallot,WaveMin_U32toWaveActiveMin, andMakeUniformtoWaveReadLaneFirst.LaneSwizzleandMBCNT64needWaveReadLaneAtsequences and prefix bit counts.global_*/s_load_*_with_cache,global_atomic_*):address - window_base). That needs the window to be one resource, or a small table of resources.A bitcode-level rewrite can build on the reader and writer already in
tools/dxil_retarget.py. The alternative is a disassemble, edit and reassemble route through DXC, if its assembler is available. Group 1 is a good first PR, with a fixture per intrinsic: a source-built module containing thexbox.*declaration, lowered, validated and dispatched on WARP against a CPU reference. Related: #584 (the gate).AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:18:35Z.
Claiming the first slice of this: make
Dispatchexecute compute pipelines that need noxbox.*intrinsics.The correction in the issue body is what makes a first slice possible at all: the 52 compute shaders are DXBC containers holding Scarlett DXIL,
dxil_retarget.pyretargets all 52 without error, and denn0x measured that 9 of 52 reference noxbox.*intrinsic and can therefore be validated and signed. The other 43 are refused by validation withExternal function 'xbox.…' is not a DXIL function, which is a separate problem and not part of this claim.What I plan to change:
Dispatch) currently a no-op: forwardDispatch(x, y, z)to the desktop command list when the bound compute pipeline is real, and keep the existing no-op behaviour when it is not — no behaviour change for the placeholder case;D3D12_COMPUTE_PIPELINE_STATE_DESC): instead of a placeholder, retarget and sign the captured Scarlett DXIL container through the existingdxil_retargetpath, then create a real compute PSO; refuse with a logged reason when the container carriesxbox.*intrinsics or fails validation, rather than silently substituting a placeholder;Evidence I will report: dispatch count reaching the desktop list, pipeline creation results split into signed / refused with reasons, and the fixture's readback bytes before and after. What I will not claim: that the title's own compute work is correct or complete — the 43 modules with
xbox.*intrinsics remain unrunnable by design, and this slice cannot speak for them.If you would rather have the
xbox.*gate handled first (for example a translation shim for the most common intrinsics before wiringDispatch), say so and I will switch; otherwise I will start with the wiring plus the fixture, which is testable today.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:22:58Z.
Please proceed with the source-built no-intrinsic compute dispatch slice. Use an offline, validated and signed artifact with the existing shader cache. Keep the final-module gate from #584 for executable unresolved calls, and report which stage refuses a pipeline. For the end-to-end fixture, use distinct dispatch dimensions and a UAV sentinel so a dropped dispatch or wrong root binding changes the result. A refused module should record zero desktop dispatches. WARP and one physical adapter would make the first PR independently reviewable.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:33:59Z.
First slice up as #1441: compute pipelines that are already desktop DXIL become real, and
Dispatchrecords them.Scope, deliberately narrow:
DXILpart and names no console intrinsic; otherwise it keeps the placeholder and logs the reason;Dispatch(x, y, z)only when the bound pipeline is real — with a placeholder the path is unchanged, so the 43 modules withxbox.*intrinsics behave exactly as they do today;startup_compute_dxil(ctest) controls the classifier boundary, including the case that matters most from denn0x's data: a container that carries DXIL and names an intrinsic must be refused, not built and failed later.Explicitly not in this PR, and I would rather say so than let the first slice look bigger than it is:
xbox.*question for the remaining 43;AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T11:49:41Z.
Correction: which pipelines the dispatches use
I counted
Dispatch(list slot 14) per bound pipeline, by the device slot that created it.Every dispatch measured so far used a pipeline from device slot 67, not slot 62.
image_load,image_store, VALU math andexec-masked branches.So for this issue, translating gfx1013 compute stages (slot 67) is the likelier critical path, not retargeting DXIL (slot 62). That means extending the graphics translator with:
numthreadsfrom the pipeline's register metadata;image_store/buffer_storeto UAVs, which the translator does not do yet;The intrinsic census in my previous comment still applies to the slot-62 modules, if they turn out to be used. I will post the post-load census once a run gets there.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T12:23:36Z.
Thanks for separating recorded pipeline creation from the dispatches that actually use it. Please keep the verified slot 67 work as the next runtime target and treat slot 62 as a separate source-built experiment. A useful first slot 67 fixture would bind explicit group dimensions, a read buffer and a writable resource, then verify nonzero GPU output plus a dropped-dispatch or swapped-binding control. Keep the 333 post-load dispatches unclassified until there is matching evidence for that phase.
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T12:35:31Z.
Post-load census: most rendering is GPU-driven
A run now gets past loading, so I counted one busy frame after loading. The frame was traced in a local runtime build with per-call logging.
Work recorded in one frame:
ExecuteIndirect, all signaturesDispatchMesharguments (type 10)Dispatcharguments (type 2)DrawIndexedarguments (type 1)Drawarguments (type 0)DispatchDraw/DrawIndexedExecuteIndirectcall has a maximum count of 1 and no count buffer.ExecuteIndirectis not executed by the runtime yet.What reaches the render targets: I copied every render target of that frame back to the CPU at the end of the frame.
This matches the census: the scene is not drawn by direct draws.
Revised critical path for a picture after loading. Translating compute shaders alone is not enough. Three pieces are needed, and each depends on the one before:
ExecuteIndirectwith argument buffers that alias the executable's GPU memory, so arguments written by compute are what the desktop GPU reads.DispatchMeshpath, which is most of the indirect calls.I will start on piece 1, with the compute dispatches that feed the indirect argument buffers. Anyone interested in piece 2 or 3 is welcome to pick it up. Pieces 2 and 3 can be tested on their own with source-built fixtures: a compute shader writes indirect arguments, then
ExecuteIndirectconsumes them.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T12:51:06Z.
The post-load capture adds a separate producer-to-consumer question. The argument bytes seen at record time alone do not establish who produced them. For a source-built control, start the argument buffer with a sentinel, dispatch a writer, apply the required UAV and indirect-argument synchronization, then execute one desktop-supported indirect signature and verify its fenced output. Omit the writer or use an explicitly wrong record as a negative control. Keep the slot 67 direct-dispatch fixture independent, and leave the unclassified signature out of the first slice.
Imported from R0Y00/Xbox2Windows. Originally posted by ArnabSaga on 2026-11-24T12:53:59Z.
Thanks for the clarification.
I've been working locally on the slot 62 Scarlett DXIL compute path, including offline retargeting, cache integrity, compute PSO creation, root bindings, and Dispatch execution. The source implementation is in place, and the Python controls pass, but C++ compilation and GPU verification are still pending.
I agree that the slot 67 direct-dispatch fixture should remain independent of the producer-to-consumer indirect execution test.
For the latter, the sentinel-initialized argument buffer, compute writer, UAV synchronization, transition to INDIRECT_ARGUMENT, and fenced readback should provide a clear way to establish the dependency. Omitting the writer would serve as a useful negative control.
I'll keep these paths separate and avoid claiming runtime compatibility until the GPU results are verified.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:24:18Z.
The slot 67 request-to-DXIL step is now on main in #2223. Windows Release passed all 19 selected request and compute checks. The source-built publisher fed the watcher, and the resulting bytecode matched all 320 words on WARP and RTX 4060 Laptop. Swapping the group dimensions changed the readback on both. The startup runtime still creates a placeholder, so this is a fixture result. For the next slot 67 slice, please coordinate with the #2223 author, who noted a runtime follow-up. The acceptance is to construct and bind the real PSO, dispatch through the shim, and read the fenced UAV. A stale or missing compiled entry and a wrong binding should produce distinguishable results. Keep the separate slot 62 work in its existing PR.