startup: gfx2hlsl refusals across an offline shader archive census (846 of 1,171 pairs are NGG vertex programs) #1716
Open
opened 2026-11-24 17:49:44 +00:00 by NiiRoZz
·
54 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#1716
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-24T17:49:44Z.
Found while translating every pixel/vertex program pair that an offline pass could carve from a package shader archive, not only the pipelines a startup run happens to create. The census below is what
tools/startup/gfx2hlsl.py --pendingrefuses on that population.Population
Refusals
ds_write_b32(NGG vertex programs, see below)gfx2hlsl; #1541 / #1566 cover compute LDS onlys_load through sN holding Nones_load through sN holding ('ptrhi', ('root', N))descriptor operand s[N:N] holds Nonev_lshrrev_b64pixel_aot(#964), not ingfx2hlsl; #1703 tests only the 32-bit shiftsv_cvt_f32_i32 with ['mul:2']operand 'off'numeric use of sN holding descnumv_swap_b32pixel_aot(#771)image_gather4_lz,s_bfm_b64,buffer_load_format_x,buffer format BUF_FMT_2_10_10_10_UNORM,buffer format BUF_FMT_8_8_8_8_UINT,buffer format BUF_FMT_16_16_SNORM,operand '|vN|',s_load through sN holding ('ud', N),v_cmp_class_f16,export target mrtz,numeric use of sN holding ptrs_bfm_b32andv_cmp_class_f16are lowered inpixel_aot(#601, #612)The largest group: NGG vertex programs
Every
ds_write_b32refusal is in a vertex program (2,538 of 2,538 refused requests), and every one of those programs has the same shape:s_sendmsg 0x9(GS_ALLOC_REQ) once;exp target_20(primitive export) andexp pos0, plusparam0… exports;ds_write_b32and 7,617ds_read_b32, 12,693s_barrier, and a fewds_read_b64,ds_read2_b32,ds_write_b128,ds_write2_b32,ds_write2st64_b32,ds_write2_b64.That is the RDNA 2 NGG (primitive shader) form: the wave allocates vertex and primitive export space, exchanges per-vertex values through LDS and exports the primitive itself. A desktop vertex shader has no LDS, no barrier and no primitive export, so this cannot be lowered instruction by instruction. Options to evaluate:
pos/paramexports.SetMeshOutputCountsfor theGS_ALLOC_REQcounts).Done when
pixel_aotare either shared withgfx2hlslor have a reason to stay separate.Not in this issue: pipelines whose programs are DXBC containers in the executable, and pairings that are not adjacent in the archive.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-24T17:55:33Z.
Correction: per-pair recount
The table above counts refusals per request, and every pair was written once per recorded root signature (3). A pair bound with a root signature it does not use can be refused for that reason alone, so the per-request counts mix translator gaps with combinations the title never creates. Recounted per pair:
ds_write_b32(NGG vertex programs, unchanged)v_lshrrev_b64v_cvt_f32_i32 with ['mul:2'](#1705 / #1707)operand 'off'(#1674 / #1676)image_gather4_lz,s_bfm_b64,operand '|vN|'s_load through sN holding None(138 pairs),s_load through sN holding ('ptrhi', ('root', N))(136),descriptor operand s[N:N] holds None(15), and single pairs forv_swap_b32,v_cmp_class_f16,buffer_load_format_x, three buffer formats,export target mrtzand thenumeric userefusals. Because these depend on which root is supplied, the provenance rows are most likely root mismatches, not tracker gaps. They should be re-measured with the root each pipeline actually uses before they are treated as translator work.The NGG group and the root-independent rows stand. The "Done when" item about the three provenance refusals becomes: measure them per pipeline with its own root signature first.
Reproduction: the offline request writer and the parallel
--pendingscan used for this census are in the pull requests linked from this issue.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T18:04:18Z.
Use the corrected per-pair census. Please measure the descriptor/provenance refusals again with each pipeline's observed root signature before assigning them as translator bugs. For NGG, the LDS/barrier/primitive-export pattern is a classification, not proof it is an identity pass-through. A useful first slice would be a source-built identity triangle and a contrasting case with a cross-lane dependency or non-identity primitive, comparing positions, parameters and primitive indices. Keep production lowering open until those cases separate cleanly. Smaller root-independent instruction gaps can proceed separately.
Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-24T18:41:37Z.
Agreed on all points. The plan:
s_load … holding None,ptrhianddescriptor operandgroups per pipeline with the root signature that pipeline was observed with, from run captures. I won't treat them as translator gaps until then. The offline request writer (#1750) currently writes each pair once per recorded root, which is exactly the confound you point out.v_lshrrev_b64(56 pairs), theimage_gather4_lz,s_bfm_b64and|vN|singletons.v_cvt_f32_i32 mul:2andoperand 'off'stay with #1707 and #1676.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-24T18:45:14Z.
Results for items 1 to 3 of the plan above, re-measured pair by pair on
mainat67319a17(all 1,171 pairs under every recorded root; nothing from an older translator commit is mixed in).1. Per pair. 1,171 pairs are 964 distinct code pairs (they differ only in the program header). 104 translate and compile under the census's three roots, as before. 846 have an NGG vertex program, classified from the instruction stream rather than from the first refusal.
2. Provenance refusals with observed root signatures.
s_loadwith a register offset through the resource heap. That one is a real tracker gap.3. NGG, classification only. 602 distinct programs, 324 distinct LDS/barrier/message/primitive-export shapes. In a linear slice of each program: the primitive payload depends on loaded memory in 602 of 602, LDS addresses are lane-invariant in 602 of 602, and 31 pairs also use readlane/writelane/permlane. None fits "own-lane values plus identity primitive". This comes from slices that ignore branches (one program read by hand), so culling, compaction and primitive count versus allocation are still open. Proposed first slice, as specified in the comment above:
GS_ALLOC_REQwith constant counts; each lane exports a position and one parameter computed from its own lane index; lane 0 exports the primitive (0, 1, 2); optional LDS write and read-back at a lane-dependent address.4. Root-independent instruction gaps, with ownership checked today. For rows with an open PR, that PR's head was run on the affected pairs: it removes its own refusal everywhere, but most pairs then stop at the next gap.
v_lshrrev_b64buffer_store_dwordx3buffer_store_dwordx3(behind the row above)v_readfirstlane_b32without a proven uniform sources_bfm_b64v_subrev_f32_dppv_cndmaskwith NEG on an immediatev_mul_hi_u32pos1BUF_FMT_16_16_16_16_FLOATThe
v_cvt_f32_i32 mul:2row is fixed by merged #1707. A tail of one to four pairs each remains (class compares, bit tests, a few buffer formats and export targets). The translator stops at the first refusal, so gaps behind it are undercounted.Not in the original census: translations that compile but cannot draw correctly.
a16image addressing is ignored byimage_load/image_sample: 3 translating pairs.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-24T21:40:17Z.
Claiming three of the root-independent rows from the table above.
1.
v_readfirstlane_b32without a proven uniform source, straight-line slice: #1931.v_cvt_i32_f32of a fixed buffer word marks a VGPR uniform.v_cvt_u32_f32,v_cvt_i32_f32,v_cvt_f32_ubyte0,v_mul_f32,v_fma_f32,v_fmaak_f32,v_rcp_f32,v_mov_b32). Every source must be a constant, user data, a fixed buffer word, a scalar value not derived from a lane mask, or an already-uniform VGPR.exec, a single SGPR destination), and #1780's refusal cases keep refusing.2.
v_cndmaskwith NEG on an immediate: #1932.-1.3.
buffer_store_dwordx3: design first.gfx2hlslhas no store handler, andsrvis the manifest's only resource-view line, so a store needs both halves. Whether the 84 pairs in the table use the form below is not measured yet. Proposed first slice, for review before any code:buffer_store_dwordto_dwordx4in theoffform (scalar byte offset plus immediate), through a fixed root-table descriptor, asRWByteAddressBufferStore*. These stay refused:glc,slcanddlc;offenandidxen;uav <slot> table <param> <byte offset>line under anx2w-manifest 2header. The runtime reader does not check the version line today and ignores lines it does not know. So the same change makes it read the version and reject an unknown version or line. It also bumps the shader cache revision (x2w-startup-shader-5), so an older runtime never loads a store translation.d3d12_draw.inl):CreateUnorderedAccessViewover the resolved backing buffer, only when that buffer is UAV-capable and authoritative for later accesses;x2w-manifestformat and the translated root signature (create_translated_root). This overlaps #1641 and #1567 ind3d12_draw.inl; the merge order is to agree.Does this split, translator and runtime landing together behind version 2, match what you want?
Environment: Windows 11 build 26300, Python 3.14.10, MSVC 14.44.35207.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-24T21:56:58Z.
Correction to the NGG figures in my earlier comment here. They came from a register-sensitive hash and from slices that ignored branches. A control-flow-aware re-analysis of the same 602 programs (846 pairs), with 13 programs re-read by hand in an independent review, changes three statements:
Confirmed
s_barrier; other waves read them back withv_readfirstlane. The wave-0 guard is resolved in 593 of them (591 automatically, 2 by hand) and inferred in the other 8. So the LDS traffic is a group-wide broadcast of scalars, not per-vertex data.GS_ALLOC_REQis sent withm0 = P<<12 | V, both counts loaded from memory (601).tid < Vand primitive exports totid < P(602).min(V-1, idx)with no flag bit ORed in (602).Inferred only
The 1 program with lane-dependent LDS addresses is different in kind: it reads LDS at addresses other lanes wrote, after a barrier, which looks like a real cross-lane exchange.
By pairs: 582 plain, 261 in the group of 176, 2 reduction, 1 lane-dependent.
First slice. A source-built check is ready locally: six cases (identity, LDS broadcast, reversed primitive, null primitive, two waves, masked ALU) assembled from documented encodings, anchored to literal values from the public LLVM and Mesa sources, run by a reference model in both wave orders and compared under three interpretations. Group-shared LDS matches every case. Lane-private LDS with counts honoured differs only where LDS carries data. Lane-private LDS with counts ignored differs in every contrast case except the masked-ALU one. It covers these three interpretations only and says nothing about a production lowering. I can open it as a PR if that is useful.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-24T22:22:13Z.
Taking the
v_swap_b32row (2 pairs) fortools/startup/gfx2hlsl.py. It is already lowered inpixel_aot(#771), where both destinations take the old value of the other register: read both sources first, then write both. Evidence: a device-freetests/startup_gfx2hlsl_*check in the style of the existing ones, with a self-swap, a swap whose destination is read again later, and refusal controls for modifiers and DPP/SDWA spellings. I'll leaves_bfm_b64andv_cmp_class_f16for a separate PR each, if no one else wants them.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-24T22:40:41Z.
Dated snapshot (2026-11-24) of every refusal site, not only the first, from the
--refusalsdiagnostic in #1978, run onmainat889cd3f4plus that PR.Input.
Caveats.
holding desc/ptrrows likely are).psunless noted)s_load with a register offset through ('resheap',)descriptor operand s[N:N] holds Nones_bfm_b64v_fma_mix_f32operand 'src_scc'operand '|vN|'s_bitcmp1_b32/s_bitcmp0_b32v_readfirstlane_b32 requires a proven uniform sourcenumeric use of sN holding desc/holding ptrs_addk_i32/s_mulk_i32v_add_f32_dpp/v_add_nc_u32_dpp/v_sub_f32_dppv_cube{ma,sc,tc}_f32/v_cubeid_f32/image dimension SQ_RSRC_IMG_CUBEs_bitset1_b32s_nor_b32/s_nand_b32on a lane maskexport target nullimage_sample_c_lzsampler: unsupported mip filterv_med3_i32s_lshl1_add_u32What the counts show.
#1978 produces the same table for any cache, and with #1750 for an archive-written one.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T22:43:12Z.
#1978 is on main at
2deaa030. The source-built check confirms that the census leaves the cache untouched and preserves the default first refusal. The later sites are approximate because each skipped instruction can change downstream state. Use the first-site rows to choose isolated follow-ups and the later rows to locate candidates. A no-refusal row means the translation emitted text, without asserting that a desktop compiler or GPU accepted it.Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-24T22:45:01Z.
Also taking the
s_bfm_b64row (1 pair) fortools/startup/gfx2hlsl.py, as its own PR next to thev_swap_b32one. RDNA 2 ISA (SOP2):D.u64 = ((1ULL << S0[5:0]) - 1) << S1[5:0], SCC unchanged, the 64-bit counterpart of thes_bfm_b32entry already in the scalar table. Evidence: a device-free check with field widths 0, 1, 32, 63 and offsets that cross the 32-bit boundary, plus refusal controls.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-24T22:58:40Z.
Status for my rows:
v_swap_b32is #1995 ands_bfm_b64is #2007. I'm takingv_cmp_class_f16(1 pair) next, as a separate PR next to the existingv_cmp_class_f32handling. It tests the binary16 class of S0[15:0] against the mask bits in S1, and refuses use of the high half and modifiers.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T23:27:33Z.
40 of 40 open PRs carry other people's work in their
git diff— a reading problem, not 40 mistakesI quantified something that has bitten three reviews this week. For each open PR I compared two diffs:
git diff $(git merge-base origin/main HEAD) HEAD— what the PR actually changesgit diff origin/main HEAD— what GitHub shows, and what a reviewer readsThe ratio between them is how much of the visible diff is other people's merged work being reverted by a stale base.
Every one of the 40 open PRs has a factor ≥ 2.0, and the median is north of 20. That is not 40 careless authors; it is a repository where
mainmoves 20–180 commits while a PR is open, and the default diff view then shows the branch undoing weeks of other work.Why this matters concretely
Three examples from this week, each verified line by line:
InterlockedIncrement(&counter) <= Nat two sites ind3d12_draw.inl— the 2^31 overflow that #1987 fixed, described there as "millions of lines a minute and stalled the process". Counted on both refs:first_callsuses 2 onmain, 0 on the branch.ed7d09a4's SMEM guard shape (merged with #1984), comment and all.mainis 56× its own content.None of these are wrong on purpose, and each is invisible unless you read the merge base instead of
main.What would fix it cheaply
git diff --numstat $(git merge-base origin/main HEAD) HEADdiffers fromgit diff --numstat origin/main HEADby more than, say, 2×. It cannot be a hard failure for every drift, but it can surface as a label:needs-rebase.git diff $(git merge-base origin/main HEAD)", which is one line and removes the whole class of confusion.The same 20-line script that produced the table would produce the label; the numbers above were computed with
git merge-base,git rev-list --count, andgit diff --numstat.What this is not
It is not a claim that any of these 40 PRs is wrong, and not a request to close any of them. Three of them I have reviewed at behaviour level this week (#2002, #2005, #2003, #2007, #2014 among others) and their content is sound; the problem is purely how the diff reads.
Notes
main481a1c62.Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T23:48:20Z.
260 handler exceptions that are not
Unsupported, from malformed operand shapes — measured, with the reachability stated honestlyI swept every
op_*handler onmain(489d5797) with seven operand shapes: none, one, two, three, a truncated register (v[0), an attribute token(
attr0), and four scalars. 76 handlers, 532 calls.Samples of each class:
What this is, and what it is not
The handlers index
ops[0]/ops[1]before checkinglen(ops), and a few pass a variable number of operands into a fixed format string. Under thedecoder this cannot happen:
Stage.translateiteratesself.ins, whoseasmcomes fromD.decode_instruction, which always produces the operandshape of the encoding. So these are not live bugs on the decode path.
They are reachable from anywhere that feeds assembly text to
Stage.one, which is what the unit fixtures intests/do — and there the failure modeis worse than a refusal:
refusals is None(Stage.translatesingle-shader, or a directone()call)IndexError/TypeErrorrefusalslist (census)internal error in <op>: <Type>handler_errorlabels thoseinternal error, which is the project's own marker for a translator defect — so a malformed fixture would put anunactionable entry into the
#1723census rather than anunsupportedone.The sub-class I would actually fix
v_fma_mixhi_f16raisingTypeError: not enough arguments for format stringis different from the missing-length checks: it is a format-stringarity bug. A handler that formats
opswithout confirming the count will raise this for any short form the decoder might legitimately produce for amixed-operand encoding — and unlike
ops[0], it cannot be caught by a singlelen(ops) == Nguard, because the count varies by modifier.The other 259 are one-liners:
if len(ops) != N: raise Unsupported(...)at the top of each handler, which most handlers already do. The ones that donot are visible in the list above.
How I would find out whether any of this matters in practice
Feed the encoder a word for each of the 76 mnemonics and compare
len(ops)fromD.decode_instructionagainst the handler's requirement. If thedecoder ever yields fewer, that handler is reachable; if not, this whole class is test-harness robustness. I did not do that here because it needs
llvm-mcto assemble 76 fixtures, which is the LLVM-dependent path.Why I am posting a negative-severity finding at all
Because it is the answer to a question the census cannot answer itself:
#1723counts refusals, and aninternal errorentry looks like a missinglowering until someone reads the label. The sweep is 40 lines and reruns in a second, so it is cheap to keep as a check that asserts every handler
answers malformed input with
Unsupported— that would convert 260 latentinternal errorlabels into one CI line.Notes
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-25T00:08:15Z.
Taking
s_addk_i32ands_mulk_i32fortools/startup/gfx2hlsl.py, as one PR since both are the same SOPK accumulate shape. A newer local census counts them in 77 and 79 refused pairs, and I found no open PR for either. The semantics come from the RDNA 2 ISA SOPK table:D = D + signext(SIMM16)with SCC set to the signed overflow for addk, andD = D * signext(SIMM16)with SCC unchanged for mulk.pixel_aotalready lowers both. Evidence: a device-free check with sign-extension boundaries (0x7fff, 0x8000, 0xffff), signed overflow into SCC, a later SCC consumer, and refusals for mask or descriptor-tracked destinations.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by cobrajet302gt on 2026-11-25T11:33:36Z.
Census-side cross-link from an independent corpus pass on Linux: we publish row-level labels for every program in one Scarlett-format package at cobrajet302gt/gta6-shader-census (public domain; producer in `tools/`, stdlib only).
Relevance to this census, precisely: our pass labels the same archive family but measures a different class — ours are program-property labels (wave size, user SGPRs, stage, occurrences, keyed by FSSM DXBC header digest; 25,889 unique programs, 1,151 of them wave64 compute), while this issue counts `gfx2hlsl` pair refusals per root signature. The two ceilings therefore do not bound each other: 846 NGG-vertex pairs here live in the control-flow/instruction class, which our label set carries no bits for (same boundary we noted under VIctory #841 for the emulate-path classes).
Two rows from your table intersect our data in a way that may save someone time:
Disclosure: our runtime posts from this account come from locally patched builds; everything in the published corpus is patch-independent (archive-only extraction, no boot).
Written with an AI assistant.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T12:05:20Z.
Claiming the 16-bit integer VOPC compares in
gfx2hlsl.pycompare():v_cmp_*_i16/_u16andv_cmpx_*_i16/_u16(e32 and e64), reading the low 16 bits (zero- or sign-extended), with SDWA, op_sel and float-printed operands refused. No open PR diff touchinggfx2hlsl.pycontains these mnemonics as of today. PR with device-free controls and an FXC/DXC draw to follow. AI-assisted.Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T14:02:42Z.
I'm now working through the remaining gfx2hlsl refusal reasons from a local start-up census (graphics: 585 pipeline requests, 520 refused at
09551998). I'll do this locally and not open one PR per item for now; the 16-bit integer compares are already up as #2369.To avoid duplicate work I skip anything with an open PR, a paused PR (the ones closed to keep the Windows queue short) or a claim in this thread. Checked by the
+lines of the PR diffs, not by titles. Items I'm taking, all without a PR or claim as of now:fi:1,row_mirrorandrow_half_mirror(v_min_u32,v_max_u32,v_or_b32,v_add_f32,v_mul_f32,v_mov_b32; notv_subrev_f32_dpp, which is #1996)v_permlanex16_b32v_readlane_b32/v_writelane_b32with lanes 32-63 and the write-before-read proof outside straight-line codev_pack_b32_f16,v_mad_u32_u16,v_mbcnt_lo/hi_u32_b32,s_round_mode,image_atomic_or/umin/umax/add,v_cvt_pknorm_i16_f32,s_abs_i32, and the internalTypeErrors inv_cmp_*_e64,s_sub_i32ands_bfe_u32If you're already on one of these, say so here and I'll drop it. AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T14:06:20Z.
Correction to my comment above: my check only read open PRs. The paused ones already cover part of my list, so I'm dropping these:
fi:1,row_mirror,row_half_mirror): #2038 (tedin7). The ops it doesn't name, likev_min/max_u32_dpp, would build on the same DPP path, so I'm leaving those to that PR as well.v_readlane_b32andv_permlanex16_b32: #2032 (tedin7)v_writelane_b32: touched in #2314, so I'm leaving it alones_sub_i32internal error: in the area of #2046 (tedin7)What I'm still taking:
v_pack_b32_f16,v_mad_u32_u16,v_mbcnt_lo/hi_u32_b32,s_round_mode,image_atomic_or/umin/umax/add,v_cvt_pknorm_i16_f32,s_abs_i32, and the internalTypeErrors inv_cmp_*_e64ands_bfe_u32. Sorry for the noise. AI-assisted.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T20:50:37Z.
I'd like to take the follow-up to #2529: translating NEG on an inline-integer or literal source of a float VOP3 instruction, instead of refusing it.
In a local first-refusal census of captured start-up requests at main
780f3c0(counts only), the #2529 refusal is now the most common first refusal. These sources were silently mistranslated before, so the refusal is correct. By opcode, as first refusals:v_fma_f32978,v_cmp_class_f32_e64233,v_mul_f32_e64114,v_med3_f3298.Scope:
neginto an immediate (inline 1 ->0x80000001, literal0x5->0x80000005, inline 0 ->0x80000000, i.e. -0.0). Read from the encoding bits as #2529 does, not from the printed text. Hardware behaviour for these sources is not measured; the readback checks the HLSL against that model. I'll cite the LLVM source and the ISA text in the PR.v_cmp_class_f32mask slot (src1), integer-typed operands, unused slots carrying NEG, and anything refused for another reason stay refused.-1ambiguity #2529 describes), plus negative controls.Adjacent open PRs I checked: #1778 (modifier refusals), #2055 (
v_fma_mix_f32), #2439/#2449 (abs onv_cndmask), #2475.@Makto94, if you already have this in progress, say so and I'll step back and review instead.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T21:56:03Z.
I'll take
v_cvt_pk_u16_u32andv_cvt_pk_i16_i32intools/startup/gfx2hlsl.py(sharing the VOP3-only saturating 16-bit integer pack pair already lowered inpixel_aotvia #779). Scope: saturatesrc0into bits15:0andsrc1into bits31:16([0, 65535]unsigned,[-32768, 32767]signed), refuseneg/absincheck_encoding(), modifiers (clamp,omod,op_sel), and non-VOP3 spellings (_e32,_sdwa,_dpp), and verify withllvm-mc/disasm_rdna2controls plus DXCps_6_0and FXCps_5_1D3D12 draws and negative controls on WARP and Radeon RX 9070 XT.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T22:13:11Z.
Opened #2589 lowering
v_cvt_pk_u16_u32(0x36a) andv_cvt_pk_i16_i32(0x36b) intools/startup/gfx2hlsl.pywith LLVM 15 round-trip checks, boundary/refusal controls, and WARP + Radeon RX 9070 XT D3D12 verification (FXC ps_5_1+DXC ps_6_0).AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T22:58:45Z.
Two previously blocked slices are now on main. #2057 (
e0da6b39) covers the descriptor load into s[104:107]. The Release controls and real WARP/RTX draws passed 3/3. The controls still refuse a VCC read or descriptor use when its required definition is bypassed or clobbered. #2073 (f03cf16f) covers the binary16 ALU and integer FMA rounding correction; the Release host and FXC/DXC draw checks passed 4/4 on WARP and RTX 4060 Laptop. These are source-built results. Any change in the offline refusal census needs a fresh run at the landed revision.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T23:05:46Z.
Claiming a refusal for lane masks used as data words in
gfx2hlsl.py, found while reviewing #2439 and #2449.A compare into an SGPR pair (
v_cmp_eq_u32_e64 s[30:31], 0, v0) keeps only the current lane's bit ins30and marks it a lane mask. On main,op_v_cndmask_b32reads its data operands throughu_srcwith no lane-mask check, andv_mov_b32has no check either (plain form, and the SDWA form withsrc0_sel:DWORD). Sov_cndmask_b32_e64 v1, 0, s30, s[30:31]emits the lane's bit (1) where RDNA 2 reads the whole mask word (0xffffffffwhen all 32 lanes are active and pass the compare), and|s30|in #2439/#2449 inherits the same result. Other handlers already refuse a mask as data (s_bfe_i32,s_bfe_u64,s_bfe_i64and the 64-bit shifts, the SOP2 word complements,s_cmov,s_bitcmp0/1_b32,v_writelane_b32, the buffersoffset).Plan: refuse a lane-mask register as a data source of
v_cndmask_b32(e32 and e64) and ofv_mov_b32(plain and SDWA DWORD), after stripping-,|..|and the other source modifiers, keeping the lane-select operand ofv_cndmaskas it is. PR with refusal controls, the updated expected messages instartup_gfx2hlsl_readfirstlane_uniform_check.py(several of its refused cases move a mask withv_mov_b32first), and the census count of what it newly refuses.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T00:01:02Z.
Claiming three small gfx2hlsl ALU ports that are already lowered in
pixel_aotbut still refuse intools/startup/gfx2hlsl.py, one PR each:s_abs_i32—D = asint(S0) < 0 ? (0u - S0) : S0, SCC = result != 0.s_flbit_i32_b32—D = S0 == 0 ? 0xffffffff : 31 - firstbithigh(S0), SCC unchanged.s_quadmask_b32— each nibble of S0 collapses to one bit of D (8-bit result), SCC = result != 0 (same helper shape aspixel_aot).Each PR: hand-assembled SOP1 fixture, CPU evaluation of the translated text, lane-mask / descriptor refusals, and a mutation negative control. No retail bytes. Not touching NGG / provenance rows.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:21:06Z.
Claiming the follow-up to #2082 (image_sample_d LLVM 15 tuple spelling in the fixture test); Draft PR to follow.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T01:36:31Z.
Claiming
s_ff0_i32_b32intools/startup/gfx2hlsl.py(Part of #1723): port thepixel_aot/ff0_i32_b32formfirstbitlow(~S0)(0xffffffff when every bit is set). SCC unchanged. Lane masks and descriptor-bearing SGPRs refused. Source-built CPU fixture with a negative control; one PR.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-26T02:03:32Z.
Claiming the RDNA 2
nullscalar operand (code 125) andStage.scalar/op_s_bfm_b32non-SGPR destinationTypeErrorfix intools/startup/gfx2hlsl.py(also declared as aFIXon #2618 for theEtranslator-exception rows, refs #2463):null(125) as0x00000000u(wave-uniform constant0) in scalar/vector 32-bit operand readers.nullon plain numeric/constant operands (discarding the register write while emitting modeledSCCupdates such ass_and_b32 null, s0, maskands_lshl*_add_u32 null, ..., and keepingscc_uniformintact).reg_range(...)[1]TypeErrorcrashes with explicitUnsupportedrefusals for_b64/ lane-mask / descriptor /SCC_UNMODELLEDwrites tonulland unmodelled destinations (vcc_hi,exec_hi,ttmp*).llvm-mc/libLLVMround-trips, refusal controls, and WARP + Radeon RX 9070 XT D3D12 draws.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:28:36Z.
Claiming: refuse a wave lane mask (and the high word of a wave64 mask pair) read as numeric data by the remaining vector ALU forms in gfx2hlsl, beyond the v_mov_b32/v_cndmask_b32 case of #2623 (Draft PR soon).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:30:05Z.
@consolelogkyo about your claim on the scalar destination
TypeErrorcrashes (vcc_hi,exec_hi,ttmp*): we already have a finished fix for thevcc_hi/exec_hipart. It turns the crash into explicit refusals, and in wave32 it also lowers the cases where that is exact (a compare or carry destination, a mask, a scalar operand), while a program that may be wave64 keepsvcc_hirefused. It comes with a fixture and a D3D12 draw check that compares against a CPU reference, with translations that drop the compare bit or the carry as failing controls.We will not open it while your claim stands. Which do you prefer: you open yours and we share our test words, or we open ours as a Draft with a credit line to you for the
nulloperand and the other destinations, which stay yours? Either is fine with us.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:30:18Z.
Claiming: plain
image_samplein a pixel stage keeps the implicit LOD (Sample) where the existing sample_b / get_lod derivative rule already holds, instead of level 0 (Draft PR to follow).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-26T02:32:37Z.
Opened #2698 (https://github.com/R0Y00/Xbox2Windows/pull/2698) for the scalar
null(code 125) operand lowering andStage.scalar/op_s_bfm_b32non-SGPR destination refusal guards claimed above (verified on WARP + Radeon RX 9070 XT with pixel draws, runtime root-constant SALU+branch buffer readbacks, and negative controls).AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:43:41Z.
Claiming: wave32 vcc_hi as an ordinary scalar register in gfx2hlsl, with the wave64 case kept refused (Draft PR soon; builds on #2698).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:49:24Z.
Claiming: DPP quad reads in pixel programs with uniform branches and loops in gfx2hlsl, proving wave-uniform control flow over the whole program (Draft PR soon; extends #2657 and #2483).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:55:10Z.
Claiming: fold an s_mov_b32 copy of a known-constant SGPR in gfx2hlsl, so inline sampler words built by copying a zero translate (small follow-up to #2319).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:00:34Z.
Claiming: constant-lane SGPR spills on wave64 lanes 32..63 and in vertex stages in gfx2hlsl (v_writelane_b32 / v_readlane_b32), extending #2637 (Draft PR soon).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:08:08Z.
Claiming: keep a descriptor loaded in an s_cbranch_execz arm for reads before the exec restore in gfx2hlsl (Draft PR soon).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:26:25Z.
Claiming: keep wave-uniformity through lane-independent integer VALU ops (add/sub/shift/and/or/xor/min/max/mul) in gfx2hlsl, so v_readfirstlane of such a value is proven (Draft PR soon). The uniform buffer load past the entry block is #2607.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:39:26Z.
Claiming: compute
s_cbranch_execzblocks that leave a lane mask's bit unchanged for the lanes they skip (the compiler's i1-phi blends_andn2/s_and exec/s_or,v_cmpinto a zeroed mask,s_orn2into an all-ones mask) ingfx2hlsl.py(Draft PR to follow; it extendsphi_mask_okand does not touch #2557's two rules).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:51:48Z.
Claiming a D3D12 WARP readback test for the
src_scclowering from #1821 (follow-up Draft).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:04:27Z.
Claiming: ship the compiled compute-store shader cases in the GPU check package and replay them in Run-GpuCheck.ps1 on the contributor's own adapter (Draft PR soon; also Part of #1).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:14:15Z.
@legacy-code-archaeologist quick coordination question on your 2026-11-25 14:06Z claim that includes
image_atomic_or/umin/umax/add: are you still working on those?We have a local branch for the pixel-stage forms (
image_atomic_umin32-bit,image_atomic_umax64-bit on a register pair with a16,image_atomic_or), each with a WARP readback against a CPU reference, wrong-value and mutation controls, plus the small runtime binding forRWTexture2D<uint>/ 64-bit views. We have not opened it because of your claim.Happy either way: if you are close, open yours and we will review it and offer our tests; if not, we can open ours as a Draft with credit and you review it. Just tell us which you prefer.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:32:30Z.
Claiming: image_sample_b / image_get_lod stay lowered past a v_cmpx/saveexec-narrowed EXEC and a per-quad EXEC branch (builds on #2659; Draft PR to follow).
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:35:18Z.
Claiming: binary16 VOPC compares in
gfx2hlsl.pycompare():v_cmp_<rel>_f16andv_cmpx_<rel>_f16, e32 and e64 (SDWA stays with #1680). Draft PR soon, with a WARP readback over NaN, inf, -0 and denormal halves.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:35:45Z.
Claiming: compute readfirstlane waterfall, body scalar that does not depend on the key read after the loop (W1).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:36:21Z.
Claiming: v_pk_mul_f16 / v_pk_add_f16 / v_pk_fma_f16 lowering in gfx2hlsl (Draft PR soon).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:36:33Z.
Claiming: SDWA v_add_f16 (VOP2 SDWA, binary16) in gfx2hlsl.py sdwa(); WARP readback test, Draft PR soon. Binary16 compares stay with the other claim, packed ops separate.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:58:25Z.
Claiming: compute WaveSync (wave-wide gathers through groupshared memory) and the guest wave size, with v_readfirstlane_b32 of a per-lane VGPR on top of it (#2791, supersedes #2745).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T05:30:27Z.
Claiming: s_wqm_b64 exec, exec on a narrowed EXEC kept exact in pixel programs with sample_b / get_lod, as a per-quad vote (stacked on #2736; Draft PR to follow); a backward branch around the v_interp_p1ll_f16 / v_interp_p2_f16 pair in the pixel stage (Draft PR soon); image_store with d16 (four binary16 values from two VGPRs) in the pixel stage (Draft PR soon).
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T06:23:22Z.
Claiming: the pixel-stage resource-heap image record in
gfx2hlsl.py:s_load_dwordx8at a register offset (index shifted left by 5) through the resource heap, with the index read from a table buffer word as the compute form of #2580 already models (translator and manifest first; runtime binding as a separate slice). Draft PR soon.Claiming:
image_gather4_lzwith a repeat (wrap) sampler ingfx2hlsl.py(CLAMP_X / CLAMP_Y of 0 for the native Gather form; WARP readback at the u/v = 0 and 1 edges). Draft PR soon.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:17:09Z.
Claiming: raise the mesh parameter range from param0..12 to param0..31 (ISA 10.2; the 32-vector D3D12 budget still applies) in mesh_param_link.py and the mesh export recognizer, with a param18/param28 pairing draw (Draft PR soon).
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T09:53:13Z.
Claiming: NVIDIA pipeline-creation failure (
NVVM compilation failed: 3) in the buffer_store_format xyzw store helper of gfx2hlsl (Draft PR soon).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T10:28:45Z.
Releasing all of our open translator claims in this issue. We withdrew the related Python gfx2hlsl PRs because translation is moving to the native C++ frontend (see #870): #2030 #2079 #2096 #2741 #2745 #2747 #2755 #2758 #2760 #2761 #2763 #2772 #2784 #2786 #2789 #2791 #2792 #2793 #2796. Anything we claimed here that is not already merged is free for anyone to take. The branches stay available if any part is useful.
Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-26T12:43:09Z.
Held locally during the C++ rewrite: low-half readers of a plain
v_interp_p2_f16result, plus two notesI'm not opening a PR, since translator work is paused for the C++ frontend. This is in case any of it is useful there.
1. Low-half readers (local branch, not pushed).
interp_f16_scancurrently accepts onlyv_cvt_f32_f16as a reader of a plainp2destination. The branch also accepts:v_fma_mix*source withop_sel_hiset andop_selclear (a binary16 low half;Stage.mixalready lowers it asf16tof32of bits 15:0);v_pack_b32_f16source whoseop_selbit is clear (lowered with a0xffffmask).v_fma_mix_f32andv_pack_b32_f16also define their whole destination. The high half, a binary32fma_mixsource and av_fma_mixlo/hi_f16destination stay refused. It overlaps tedin7's withdrawn #2789 (samefma_mixrule) and addsv_pack_b32_f16.Tests: four accepted/refused variants in
startup_gfx2hlsl_interp_f16_check.py, hand-encoded and checked with the translator's decoder (llvm-mc 15binarymode not run locally). Draws on WARP and RTX 3090 (driver 32.0.16.1664, Windows 26300): thefma_mixstage exports 1.5 from the low half ofattr0.x, thepackof theattr0.xhalves exports the vertex word0xc0003e00, and a mutant of each must fail.ctest -j 1 -R "mesh57|mesh_cbv_order|startup_gfx2hlsl": 342/342 atd4dfe97b.2. Soundness gap on main (found by tedin7 in #2789, confirmed at
d4dfe97b).parse('exp mrt0 v4, v5, v5, v5 done vm')returns operands['mrt0 v4', 'v5', ...], so the scan never sees the first exported register. A plainp2result exported only as channel x is not checked for its undefined upper half.3. Counts from a local capture (RTX 3090, counts only). 95 distinct slot 57 G-buffer pixel programs, lowered alone through
MeshPixelStageafter #2824:s_loadwith a register offset through the resource heap: 47v_fma_mix(38) orv_pack_b32_f16(1) read of ap2result: 39sampler from a descriptor: 6; other: 3With the low-half rule, 2 of the 39 stop next at a
v_mul_f16read of the upper half, and 37 at "unmodelledv_interp_p2_f16result across a branch". The scan carries no state across branches, so a C++ design that tracks the defined half per register across blocks would cover them.@R0Y00 do you want any of this as notes or tests for the C++ frontend, as a PR against the Python translator, or not at all? I'll hold it until you say.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T08:31:27Z.
I'm picking up the native side of this: the gfx1013 native graphics frontend still refuses NGG-style vertex shaders (LDS
ds_write_b32/ds_read,v_mbcnt,s_sendmsgGS alloc,s_barrier) as a graphics wave/control-flow instruction, and it's the top refusal in my runs.Plan: recognise the pass-through NGG VS shape only (lane-private LDS slots with a disjointness proof along the lines of tedin7's earlier work, alloc counts equal to the wave counts, identity primitive export) and lower it to a plain VS. Anything not proven stays refused with a specific reason. Linux tests with identity and contrast cases via llvm-mc. I have a first version on my fork (branch local/ngg-vs-passthrough) with Linux tests; it gets a Windows run next, then a draft PR.
Draft PR: #3711
AI-Assisted