help wanted: GPU translation, part 4 (compute shaders) #2015
Open
opened 2026-11-24 23:18:16 +00:00 by denn0x
·
28 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#2015
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-24T23:18:16Z.
Compute programs (gfx1013) that the startup compute translator still refuses. Each row is an independent piece of work for one pull request with a source-built or hand-assembled fixture. Counts are aggregate numbers from a private run (dispatches skipped per 300 frames of one scene / distinct programs); they only rank the items.
Items (pick one, say so in a comment)
buffer_load_format_xand wider, indexed)buffer_store_format_xyzw, d16 forms)v_writelane_b32,s_cselect_b32,s_cmp_eq_i32on a descriptor word or descriptor count)v_bcnt_u32_b32image_gather4_ls_ff1_i32_b32/s_ff1_i32_b64of a general scalar (not exec)v_cmp_ne_i32in some operand forms,s_bcnt1,v_mbcntover a mask, avcc_hioperandds_appendWhat a pull request needs
Existing issues cover neighbouring areas and are not repeated here: #1541 (LDS and barriers), #1543 (DPP and cross-lane), #1544 (entry layout), #1545 (image stores and atomics), #1546 (lane-pattern masks), #1412 (running compute pipelines).
Other parts: #1996 (pixel shaders), #1998 (mesh shaders), #1999 (render state and indirect draws).
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-24T23:28:27Z.
I'd like to take item F from this list: s_ff1_i32_b32 / s_ff1_i32_b64 of a general scalar (not exec) in the startup compute translator.
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by archielcqp-a11y on 2026-11-25T01:20:54Z.
I'd like to take item A, formatted buffer loads through a heap descriptor, in
tools/compute_store_aot.py. Before writing code, here is the scope I propose. Please correct it if it is not the cut you want.There are two separate gaps. The compute profile resolves a descriptor only at a static table offset. Its formatted loads are gfx1030 only, with the format stated by the caller (
--source-format). Item A needs both of these to become run-time values. I'd split them into two pull requests.Slice 1 (first PR): the format switch. This mirrors the store path from #1542 (
--descriptor-format-constant,store_descriptor_format).Forms: gfx1013
buffer_load_format_{x,xy,xyz,xyzw}and thed16_forms,idxenonly, through the existing static t0 source binding with its stated stride.Format input: V# word 3 comes from a ready
s_buffer_loadconstant word that the caller names, one per formatted load, in program order.Decode: one HLSL
load_descriptor_format(formatWord, addr, channels, d16)reads FORMAT (bits 18:12) and accepts the same fixed bits as the store path: the GFX10 identity0x01000FACand the legacy DFMT/NFMT identity0x00000FAC. It handles the same format set as the stores:8_8_8_8_UNORM,16_16_UNORMand10_10_10_2_UNORM;16_16_FLOATand16_16_16_16_FLOAT;Conversion:
x / (2^n - 1);max(x / (2^(n-1) - 1), -1);f16tof32;I'll cite the RDNA 2 ISA (§8.1.4 and §8.1.8) and Mesa's
ac_build_buffer_load_format/ac_nirlowering for each rule. The PR will name any rule I cannot tie to a source.Open question, opcode wider than the format (for example
xyzwon32_FLOAT). D3D and Vulkan fill missing components with (0, 0, 0, 1). I have not found an RDNA statement of what the format unit returns. My proposal is that the slice handles only opcode widths no larger than the format, plus fixed bits and formats from the table. Anything else returns 0 in every component, and the docs list that zero result as a known gap, not as hardware behaviour. If you would rather have the (0, 0, 0, 1) fill with a citation, or the dispatch treated as invalid, I'll do that instead.Fixture: source-built gfx1013 assembly in LLVM 15 spelling, with readback on WARP and hardware. It loads every format through each opcode width it accepts, with record bytes that put sign bits, tie values and denormal halves in each field.
offen, a format word left unused, and the existing static-format flags combined with this one.Slice 2 (later PR, design only for now): the descriptor from the heap. The 204 programs take the descriptor itself from the heap at run time, so slice 1 alone unblocks none of them. Slice 2 needs:
ResourceDescriptorHeap[index](SM 6.6);num_recordsfrom word 2, with out-of-range indices returning 0.This overlaps the dynamic heap indexing in #1143, so I'd coordinate with that work before starting, and keep slice 2 out of the first PR.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:23:25Z.
Picking up Item A (buffer_load_format from runtime heap descriptor in compute) with WARP readback tests.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:24:41Z.
Two item A claims came in. Please split them along the existing proposal: @archielcqp-a11y can take the format decoder on one static t0 binding first, and @tedin7 can take the heap-descriptor retrieval and its bounds/lifetime controls, building on that decoder instead of duplicating it. Please confirm that split here. For the first slice, start with matching format/opcode widths and ordinary word results. An unsupported format or over-wide opcode must be refused or report a distinct invalid outcome before any valid-looking output is published. Zero data from a valid read needs to remain distinguishable. D16 can follow with integer versus float handling and a format-specific rounding or conversion control. Keep the existing static and gfx1030 paths as regressions. Neither slice alone should be counted as application coverage until it is used in a real dispatch.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:27:44Z.
Yielding Item A (slice 1) to @archielcqp-a11y who claimed it 3 minutes earlier — we have not opened a PR for it.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:41:00Z.
Confirmed on Item A split: we will wait for @archielcqp-a11y Slice 1 static format decoder before building Slice 2 (heap-descriptor retrieval + bounds/lifetime controls) on top of it. Meanwhile picking up Item G (compute ALU & compare gaps:
v_cmp_ne_i32,s_bcnt1,v_mbcnt,vcc_hi) with WARP readback tests.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:43:32Z.
Also picking up Item C (scalar holding a descriptor word used numerically in
compute_store_aot) as a separate PR with WARP readback tests.Imported from R0Y00/Xbox2Windows. Originally posted by archielcqp-a11y on 2026-11-25T02:04:22Z.
Confirming the split, @R0Y00, and thanks @tedin7 for yielding. I keep the format decoder on one static t0 binding. tedin7 builds the heap-descriptor retrieval and its bounds and lifetime controls on top of it.
Slice 1 is #2150. It is now updated to the rules above (
95d75de):DST_SEL), or a narrower or wider opcode makes the load invalid. Every load is staged before the first store, and an invalid load returns before any store. So u0 stays unwritten, and a valid read of zero data stays distinguishable. Four GPU runs check this on WARP and an RTX 3080, with zero-fill and (0, 0, 0, 1)-fill references that must fail.@tedin7, the decoder is
load_descriptor_format(formatWord, addr, channels, out bool valid), fromdescriptor_load_hlsl()intools/compute_store_aot.py. The heap slice can pass the view's word 3 where this slice passes the constant word.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T02:24:29Z.
Item A slice 1 landed in #2150 (
c118f569). The exact candidate passed Windows Release controls, WARP and RTX 4060 Laptop. Wrong format, mismatched opcode width and unsupported fixed bits leave the output sentinel untouched. A valid zero-valued load writes its result. @tedin7 can now build the agreed heap-descriptor lookup and range/lifetime controls on this static decoder. Tests and commandsImported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:47:09Z.
#2150 merged; starting Item A Slice 2: runtime heap-descriptor retrieval + bounds/lifetime controls for formatted buffer loads.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T04:52:04Z.
I’ll take a first slice of item B on Windows with LLVM 15 and WARP. I’ll start with indexed
buffer_store_format_xyzwfor a four-component 32-bit UINT view. The source-built fixture will select a view record at run time and check the bytes written through u0, including the untouched adjacent output. Two valid records with different base offsets should produce distinct readbacks. Released views and out-of-range indices should leave the output sentinel intact.This builds on the store packing in #1683 and the record layout proposed for loads in #2174. I’ll prepare the independent fixture and reference first, and coordinate the shared layout with #2174 before wiring it into the translator. The first slice uses a fixed destination resource and a run-time view record. The SM 6.6 heap resource binding and D16 stores remain separate work.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T05:21:21Z.
Item B's initial UINT4 store and its source-built fixture are on this integration branch, based on #2174. LLVM 15 assembled and decoded the gfx1013 program, and the CLI emitted the same HLSL as the assembly source. On WARP, 12 cases matched the full 320-word reference and all seven shader mutations produced a readback mismatch. The partial-texel case caught an important detail during implementation: the root UAV has no size field, so the binding now supplies the writable u0 extent separately from the t0 table size. Fork integration CI
Once #2174 is on main, I’ll open the store-only diff against it.
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T05:48:01Z.
I'd like to take item E, image_gather4_l in the compute translator. If someone already has it in progress, I'll step back and review.
Scope: 2D, explicit LOD, constant sampler, following the fixed-mip gather slice in #1927 (view-relative mip, component order). Comparison, offset and cube gathers stay refused.
Evidence: source-built compute program assembled with LLVM 15 for gfx1013, synthetic texture with distinct texels per mip, UAV readback on WARP and an RTX 3070. Negative controls: the wrong mip and swapped gather order must fail; the guard removed must fail.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:20:21Z.
Item B now has its first UINT4 store in main (#2224). The final suite passed 12 GPU cases and all eight intended negative controls on both WARP and RTX 4060 Laptop. The profile writes through one bound raw UAV and checks the full 16-byte texel extent. For item E, roansystemlabs, please proceed with the 2D explicit-LOD slice from your claim. Pin the supported LOD behavior and include a nonzero view-relative mip with distinct texels, plus wrong-mip, swapped-order and removed-guard controls. Leave comparison, offset and cube cases out of this slice. A reproducible LLVM 15 command and WARP/hardware readback command in the PR will make the review straightforward.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T06:25:18Z.
I'll take the packed D16 follow-up to item B for one destination format:
buffer_store_format_d16_xyzwfrom two VGPRs to a runtime-selected32_32_32_32_FLOATview. LLVM 15 assembles and disassembles this exact gfx1013 form, and the current heap-view route refuses it. The fixture will check four distinct half values expanded in low/high VGPR order, literal expected output words, and a FLOAT-versus-UINT view control. I'll reuse the bounded 16-byte store and verify the existing UINT4 cases alongside it on WARP and hardware.Imported from R0Y00/Xbox2Windows. Originally posted by Vladimir-Human on 2026-11-25T12:50:11Z.
Claiming a narrow Item B follow-up in \ ools/compute_store_aot.py: \uffer_store_format_d16_x\ into \32_FLOAT\ side-table heap views (extending #2230). Leaving #2274\ item A's \gfx2hlsl.py\ path untouched. PR incoming with WARP + hardware readback tests and refusal controls.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T13:24:15Z.
I’ll take the two-channel packed store in item B for the existing standalone
compute_store_aot.pyheap-view profile. The slice isbuffer_store_format_d16_xywith one packed VGPR and a live32_32_FLOATdestination. I’ll check the low/high half ordering, an eight-byte range ending at the output boundary, and wrong-format/short-view guards with source-built bytecode and WARP and hardware readback. This follows the FLOAT1 work in #2340 and the earlier FLOAT4 fixture. The separate startup translator item in #2274 stays available.Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T13:55:50Z.
Following #2361, I will take the remaining packed three-component form in the stand-alone item B heap-store fixture. LLVM 15 assembles and decodes
buffer_store_format_d16_xyz v[10:11], v8, s[20:23], 0 idxen offset:4. AMD's RDNA 2 format table lists 74 as32_32_32_FLOAT; the identity descriptor word is0x0104afac. I will verify the two halves of the first VGPR and the low half of the second, including a poisoned unused high half, 12-byte bounds and guard readbacks on WARP, NVIDIA and Intel. The destination is a three-component FLOAT view in the existing raw-buffer experiment. AMD format tableImported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T00:01:01Z.
Refreshing my earlier claim on Item F:
s_ff1_i32_b32/s_ff1_i32_b64of a general scalar (not onlyexec_lo) intools/startup/gfx2hlsl.py.Plan: keep the existing compute-entry
exec_lospecial-case; add the general-SGPR / immediate forms matchingpixel_aot(firstbitlow, and the 64-bit lo-then-hi scan). Lane masks and descriptor sources stay refused. One focused PR, hand-assembled fixture with a negative control, Linux CPU evaluation.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-26T02:59:10Z.
I'll take the compute
global_load_dword vdst, vaddr, s[base:base+1] [offset:imm]slice (#2618ticketC500-01/031) intools/startup/gfx2hlsl.py:global_load_dwordin thecsstage whens[base:base+1]holds a proven 64-bit root buffer pointer (('ptr', ('root', index))/ptr_high_symbol, direct, copied, or literal-advanced vias_add_u32+s_addc_u32),vaddris a 32-bit vector byte offset, and optionaloffsetis a signed 12-bit immediate (-2048..2047), withcheck_encodingrejecting unprintednv/data/ reserved bits. Keepoff(64-bit vaddr), wider/sub-dwordglobal_load_*,global_store_*,global_atomic_*,lds, non-compute stages, and incomplete/unproven pointer pairs refused.tests/startup_compute_global_load_check.py) with 320 distinguishable adjacent words, varying per-lane offsets and scalar bases, LLVM 15 round-trip encodings, and D3D12 readback + negative controls on WARP and Radeon RX 9070 XT.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-26T03:15:25Z.
Opened #2715 (https://github.com/R0Y00/Xbox2Windows/pull/2715) for the compute
global_load_dword vdst, vaddr, s[base:base+1] [offset:imm]slice (#2618ticketC500-01/031) claimed above — verified on WARP and Radeon RX 9070 XT with 6 DXCcs_6_0dispatches, 5 negative HLSL mutations, and encoding/provenance refusal controls.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-26T06:18:40Z.
Fresh compute refusal counts on
main0827f43c, and a claim: SGPR spills in computeOne local 300 s run (Windows 11, RTX 2070,
run.ps1 -Render -Translate -HostCpu -MemoryGiB 12, no crash, ExecuteIndirect calls all 0), thengfx2hlsl.py --pendingover the cache. First refusal reason per slot-67 compute request, 2,575 requests:v_readfirstlane_b32requires a proven uniform sourcev_cmp_gt_i32_e64in an execz block:vcclive at the joins_andn2_b32in an execz block: lane mask live at the joins_loadof a resource-heap record whose index is read from a bufferTG_SIZE_ENrequires at most N threads per groupimage_storedmaskv_writelane_b32is lowered in pixel and mesh stages onlys_mov_b32in an execz blocks_bfm_b64src_sccnot provenimage_storeon a non-2D viewThese are first reasons only: a request refused here may hit others behind it.
Claim: constant-lane SGPR spills (
v_writelane_b32/v_readlane_b32) in compute, stacked on @tedin7's #2712 (samespill_operandslines; I will build on it rather than conflict, and only after it settles). The 68 requests come from 68 distinct wave32 programs with branches and loops, constant lanes only. Acceptingcsalone wins nothing, because every one of them spills a descriptor, a pointer or a lane mask, not a plain number. Measured on a scratch copy:csallowed: 65 then refused on "source holds lane mask or descriptor", 2 on a heap-records_load, 1 on lane ≥ 32;s_nand_b32on a lane mask (#2030).Plan, one PR each: (1)
csspills of descriptor and pointer words, keeping the tracked symbol across the reload with the existing write-before-read proof, so that the reloaded descriptor still counts as proven for the formatted load; (2) lane-mask spills, the reload restoring the mask. Source-built gfx1013 fixtures with negative controls; WARP and RTX 2070 runs on my side.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T17:53:47Z.
Claiming a new compute item:
image_storeonSQ_RSRC_IMG_3DandSQ_RSRC_IMG_1D, translator plus runtime binding. Todaytools/startup/gfx2hlsl.pyrefuses both withimage_store on SQ_RSRC_IMG_3D|1D: only 2D images are lowered.Measured on a local capture (counts and instruction shape only):
b505c32: 29 requests stop at the 3D form and 7 at the 1D form.6ee878d8, no inputs. Every graphics pipeline the runtime looked up was translated. Seven compute keys dispatch with no translation. The three most dispatched account for 18,172 of those 18,187 dispatches:image_store v[8:11], <address>, s[..] dmask:0xf ... unorm. The address isv[2:4]for the 3D image andv0for the 1D images. The 3D program's other image accesses are twoimage_loadon 2D images; the 1D programs have none.b505c32, the 3D refusal was hit 16 times over 15 requests: 13 withdmask:0xf(7 tuple address, 6 NSA), 3 with partial dmasks (2 of themd16). Partial dmasks stay refused here.Plan, translator:
image_storewithdmask:0xfon a 3D image toRWTexture3D<float4>with a 3-component address, and on a 1D image toRWTexture1D<float4>with one component.op_image_store: format,unorm, address tuple or NSA form, fixed-table descriptor), add the two kinds to the UAV declarations, and emituav N tex3d|tex1d ...in the manifest.d16forms seen.Plan, runtime:
uav N tex3d|tex1dinsrc/startup_stubs/d3d12_compute_dispatch.inl. The slot needs a dimension kind, not only the array flag.D3D12_UAV_DIMENSION_TEXTURE3D/TEXTURE1Dnext to the 2D and 2D-array branches, checking the resource dimension, the mip and, for 3D, the W range.Tests:
Prior art in the offline tool
tools/compute_store_aot.py: 3D stores (#1649) and the 1D slice claimed in #1545.tests/compute_check.cppalready reads back 1D and 3D UAVs. I will reuse that readback.@NiiRoZz, binding
tex3dandtex1dUAVs is part of your "Texture UAVs" item in #2274 (uav N tex1d|tex2d|tex2da|tex3d). The 2D and 2D-array views are on main through #2532, and I found no PR, commit or comment ontex3d/tex1d. I am taking over that part since there has been no activity on it for 2 h; I will hand it back if you resume.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T21:21:58Z.
Claiming a new item for
tools/startup/gfx2hlsl.py:v_pk_max_f16andv_pk_min_f16, which have no handler today. They are refused by name.Measured on a local capture (counts and instruction shape only):
6ee878d8plus #2902: 4 requests stop atv_pk_max_f16and 2 atv_pk_min_f16.v_pk_max_f16. The run reports them as untranslated, and the offline translator names the instruction.v_pk_max_f16 vN, vN, 0 op_sel_hi:[..];v_pk_max_f16 vN, <literal>, vN;v_pk_max_f16 vN, vN, sN;v_pk_min_f16 vN, <literal>, vN.Plan:
Handlers: add both through the existing
packed_halfhelper, per lane, with the min/max ruletools/pixel_aot.pyalready uses (minmax16_num, added to the gfx2hlsl preamble): one NaN returns the other operand, and mixed zeros give-0for min and+0for max. NaN is tested on the binary16 encoding, not with a floatisnan().Sources: accept the kinds the real forms use, with the packed-source rule that
pixel_aot.pyimplements invop3p_f16_word:0;Sources are whitelisted (single VGPR,
sN,0x…,0) before they are read.op_selpicks the low or high half for the low result, andop_sel_hifor the high result.What is new ground:
pixel_aot's draw fixture covers a literal only with default selectors and SGPRs only on add and fma. A non-default selector on a literal or SGPR is not yet covered, and the tests below cover it. The PR also updates thepacked_halfdocstring, which today calls these sources unproven.Kept refused:
neg_lo/neg_hi/clamp;The existing non-VGPR refusal stays for
v_pk_add/mul/fma_f16.Tests:
op_sel/op_sel_hiroles, and one that usesmaxformin. Both must change the result.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T21:36:56Z.
Follow-up claim to #2927: let
v_pk_add_f16,v_pk_mul_f16andv_pk_fma_f16take the same non-VGPR sources that #2927 accepts for min and max:0.The half that
op_sel/op_sel_hiselects follows thevop3p_f16_wordrule intools/pixel_aot.py.Measured on a local capture (counts and instruction shape only):
v_pk_max_f16. #2927 moves it past that, and it then stops atv_pk_mul_f16with a hex literal source.v_pk_max/min_f16stop next atv_pk_mul_f16with a hex literal;v_pk_mul_f16with an SGPR source.Plan:
f16tof32of the selected half,f16rnof the result.v_pk_fma_f16);neg_lo/neg_hi(3 census requests onv_pk_add_f16, a separate item);clampand other modifiers.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-27T22:56:49Z.
I'm taking the remaining pixel-stage case where a heap image descriptor word is read as a number. #2161 already covers compute raw
num_records, and this is the image-word slice that's still refused. I'll add a source-built fixture intools/startup/gfx2hlsl.py, keep every other descriptor word refused, and open a PR against main.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T12:29:17Z.
Releasing my claim of 2026-11-26 on SGPR, hex and inline
0sources forv_pk_add_f16,v_pk_mul_f16andv_pk_fma_f16; draft #2930 is closed.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T17:21:28Z.
Taking back one part of the claim I released above:
v_pk_mul_f16with a 32-bit literal source intools/startup/gfx2hlsl.py.packed_halfrefuses it withoperand ... is not a single VGPR(tools/startup/gfx2hlsl.py:10116-10117onmain26df1826). The native compute frontend already accepts a literal there (src/gfx1013_direct_compute.inl:1684-1691).0sources,v_pk_add_f16andv_pk_fma_f16stay refused, with controls. One small PR, referencing #2930.I'm working on this.