help wanted: GPU translation, part 5 (vertex and pixel pipelines) #2016
Open
opened 2026-11-24 23:18:17 +00:00 by denn0x
·
24 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#2016
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:17Z.
Ordinary vertex + pixel pipelines that
tools/startup/gfx2hlsl.pystill refuses. Each row is an independent piece of work for one pull request with a source-built or hand-assembled fixture. Counts are distinct pipeline requests from a private cache (first refusal only; closing one row exposes the next for some requests).Items (pick one, say so in a comment)
buffer_store_dwordx3, and behind it formatted loads through a descriptor taken from a heap at run timebuffer_load_format_x/_xy/_xyzwhere the format comes from the third buffer-descriptor wordv_readfirstlane_b32without a proven uniform sourced16modifier)v_cvt_f32_u32with an SDWA multiply-by-two destination modifierimage_sample_c_lzwith sampler fields the translator does not model (mip filter, upper bits of the third sampler word)16_16_SNORM(76),8_8_8_8_UINT(30),2_10_10_10_UNORM(22)v_min_u32with a DPP controlv_xor3_b32s_bitset1_b32v_cvt_pk_u8_f32Items already listed in part 1 (#1996) are not repeated:
v_subrev_f32with DPP,image_storein a pixel stage, the pixel-stage entry registers.What a pull request needs
tests/startup_gfx2hlsl_*_check.pyandtests/startup_translator_check.pystill passing.Related: #1723 (refusal census over an offline archive), #1978 (a census mode that reports every refusal site, not only the first).
Other parts: #1996 (pixel shaders), #1998 (mesh shaders), #1999 (render state and indirect draws), and the compute part filed alongside this one.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-24T23:33:49Z.
I'll take item E (
v_cvt_f32_u32and the float-resultVEC_U_TO_Fconversions in SDWA form with output modifiersclamp,mul:2,mul:4,div:2). I'll apply the output modifier and clamp in hardware order (scale first, saturate second, then bitwisedst_sel/dst_unusedplacement), keepVEC_Uinteger/uint-result conversions and float source modifiers refused, and verify with constructed SDWA encodings, negative controls, and desktop GPU readback.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:09:43Z.
I'll take three small items in
tools/startup/gfx2hlsl.py, one pull request each:v_xor3_b32: same semantics as the compute lowering in #1573, with a source-built fixture whose three sources differ in every byte and a negative control that drops the third operand.16_16_SNORMbuffer format only (the other two formats stay open): an entry next toBUF_FMT_16_16_UNORM, with -32768 clamped to -1.0 per the D3D/Vulkan SNORM rule, and controls on 0x8000, 0x8001, 0x7fff and 0.v_cvt_pk_u8_f32: byte select from src1, insertion into src2, rounding and clamping cited from LLVM 15 and checked against the existingcompute_store_aotform if there is one.Each keeps refusing what its fixture doesn't cover.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:14:26Z.
Item I is up in #2097 (
v_xor3_b32, extendsstartup_gfx2hlsl_bit_alu_check.py). Item G is up in #2099 (16_16_SNORMonly, extendsstartup_vertex_fetch_formats_check.py). Controls and the llvm-mc fixture checks pass on Linux; the_warp/_hardwaredraws still need a Windows run. Item K is in progress.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T00:17:34Z.
Item E is on main in #2062 at
7aa3b53c. The Windows rerun used FXC and DXC on WARP and RTX 4060 Laptop. Each draw matched 1,024 reference words, and all five output-modifier or destination-selection controls produced the expected mismatch. The remainder of this issue still has its own rows and claims.Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:21:45Z.
Item K is up in #2101 (
v_cvt_pk_u8_f32, same restriction on S0 as the compute lowering: +0.0 or an integer in 1..255; constants outside are refused). Controls pass on Linux; the_warp/_hardwaredraws still need a Windows run.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T00:41:55Z.
Item G is on main via #2099 (
246a875d). I reran the corrected SNORM readback at0832296eon WARP and RTX 4060 Laptop. Both checked all 12 formats, 16 vertices each, with CPU byte decoding and nine compiled mutations. The typed-buffer route and DXGI format 37 mapping are in that PR; other format rows stay open.Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T00:58:09Z.
I'll take item D (
image_loadwithd16at mip level zero intools/startup/gfx2hlsl.py). I'll narrow enableddmaskcomponents fromLoadto IEEE binary16 with an integer round-to-nearest-even helper (avoidingf32tof16truncation toward zero on normalized depth values) and pack them pairwise intoceil(popcount(dmask) / 2)destination VGPRs, keepimage_load_mipandimage_sample*d16forms refused, and verify with constructed MIMG encodings, negative controls, and desktop GPU readback againstDXGI_FORMAT_R16_UNORMandDXGI_FORMAT_R32G32B32A32_FLOATtextures on WARP and hardware.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:10:53Z.
There is an overlapping item D implementation in #2119. Please coordinate there before starting a second base-load implementation. The common acceptance needs the bound view type, since float/normalized and integer loads require different conversion, and an input whose ties distinguish binary16 nearest-even from truncation. A source-built mip-zero normalized/float comparison can land first; keep mip and integer forms pending until the same contract is proved. Item I is on main in #2097; the source-built third-input omission fails the translated GPU check on WARP and RTX 4060 Laptop.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:23:27Z.
Picking up Item B (buffer_load_format_x/xy/xyz format from runtime descriptor) with WARP readback tests.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T01:29:28Z.
Item D is up in #2139 (
image_loadwithd16at mip level zero, verified with DXCps_6_0and FXCps_5_1againstR16_UNORMandR32G32B32A32_FLOATtextures and six negative controls on WARP and RX 9070 XT).AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:40:58Z.
Picking up Item H (
v_min_u32with DPP control) and Item L (lane mask derived from descriptor data) as two separate PRs with D3D12 WARP readback tests.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:42:18Z.
Update: deferring Item H (
v_min_u32DPP) until one of the open DPP base PRs (#2038/#2140/#2141/#2143) lands onmainto avoid stacking a conflicting DPP base. Continuing with Item L.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:47:10Z.
DPP base landed via #2141/#2143; resuming Item H: v_min_u32 with DPP control.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T03:41:00Z.
I’ll take the
8_8_8_8_UINTvertex-fetch format in item G. I’ll extend the source-built fixture to check four unsigned channels at unaligned addresses and add a negative control for the channel decoding.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T04:46:23Z.
Item D’s level-zero D16 load is on
mainin #2139 (ca905008). Independent Windows Release verification passed 10/10 on WARP and RTX 4060 Laptop, including both R16_UNORM double-rounding inputs, the odd-dmaskupper-half controls, and refusal of unsupported bound SRVs. If a remaining request uses D16 with a selected mip or an integer view, keep it as a separate reproduction under item D. The other rows remain open.Imported from R0Y00/Xbox2Windows. Originally posted by ArnabSaga on 2026-11-25T08:57:09Z.
I'd like to take the
2_10_10_10_UNORMvertex-fetch format in item G.I'll build on the existing vertex-fetch format table and source-built verification fixture, verify the packed component ordering against LLVM 15 and AMD format definitions, and test normalization, unaligned reads and all four output components on WARP and physical hardware. Negative controls will cover incorrect bit shifts, channel ordering and normalization divisors.
The other buffer formats remain outside this slice.
Imported from R0Y00/Xbox2Windows. Originally posted by ArnabSaga on 2026-11-25T10:18:33Z.
After checking the existing pull requests, I found that #2006 already covers the
2_10_10_10_UNORMformat. I'll withdraw my proposed claim to avoid duplicating that work and investigate another available slice instead.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T14:31:02Z.
The descriptor-driven
buffer_load_format_x/xy/xyzslice landed in #2138 (a31f70a1). In the independent Windows test, both WARP and RTX 4060 Laptop kept the target clear for missing descriptor metadata, unsupported FORMAT and unresolved storage. With a valid descriptor, zero and one drew black and red. The translated readback passed 17 cases and detected 19 mutations on each adapter.Build
offscreen_checkandstartup_stream_consumer, then runctest --preset release --no-tests=error -j 1 -R '^startup_(vertex_fetch_formats_|mubuf_descriptor_)' -V. This evidence is for the formats in the implemented table. The rest of the pipeline inventory stays open.Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T19:50:52Z.
I'll take an Item F comparison-sampler slice for
image_sample_candimage_sample_c_lzintools/startup/gfx2hlsl.pyandsrc/startup_stubs/translated_sampler_bindings.h:SQ_TEX_CLAMP_BORDER(6) alongsideSQ_TEX_CLAMP_LAST_TEXEL(2) in X and Y with fixedSQ_IMG_SAMP_WORD3BORDER_COLOR_TYPE(TRANS_BLACK,OPAQUE_BLACK,OPAQUE_WHITE), keepingBORDER_COLOR_TYPE == REGISTER, half-border/mirror-once-border modes, and standalonepixel_aotchecks refused. I'll include source-built D3D12 draw readback (in-bounds, out-of-bounds, and bilinear border-edge blending across border colors) and negative controls on WARP and AMD hardware.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T20:29:50Z.
Item F slice (
CLAMP_BORDER+ fixedBORDER_COLOR_TYPEforimage_sample_c/image_sample_c_lzand static/dynamic sampler decoding) is up in #2549 (016c68ad), verified with DXCps_6_0and FXCps_5_1across in-bounds, out-of-bounds, mixed-axis, bilinear border PCF, and four negative-control mutations on WARP and Radeon RX 9070 XT.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T20:58:54Z.
I'll take the Item D explicit-mip follow-up: lowering
image_load_mipwithd16intools/startup/gfx2hlsl.py(2D, 3D and 2D-array views) on top of #2139'spack16_d16(pack16_rne+pack16_unorm16),d16srv <index> exactSRV validation, and odd-dmaskupper-half tracking, keeping computed16,a16andtferefused. I'll include source-built multi-mip D3D12 readback (includingR16_UNORMandR32G32B32A32_FLOATacross mips and slices) and negative controls on WARP and AMD hardware.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T21:31:47Z.
Item D explicit-mip follow-up (
image_load_mipwithd16on 2D, 3D and 2D-array views intools/startup/gfx2hlsl.py) is up in #2575 (28e58482), verified with DXCps_6_0and FXCps_5_1across two-mip (8x2+4x1) 2D and two-slice 2D-arrayR16_UNORMandR32G32B32A32_FLOATtextures, odd-dmaskupper-half poison checks, and 14 GPU negative-control mutations on WARP and Radeon RX 9070 XT.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:57:47Z.
Claiming Item J (
s_bitset1_b32, and the natural pairs_bitset0_b32) intools/startup/gfx2hlsl.py.Plan: one focused PR on
mainate3dda42b. Port thepixel_aot/ #1579 lowering (D = D \| (1u << (S0 & 31))/ clear form), refuse lane-mask and descriptor destinations, hand-assembled SOP1 fixture with a negative control that fails when the lowering is disabled. Pure-Python CPU evaluation of the translated text; Windows WARP/hardware draws left for an independent retest if wanted.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T01:20:38Z.
@tedin7 taking over Item L since there has been no activity on it for 2 h (claimed in your 2026-11-25 01:40Z comment, last mentioned at 01:42Z; no PR, commit or comment on it since); will hand back if you resume.
On my local capture (counts and instruction shape only), 42 requests stop at
mask from descriptor data, with 43 refusal hits between them:s_mov_b64 vcc, s[n:n+1]wheres[n:n+1]holds descriptor words. In each, the first later references tovccors104..s107ares[104:107]as the descriptor operand ofs_buffer_load_dword*. Over all 43 hits, only one has any later write ofvccors104..s107. This looks like the compiler assembling a four-dword buffer descriptor whose upper half sits ins106/s107, whichvccaliases.s_mov_b64 exec, s[n:n+1]from descriptor data.Plan:
Record
s_mov_b64 vcc, s[n:n+1]from descriptor data as the descriptor symbols ofs106/s107and emit no code, reusing the #2057 path fors_loadintos[104:107], so thats[104:107]resolves to the same descriptor as the source registers.Keep it refused on any read of that
vccbefore it is overwritten, explicit or implicit:v_cndmask, the carry-in ofv_addc_co/v_subb_co/v_subbrev_co,v_div_fmas;vcc/vcc_lo/vcc_hisource operand of any scalar or vector instruction (VOPC e64, SDWA,s_and_saveexecand the like);s_cbranch_vccz/vccnz.The only accepted read is
s[104:107]as a descriptor operand.execfrom descriptor data stays refused.Tests: a hand-assembled pixel shader that builds the descriptor this way and loads through it, checked on WARP against the same load through the original registers, plus refusal controls for the reads above. A mutant that drops the copy must change pixels.
AI-assisted.