shader: gate modules that call xbox.* intrinsics — the AMD compiler faults at a fixed offset #578
Open
opened 2026-11-22 14:14:33 +00:00 by MoonYueya
·
9 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#578
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 MoonYueya on 2026-11-22T14:14:33Z.
Question
should
dxil_retarget.pyrefuse modules that still callxbox.*intrinsics on AMD adapters, and is the intrinsic lowering in #250's follow-up the intended route for them?Evidence so far
Windows 11 build 26300; AMD Radeon integrated (1002:164e), driver 32.0.11024.2, amdxc64.dll 8.18.10.0489; RTX 3080 32.0.16.1742; WARP. Attribution: vectored exception handler, no
d3d12sdklayers.dll.Whole DXBC containers as compute PSOs, one process each, 52 from a packaged DLL: on AMD the 43 whose DXIL declares
xbox.*external functions terminate with0xC0000005atamdxc64+0x2034D4(43/43, one offset); the 9 without them return S_OK. Replacing only the DXIL chunk swaps the outcome, 4/4. Re-serializing the RTS0 chunk, or dropping it for an explicit root signature, still faults at the same offset; NVIDIA takes the same bytes 51/52 (one unrelated 1024-thread container faults inside nvwgf2umx) and WARP passes all. Clearing0x03000000is a precondition: with flags intact, desktop returns E_FAIL before compiling, so the bits cannot be told apart behaviourally.Completion condition
S1: report the intrinsic set from
dxil_retarget.py, no behaviour change; green onctest --preset dev --no-tests=error -R 'dxil_retarget|shader_metadata|dxcontainer_part_offsets' -Vwith the new case. S2: on an AMD adapter, refuse to submit such a module and record why; the fixture reports the refusal instead of faulting the runner. S3, once lowering exists: route these modules there and drop the gate. We can supply the per-container table as a fixture and review patches.Required environment
Windows x64, a physical AMD GPU for S2, no game files.
Checklist
Not ticked: S1 and S2 can be checked with a synthetic module, but the fault itself was observed on console-compiled modules. Desktop dxc cannot emit
xbox.*declarations, so a public repro would need a hand-built bitcode module. We can help build one.Drafted with AI assistance; numbers independently re-checked.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T14:34:10Z.
The Windows submission rule will apply across adapters. Check the final module and reject unresolved Xbox intrinsic calls before PSO submission, reporting the intrinsic names. A module whose calls have been removed or lowered under a defined contract can proceed after validation.
A read-only inventory can land first. Please distinguish declarations, actual calls, and names found only in metadata. For the gate, use source-built synthetic inputs with a recording submission stub: unresolved calls should result in zero submissions, while ordinary or validated lowered modules should submit. An unused declaration or a metadata name alone should not trigger refusal.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T14:56:12Z.
Thanks, that's clear. We'll take the read-only inventory first. The plan:
xbox.*names in three groups: declared, actually called, and seen only in metadata.We'll open a PR here. The gate with a recording submission stub can follow in a separate PR once the inventory lands, unless someone else wants that part.
Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T15:19:10Z.
Progress: the inventory is on MoonYueya:shader-xbox-intrinsic-inventory. It sorts names into declarations, actual calls and metadata string values; named-metadata keys such as
!xbox.compiler.optionsare left out. Before opening the PR we're doing two things: running it over the 52 console-compiled BVH modules we measured earlier, to check that it finds the same split of 43 with calls and 9 without; and running thectest -R 'dxil_retarget|shader_metadata|dxcontainer_part_offsets'set from a full build. The PR follows once both pass.Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T15:36:43Z.
S1 is up as #608: a read-only inventory, no behaviour change. The dev-preset ctest set (
dxil_retarget|shader_metadata|dxcontainer_part_offsets) passes 6/6 from a full build. We also cross-checked it against the 52 modules indocs/experiments.md; it reproduces the 43/9 split there.Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T20:30:12Z.
S2 is up as #690. It checks the module
dxil_retarget.pywould submit with--pso-probeand refuses it while it still calls anxbox.*symbol that nothing has reported as lowered. A refused module names the calls and is never submitted. Declarations and metadata-only names pass, and @descent81's!0 = !{!"call void @xbox.text()"}line from #608 is a negative control. Without--probethere is no disassembly, so the result is recorded asNOT_CHECKEDand nothing is submitted. S3, routing these modules to a lowering, remains open here.Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T21:58:22Z.
S2 merged in #690 at
efc986b. The retargeter now blocks executablexbox.*calls before starting the Windows compute-PSO probe on every adapter, reports the names, and fails closed when the final module has not been disassembled. The regression confirms zero submissions for live calls or missing inventory and one submission after the call is gone. S3 stays open for a verified lowering and revalidation of the transformed module.Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-23T17:25:47Z.
For the record: S2 is on main as you noted (
efc986b, #690), and the gap reported in #733 — the gate still admitted aliases, stores and bitcast-spelled calls — is closed by #734, which blocks every form that reaches anxbox.*builtin rather than only a direct call, and merged on 2026-11-23T03:00Z as81cf1e3. With that, the gate fails closed for live calls and for a missing inventory, and submits exactly once after the call is gone — the regression you described.We are not following S3 (a verified lowering plus revalidation of the transformed module). Doing it honestly needs a working lowering for these intrinsics, which we do not have, so that stage is better served on your side.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-26T04:38:31Z.
This thread has been waiting on a maintainer decision since @MoonYueya said their side is not following S3 (the occupied-slot work is elsewhere; this is the AMD xbox.* compiler-fault question). Recording the state precisely so it can be decided rather than drifting.
What main does today (S2, from #690 and #734): ools/dxil_retarget.py refuses a module that still executes an xbox.* call or whose final-module inventory is missing � it blocks the executable form before the Windows compute-PSO probe, reports the symbol names, and fails closed when the module could not be disassembled (dxil_retarget.py:630, :977, with DEFAULT_DROP_METADATA = ('xbox.compiler.options',)). Your evidence stands: on AMD the 43/52 modules that declare xbox.* terminate at mdxc64+0x2034D4 while the 9 without them return S_OK. The gate turns a driver crash into a refusal, but it does not make those modules usable.
S3 (verified lowering + revalidation) is the only way those 43 become dispatchable, and nobody has taken it.
Decision needed from @R0Y00 � one of:
My read: the 43/52 ratio makes this real work, not a hypothetical, but it is not blocking any current PR, and the gate already prevents the crash. If the answer is (1), I can scope the lowering list from the module names the gate prints and land it as a separate instrumented probe first.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T04:58:22Z.
Defer S3 until a concrete required call is identified, and keep the existing final-module gate on all desktop adapters. S1 and S2 landed through #690 and #734. The 43/52 result is one published hardware comparison, so it does not establish which calls the current startup path needs. If a relevant call is found, scope a first patch to that named intrinsic, compare against independently established semantics in a source-built dispatch, and check every output word on WARP and the affected AMD adapter. The gate should still refuse unresolved calls or missing inventory before PSO creation. A lowered and revalidated module may proceed through the existing gate. No need to remove it or plan a bulk intrinsic rewrite.