startup: gfx2hlsl accepts three compute programs whose descriptor or SCC state differs from program order #2294
Open
opened 2026-11-25 11:08:04 +00:00 by NiiRoZz
·
4 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#2294
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 NiiRoZz on 2026-11-25T11:08:04Z.
Problem
tools/startup/gfx2hlsl.pytracks descriptor words per scalar register in program order and emits nothing foran in-place ALU instruction on a descriptor word. Three source-built gfx1013 compute programs translate without
a refusal on
main(09551998) although the emitted HLSL does not do what the instructions do. Found whileworking on #2274. Each program is assembled with
llvm-mc15 and translated withComputePipelinethrough thehelpers of
tests/startup_gfx2hlsl_compute_check.py(assemble,root_blob, case A'srsrc2, group size2x3x4). Branch operands are dword offsets.
All three share this head: the table pointer in
s[10:11], an eight-word load, a byte address and the data.Gap 1, CONFIRMED: a store at a loop head, with its descriptor registers written later in the loop body.
Result on
main: no refusal. The loop block emitsu0.Store(a, v5);for both passes and the manifest has thesingle line
uav 0 table 1 16. The second pass runs with the descriptor at table offset 0x20 ins[16:19],so its store belongs to another buffer. The same holds when the loop body modifies a word in place instead
(
s_and_b32 s17, s17, 0xffff, branch operand 65529): no refusal, both passes throughu0.Correct: refuse the store, since the registers at the loop head are not the same on every pass.
Gap 2, CONFIRMED: a reload of another descriptor that a branch skips.
Result on
main: no refusal. The join block emitsu0.Store(a, v5);and the manifest has the single lineuav 0 table 1 32. Whens7 < 4the load is skipped and the store runs through the descriptor at tableoffset 0x10 that the head loaded, but the output always writes the buffer at offset 0x20.
Correct: refuse the store (two paths reach it with different descriptors), or emit both targets and select by
path.
Gap 3, CONFIRMED: an SCC read after an in-place ALU instruction on a descriptor word.
Result on
main: no refusal. The output isscc = s7 < 0x00000004u;thens20 = scc ? 0x00000001u : 0x00000000u;, so the stored word follows the compare. The instruction order makes itfollow the AND result of descriptor word 1, which the translator does not know.
Correct: refuse the SCC read (the existing
scc from descriptor datarefusal fits), or emit the SCC of themasked word once descriptor words are available as values.
Observed where: all three are wrong in the emitted HLSL and manifest only, judged against the instruction
semantics. No wrong output was observed on a GPU read-back. The compute read-back runner binds its own buffers,
so a GPU run would only repeat what the HLSL says; console behaviour is not measured. No count of affected
real programs is claimed.
Proposal
One claimable item per gap, each inside
gfx2hlsl.pyplus a pure-Python control. Each control is the programabove: it must be refused after the fix, and it translates on
main, so the control fails onmain.target. Acceptance: both gap 1 programs are refused; the same loop without a write to
s[16:19]stilltranslates and stores once per pass.
way #2279 drops scalar constants that another path writes. Acceptance: the gap 2 program is refused; the
same program with the reload before the branch still translates with
uav 0 table 1 32.SCC write, and a read of it is refused. Acceptance: the gap 3 program is refused; the same program with the
compare after the AND still translates. Check
s_cselect,s_cmovands_cbranch_scc0/1as readers.Items 1 and 2 may turn out to be one join rule; whoever takes one should say so and take both.
Alternatives
path writes the descriptor registers, which translate correctly today.
manifest line per target; refusing first is the smaller step and loses nothing that is right today.
have.
Verification
mainat09551998,llvm-mc15.lines.
ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_compute_'andpython -B tests/startup_gfx2hlsl_compute_check.pystill pass.Checklist
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T11:12:38Z.
I'll take item 3 (a stale SCC after scalar ALU on descriptor data). I'll use the reported compute program and paired source-built controls for conditional selects, conditional moves and both branch polarities, including a fresh comparison before the read. I'll check that a write reached on only one branch cannot clear the refusal for the other path. Items 1 and 2 remain with the descriptor-join work.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T11:47:10Z.
Item 3 landed in #2305. I also checked the two remaining items against #2292 at
78a1cd09and main at209938b0. The programs below use the shared source prefix from this issue, compiled for gfx1013 with LLVM 15.0.7, and the normal case-A ComputePipeline entry point.I also ran the committed #2292
binary,dispatchandcontrolcases. The recorded words matched LLVM 15's integrated assembler. With DXC 1.9.2609.5, WARP 10.0.26100.9711 and desktop RTX 4060 driver 32.0.15.9579 both matched all 320 words of the same-slot loop, with values 1 and 2 for each of eight lanes. The OUTSIDE control returned 3 in all four channels on both. Both local adapters reported the debug layer unavailable.These are the reported source-built cases and their paired controls. With #2292 covering them, I see no need for a second implementation of items 1 and 2.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T12:09:42Z.
#2305 and #2292 are both on
main. The exact #2292 candidate tested in the report above is the one that merged, so the three source-built gaps now have coverage. The combined join, SCC and offline-cache checks passed locally, and the graphics and compute cache revisions advanced. Is anyone already collecting the remaining before/after refusal census requested here? For one matched cache, counts by newly refused reason are enough. Please keep the shader bytes and raw reports local.Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T17:32:40Z.
I ran the before/after refusal census on one matched cache. In this cache neither #2305 nor #2292 turned a request with no recorded refusal into a refused one. The new reasons land on requests that were already refused.
Setup
a6d2c5e6(before),a7353044(#2305),5074371f(#2292). #2305 and #2292 are the only commits in this range that touchtools/startup/gfx2hlsl.py.refusals_report(the function behind--refusals) on a copy of a local cache: 593 graphics request keys and 2,689 compute requests. Slot 57 mesh requests are not examined.pipeline_keyandcompute_keyto 9. Lowering code is unchanged. No key-mismatch refusal in any run.X2W_*variables set. No fxc/DXC compile and no GPU read-back.Totals
a6d2c5e6scc from descriptor datareason at #2305joined at a branch targetreason at #2292Reasons added at #2305 (requests per reason; one request can count in several rows). No reason was removed at this step.
scc from descriptor data in ...psvss_cbranch_scc0s_cbranch_scc1s_cselect_b32s_cselect_b64s_mov_b32s_or_b32s_add_u32s_and_b32s_addc_u32s_mul_i32Join reasons added at #2292
psvsnumeric use of sN holding joined at a branch targetdescriptor operand s[N:N] holds ('joined at a branch target',)s_load through sN holding ('joined at a branch target',)buffer store through s[N:N] holding ('joined at a branch target',)s_addk_i32 on joined at a branch target data#2292 also adds some non-join reasons and removes others (the largest removal in compute is
numeric use of sN holding ptr, 219 requests).It also changes the SCC picture: of the requests that gained an SCC reason at #2305, 126 of 147 graphics and 11 of 112 compute show no SCC reason after #2292. All 126 graphics requests and 9 of the 11 compute requests gain a join reason at that step. I did not trace why.
Limits
internal errorentries on already refused requests (notranslator crash). The per-reason counts above are therefore less reliable than the totals.mainhas moved since5074371f(28 later commits touchgfx2hlsl.py); these numbers do not describe currentmain.AI-assisted (Claude Code).