shader: lower v_cubema/sc/tc/id_f32 and SQ_RSRC_IMG_CUBE in gfx2hlsl (Part of #1723) #2028
Closed
tedin7 wants to merge 11 commits from
upstream-pr/2035 into main
pull from: upstream-pr/2035
merge into: R0Y00:main
R0Y00:main
R0Y00:codex/indirect-large-backed-views
R0Y00:codex/word3-preflight-check
R0Y00:codex/vertex-table-two-records
R0Y00:codex/live-index-alias
R0Y00:codex/copied-vertex-buffer-srv
R0Y00:codex/windows-stage-test-output
R0Y00:codex/preserve-live-srv-retirement
R0Y00:codex/share-render-target-tracking
R0Y00:codex/sgd5-negative-offset-fixture
R0Y00:coverage-dashboard
R0Y00:codex/mesh-loose-root
R0Y00:codex/mesh86-cache-padding
R0Y00:codex/xmem-scatter-preflight
R0Y00:codex/mesh-depth-ps
R0Y00:codex/indirect-dispatch-refresh
R0Y00:codex/compute-container-index
R0Y00:codex/startup-compute-formatted-load
R0Y00:codex/compute-indirect-producer
R0Y00:codex/compute-atomic-soffset
R0Y00:codex/mesh-dual-handoff
R0Y00:codex/startup-run-sh-watcher-control
R0Y00:codex/queue31-page-alias
R0Y00:codex/indexed-indirect-compute-root
R0Y00:codex/typed-buffer-view-metadata
R0Y00:codex/translated-indexed-address-alias
R0Y00:codex/fixed-mesh-create-result
R0Y00:codex/xmem-section-lease
R0Y00:codex/startup-slot86-mesh-cache
R0Y00:codex/restore-mesh-barrier-iteration
R0Y00:codex/translated-indirect-upload-index
R0Y00:codex/xapu-completion-opt-in
R0Y00:codex/translated-indexed-rect
R0Y00:codex/translated-indexed-indirect
R0Y00:codex/startup-mesh-lds-integration
R0Y00:codex/startup-console-ms24
R0Y00:codex/startup-slot57-mesh-request
R0Y00:codex/indirect-copy-provenance
R0Y00:codex/present-color-producer-trace
R0Y00:codex/compute-dispatch-binding-trace
R0Y00:codex/translated-indirect-table-buffers
R0Y00:codex/indirect-copy-provenance-base
R0Y00:codex/mix-half-literal-source
R0Y00:codex/translated-indirect-draw
R0Y00:codex/xmem-scatter-diagnostics
R0Y00:codex/slot148-recording-upload
R0Y00:codex/slot70-loading-art-verified
R0Y00:codex/command-list-upload-arena
R0Y00:codex/recover-failed-command-list
R0Y00:codex/startup-heap-timing-notes
R0Y00:codex/align-audio-input-timeline
R0Y00:codex/synthetic-depth-export-control
R0Y00:codex/startup-texture1d-on-windows
R0Y00:codex/1629-packed-position-fixture
R0Y00:codex/cpu-srv-refresh
R0Y00:codex/stream-root-srv-draw
R0Y00:codex/audio-mixer-timer
R0Y00:codex/startup-reload-published-shader
R0Y00:codex/priority-integrate-1284
R0Y00:codex/guest-sixteen-page-record
R0Y00:codex/aot-placed-dxr-batch
R0Y00:codex/guest-directory-selection
R0Y00:codex/gamesave-enumerate-read
R0Y00:codex/readme-archive-to-pixels
R0Y00:codex/pe-placed-view-draw
R0Y00:codex/archive-directory-gpu
R0Y00:codex/slot133-dxr-build
R0Y00:codex/materialize-placed-vertex-view
R0Y00:codex/dstorage-directory-offsets
R0Y00:codex/xg-nine-bc-copy
R0Y00:codex/xg-slot10-bc64-arrays
R0Y00:codex/dxr-guest-address-readback
R0Y00:codex/gpu-va-high-bits
R0Y00:codex/clarify-diagnostic-startup-scope
R0Y00:codex/xg-six-levels
R0Y00:codex/typed-derived-blend
R0Y00:codex/english-legal-text-progress
R0Y00:codex/address-bc-4ks
R0Y00:codex/dstorage-bounded-file-read
R0Y00:codex/wide-srv-offsets-menu
R0Y00:codex/startup-memory-srv
R0Y00:codex/bound-view-tail
R0Y00:codex/language-selector-readback
R0Y00:codex/setup-menu-progress
R0Y00:codex/cpu-plane-refresh
R0Y00:codex/startup-ubyte-vertex
R0Y00:codex/presenter-window-selection
R0Y00:codex/startup-uniform-buffer-lane
R0Y00:codex/intro-loop-timing
R0Y00:codex/static-clzero-loops
R0Y00:codex/document-rtx-intro
R0Y00:codex/startup-insertq
R0Y00:codex/nv12-startup-texture
R0Y00:codex/stream-stage-draw
R0Y00:codex/startup-null-uav-format
R0Y00:codex/startup-draw-capture
R0Y00:codex/shorten-windows-checks
R0Y00:codex/dstorage-rfc1950
R0Y00:codex/startup-dump-fence
R0Y00:codex/pr1135-review-base
R0Y00:codex/startup-stream-requests
R0Y00:codex/startup-chroma-view
R0Y00:codex/readme-graphics-pipeline-streams
R0Y00:codex/static-crt-free-tls
R0Y00:codex/arc-140t-rtx-5080-laptop-gpu-reports
R0Y00:codex/main-startup-progress-entry
R0Y00:codex/signed-dxil-catalogue
R0Y00:codex/reloc-free-preferred-base
R0Y00:codex/quad-dpp-bit-mask
R0Y00:codex/raw-srv-bounds
R0Y00:codex/rx9070-31044-hardware-report
R0Y00:codex/gpu-page-source-provenance
R0Y00:codex/runtime-placeholder-interior
R0Y00:codex/gpu-copy-queue-tile-order
R0Y00:codex/pe-pin-external-providers
R0Y00:codex/xmem-placeholder-reservations
R0Y00:codex/xmem-shared-physical-pages
R0Y00:codex/pe-package-startup
R0Y00:codex/xmem-tools-memory-query
R0Y00:codex/cpu-stack-output-import
R0Y00:codex/pe-load-security-cookie
R0Y00:codex/record-three-bvh-retests
R0Y00:codex/cpu-rbp-frame-anchor
R0Y00:codex/xmem-default-startup
R0Y00:codex/record-rtx-3050-ti-9597
R0Y00:codex/docs-readme-start-here
R0Y00:codex/check-compute-mad24-truncation
R0Y00:codex/docs-discord-community
R0Y00:codex/bound-rcx-branch-mutants
R0Y00:codex/rtx5060ti-bvh-62114
R0Y00:codex/837-neutral-readme-disclaimer
R0Y00:codex/record-rtx-3070-ti
R0Y00:codex/title-neutral-public-wording
R0Y00:codex/exe-shadow-frame-submissions
R0Y00:codex/exe-shadow-runtime-chain
R0Y00:codex/readme-polish
R0Y00:codex/gpu-coverage-nov23
R0Y00:codex/spirv-minlod
R0Y00:codex/shadow-shim-device
R0Y00:codex/exe-two-shadow-frames
R0Y00:codex/shim-dispatch-cleanup
R0Y00:codex/fix-spirv-cache-probe
R0Y00:codex/sampler-use
R0Y00:codex/ballot-bit-extract
R0Y00:codex/packed-fma-release
R0Y00:codex/cpu-packed-fma-o2
R0Y00:codex/publish-coverage-dashboard
R0Y00:codex/mesh-cbv-binding-order
R0Y00:codex/spirv-window-fixture
R0Y00:codex/ps-e32-float-uint
R0Y00:codex/ps-cbuffer-reads
R0Y00:codex/fixed-profile-rescan
R0Y00:codex/shim-compute-integration
R0Y00:codex/readme-visible-coverage
R0Y00:codex/readme-research-navigation
R0Y00:codex/integrate-pr-256
R0Y00:codex/indexed-mesh
R0Y00:codex/sampled-coverage
R0Y00:codex/first-ms
R0Y00:codex/dual-ps
R0Y00:codex/ps-attribute
R0Y00:codex/compute-first
R0Y00:codex/ps-export
R0Y00:codex/readme-research-status
R0Y00:codex/ps-layout
R0Y00:codex/blast-window
R0Y00:codex/chart-caption
R0Y00:codex/reviewer-roles
R0Y00:codex/blast-aot
R0Y00:codex/archive-program
R0Y00:codex/crc-stream-program
R0Y00:codex/exe-image-data-chain
R0Y00:codex/local-cpu-fixture-coverage
R0Y00:codex/exe-bound-frame-chain
R0Y00:codex/exe-mapped-comparison
R0Y00:codex/contribution-dependencies
R0Y00:codex/exe-entry-aot
R0Y00:codex/bink-frame-heap-integration
R0Y00:docs/hardware-seven-reports
R0Y00:codex/bink-custom-heap
R0Y00:codex/bink-heap-callers
R0Y00:codex/discussions-entry-points
R0Y00:codex/gpu-community-batch-64
R0Y00:codex/ffx-scratch-writers
R0Y00:codex/generic-project-documentation
R0Y00:codex/ffx-dispatch-rcas
R0Y00:codex/four-windows-gpu-reports
R0Y00:codex/title-neutral-project-wording
R0Y00:codex/community-coverage-provenance
R0Y00:codex/rcas-packed-texels
R0Y00:codex/community-gpu-retests
R0Y00:codex/community-build-and-gpu-reports
R0Y00:codex/ffx-provider-loop
R0Y00:codex/ffx-recurrent-views
R0Y00:codex/ffx-recurrent-resource
R0Y00:codex/amd-wave64-reports
R0Y00:codex/ffx-backend-slots
R0Y00:codex/upscaler-device-init
R0Y00:codex/ffx-context-lifecycle
R0Y00:codex/ffx-version-query
R0Y00:codex/ffx-provider-contract
R0Y00:codex/typed-object-callback
R0Y00:codex/cpu-ordinal-import
R0Y00:codex/chained-cpu-ranges
R0Y00:codex/cpu-import-call
R0Y00:codex/cpu-direct-call
R0Y00:codex/cpu-leaf-aot
R0Y00:codex/community-project-status
R0Y00:codex/script-state-path-replay
R0Y00:codex/script-state-evidence
R0Y00:codex/bc7-resident-tail
R0Y00:codex/bcpack-mip-tail
R0Y00:codex/bc7-texture-draw
R0Y00:codex/asset-ranges
R0Y00:codex/pixel-constants
R0Y00:codex/pixel-aot
R0Y00:codex/pre-exe-workloads
R0Y00:codex/root-signature-device-coverage
R0Y00:engineering/packed-bvh-leaves
R0Y00:engineering/bvh-build-and-update
R0Y00:engineering/intake-root-roundtrip
R0Y00:community/gpu-check-release
R0Y00:community/english-contributor-entry
No reviewers
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!2028
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2035"
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 tedin7 on 2026-11-24T23:31:57Z.
Part of #1723
What this unblocks: Run 20 census #6 (71/69 pairs): cube-map shaders no longer stop translation.
Lowers
v_cubeid_f32,v_cubesc_f32,v_cubetc_f32andv_cubema_f32intools/startup/gfx2hlsl.pythrough four helpers in the common preamble (major axis is z when |z| >= max(|x|,|y|), else y when |y| >= |x|, else x; face ids +x -x +y -y +z -z;mais twice the major axis). Image ops withdim:SQ_RSRC_IMG_CUBEtake (s, t, face) and declare aTexture2DArray<float4>(kindtex2da), the same path asSQ_RSRC_IMG_2D_ARRAY. Seamless filtering across face edges is not modelled.Verification:
python3 -B tests/startup_gfx2hlsl_cube_check.pyon the branch:gfx2hlsl cube: ok.origin/mainsources: fails withUnsupportedon the first cube op.startup_gfx2hlsl_swap_check.py,_sdwa_check.py,_operand_count_check.py,_op_refusals_check.py,_cmp_class_check.py,_mad_check.py.startup_gfx2hlsl_cube.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:00Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
8dfaaeef7fℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:05Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:07Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:08Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:10Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:05Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
8dfaaeeℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-25T00:55:05Z.
I checked the four helpers against the RDNA ISA pseudo-code for
V_CUBEID/SC/TC/MA_F32. The major-axis order (z, then y, then x, with>=), the face ids, the sign rules for sc/tc andma = 2 * majorall match.One small difference: the ISA compares
|z| >= |x| && |z| >= |y|separately, whileabs(z) >= max(abs(x), abs(y))lets HLSL'smaxdrop a NaN. A NaN in x can therefore pick a different face. Spelling out the two comparisons would match exactly.The sample is the part I think is wrong. The compiler does not pass sc/tc straight to a CUBE sample. In a private executable's pixel programs (aggregate, decode only):
dim:SQ_RSRC_IMG_CUBE;v_rcp_f32 |ma|, thenv_fmaak_f32 s, sc, rcp, 0x3fc00000and the same for t, i.e.sc / |ma| + 1.5.Since
mais twice the major axis,sandtlie in [1, 2], not [0, 1]. As aTexture2DArraysample:I have not run this on WARP. The failure follows from the coordinate range, and the test does not cover it because it only checks text.
Possible fixes, in order of effort:
dim:SQ_RSRC_IMG_CUBE, and refuse a non-clamp, non-wrap sampler. This is still not seamless.TextureCube. This keeps seamless filtering and also needs the SRV to be created as a cube.Either way, a value test that samples a small cube with distinct texels per face, through the exact
1.5sequence, would pin it down. Comparing the helpers' values with the ISA pseudo-code on a set of directions (including ties and signed zeros) would also strengthen the test.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:01Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1108Accepting this dimension breaks three existing pure-Python checks:
tests/startup_image_sample_l_check.py:246raisescube was accepted,tests/startup_image_3d_check.py:114raisesunverified image dimension accepted, andtests/startup_image_2d_array_check.py:249raisesimage_load_mip on a cube accepted. All three pass against the parent translator and are still selected by.github/workflows/windows.yml:193-199; array draw mode also runs the failing controls before GPU work. Update these fixtures to verify the newly supported cube behavior alongside this mapping so the feature does not leave the existing test suite failing.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:01Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1115For a cube shader using a clamped sampler, RDNA cube normalization produces s/t coordinates in [1,2] (
SC / abs(MA) + 1.5), but this path feeds them unchanged intoTexture2DArray, which expects normalized coordinates in [0,1]. A +X-face-center sample consequently becomes(1.5, 1.5, 0)and clamps to the face corner instead of sampling(0.5, 0.5, 0). This corrupts even interior samples, independently of the acknowledged seamless-filtering limitation. Subtract the cube-specific bias from s/t beforeSampleorSampleLevel, leaving the face and LOD unchanged.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:01Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1108When the bound view is a normal
D3D12_SRV_DIMENSION_TEXTURECUBEorTEXTURECUBEARRAYSRV, emittingtex2damakes the runtime bind a null resource. Insrc/startup_stubs/d3d12_draw.inl, lines 956-958 requireTEXTURE2DARRAYfor this kind, lines 976-978 copy the recorded cube descriptor unchanged, and lines 1009-1018 reject its differing dimension and clear the texture. Thus these newly accepted shaders cannot sample their actual cube resources. Add a cube-aware binding kind or convert the recorded cube view into an equivalent array view with the correct face and mip ranges.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:39:01Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1706This adds public startup-translator capabilities without the documentation update required by
AGENTS.md.docs/experiments.md:11412still explicitly lists cubeimage_sample_lamong forms refused withUnsupported, anddocs/startup-runtime.md:875-876still says cube images are refused. Update the relevant README or experiments documentation with the accepted forms, reproduction command, and non-seamless filtering limitation so contributors can determine the actual supported scope.AGENTS.md reference: AGENTS.md:L210-L211
Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:05Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1108The three older refusal checks were already updated in
79c8ac9c(rebased); they pass locally.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:07Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1115Fixed in
a678bc3c: cube s/t now lower as float3(s - 1.0, t - 1.0, face); check updated.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:08Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1108Fixed in
a678bc3c: d3d12_draw.inl rebinds TEXTURECUBE and TEXTURECUBEARRAY views as TEXTURE2DARRAY (6 slices per cube). Needs a Windows build to run.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:56:10Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1706Fixed in
a678bc3c: docs/startup-runtime.md and docs/experiments.md now list the accepted cube forms, the repro commands and the non-seamless limitation.Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-25T01:37:05Z.
Thanks,
a678bc3cfixes the [1, 2] range and the binding. One case is still off: cube arrays.In the same private executable's pixel programs (decode only, aggregate counts), a few of the CUBE samples are arrays. The third address component is built as
v_fmamk_f32 vZ, vLayer, 0x41000000, vFace, i.e.layer * 8 + face.As I understand it, that is how ACO addresses a cube array: each layer takes 8 face slots, of which 6 are used. The image descriptor is set up to match.
With TEXTURECUBEARRAY rebound as a 2D array of 6 slices per cube, the sampled slice
8 * layer + faceis wrong for every layer >= 1. For example, layer 1, face 0 reads slice 8 (layer 1, face 2) instead of slice 6.Options:
slice = floor(z / 8) * 6 + (z mod 8)on the rounded component, when the bound view is a cube array; ordim:SQ_RSRC_IMG_CUBEover a cube-array view until that remap has a test. A 2-layer cube array with a distinct colour per (layer, face), sampled at layer 1, would catch it.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:49:18Z.
Thanks, both points were right. Pushed
9b540eb6.cubeslice(),slice = floor(r / 8) * 6 + (r mod 8)onr = max(round(z), 0). Layer 0 (plain cube) is unchanged. The SRV rebind already maps a cube array to a 2D array of 6 slices per cube.cubeaxisnow spells out|z| >= |x| && |z| >= |y|.Verification (Linux, executed locally):
python3 -B tests/startup_gfx2hlsl_cube_check.py-> ok (checks thecubeslice(F(v2))sample text, the helper in the preamble and the separate comparisons)startup_gfx2hlsl_cube_alu_check.py(translation controls),startup_image_2d_array_check.py,startup_image_3d_check.py,startup_image_sample_l_check.py,startup_gfx2hlsl_refusals_check.py,startup_gfx2hlsl_f32_nan_check.py-> passNot done yet: the Win2025 WARP run, and a value test that draws a 2-layer cube array with a distinct colour per (layer, face) sampled at layer 1. The remap is only text-checked for now, so the PR stays open for that fixture before it is trusted.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:36:30Z.
Follow-up on the cube-array slice fix (
9b540eb6):f5e61316adds a real D3D12 draw check for thelayer * 8 + facetolayer * 6 + facemapping.tests/startup_image_cube_array_check.pydrawsimage_sample dim:SQ_RSRC_IMG_CUBEfor addresses 0, 5, 8, 9, 13 and reads back slices 0, 5, 6, 7, 11. A mutant that leaves the address aslayer * 8 + facemust read slice 9 for address 9 and fail.startup_image_cube_array_{controls,warp,hardware}.Verification:
python3 -B tests/startup_image_cube_array_check.py,tests/startup_gfx2hlsl_cube_check.py,tests/startup_image_2d_array_check.py,tests/startup_image_3d_check.pyall pass.python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 2035 --force --targets offscreen_check --regex 'startup_(image_cube_array|image_2d_array|image_3d|gfx2hlsl_cube)' --py-checks tests/startup_gfx2hlsl_cube_check.py,tests/startup_image_cube_array_check.pyatf5e61316.startup_image_cube_array_warpandstartup_image_cube_array_controls, 0 failed, 0 skipped). Both Python checks ok on Windows._hardwarevariants ran on that same adapter. A first attempt on the other slot failed with a missing file in that slot's checkout; the rerun above is the passing one.TEXTURECUBEARRAYtoTEXTURE2DARRAYview rewrite ind3d12_draw.inl(the draw binds the array view directly).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:01:34Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:01:34Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1108Re-checked on current head
2e7a81e3: the cube refusal controls are updated in this head (tests/startup_gfx2hlsl_cube_check.py). Resolving. AI-assisted; commands listed were executed locally.Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T11:54:33Z.
Three fixtures, three runs, all on the AMD adapter (
adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550,driver=32.0.32029.2010), backendhardware, both compilers.Cube ALU —
startup_gfx2hlsl_cube_alu_check.py draw <dxc> <check> hardware <fxc>:Cube image addressing —
startup_image_cube_array_check.py draw ..., five addresses per compiler:Addresses 0, 5, 8, 9 and 13 give slices 0, 5, 6, 7 and 11 under
dxc, the same underfxc, and the mutation that leaves thelayer * 8 + faceindexing in place is caught. Why 8 has to become 6 is stated by the fixture itself (tests/startup_image_cube_array_check.py:9-11) and by the helper ingfx2hlsl.py:3181— the ISA indexes with eight face slots per layer, the bound array view has six — that is their explanation, not something the log prints; the log only shows the pairs.2D array —
startup_image_2d_array_check.py draw ...: 24 readbacks and 20 mutation runs per compiler, all matching, all mutations failing.Limits of my run. The cube-array fixture reads
s = 1.75andt = 1.25(per its docstring), so in my run the bias removal is exercised on those two coordinates and I did not try others. The cube-ALU fixture carries no such coordinates. And out of the five addresses above, the only one that leaves the six-slice mapping is the mutation, which is expected to fail.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:54:50Z.
Stage-2 verification at head
2e7a81e3a333a88a686c7cdaf13613a3c8588867(Windows Server 2025 build 26100, MSVC 14.44, D3D12 WARP, 3-slot pool):x2w_pipe.py win2025 2035 --force --targets offscreen_check --regex 'cube|startup_image_(2d_array|3d|sample_l)|gfx2hlsl'plus the three cube Python checks: dev 105/105 and release 105/105 passed.startup_gfx2hlsl_cube,startup_gfx2hlsl_cube_alu_{controls,warp},startup_image_cube_array_{controls,warp}.startup_gfx2hlsl_cube_check.py,startup_gfx2hlsl_cube_alu_check.py,startup_image_cube_array_check.py: ok.Co-Authored-By, no local-probe mentions.Note for the author: the PR body is stale. It still says "Win2025 run: not executed" and does not mention
cubeslice()(layer8+face to layer6+face), the two WARP draw checks, or the D3D12 SRV rebind. Please refresh it before Ready.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T11:59:05Z.
Ran head
2e7a81e3on three adapters. All pass. Windows 11 build 26100, debug layer unavailable, FXC and DXC from SDK 10.0.26100.0. The adapter for each hardware run came fromXBOX2WINDOWS_ADAPTERand was confirmed by theadapter=line.startup_gfx2hlsl_cube,startup_gfx2hlsl_cube_alu_controls,startup_image_cube_array_controlsstartup_gfx2hlsl_cube_alu_{warp,hardware}startup_image_cube_array_{warp,hardware}For context: in a local census of start-up shader requests (aggregate counts only, one input, not checked in CI),
v_cubema/sc/tc_f32each appear in 221 pixel code pairs,v_cubeid_f32in 220 andimage dimension SQ_RSRC_IMG_CUBEin 220, so this PR covers a large block of pixel refusals there. The head currently conflicts withmain.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T12:58:20Z.
Thank you for running this on three adapters (WARP, Quadro M1000M, HD Graphics 530) and for the census numbers. Both are useful.
Your pass is on
2e7a81e3. The head has since moved todb59df52, which is a merge ofmaininto the branch. That merge also clears the conflict you noted.After the merge, the Linux Python check
tests/startup_image_sample_b_check.pyfailed. It still expectedimage_sample_bon a cube to be refused, and this PR now accepts cube addressing. The lowering intools/startup/gfx2hlsl.pyis unchanged. Only the test control changed: the refusal case now usesSQ_RSRC_IMG_1D_ARRAY, the same swapstartup_image_sample_l_check.pyalready got in this PR.Fix is commit
52020e6c(test file only,tests/startup_image_sample_b_check.py). Your hardware results should still hold, since no shader code or WARP/hardware test changed after2e7a81e3.Commands run locally:
python3 -I tests/startup_image_sample_b_check.py: ok (failed with "cube was accepted" before the change)python3 -I tests/startup_image_*_check.pyandtests/startup_gfx2hlsl*_check.py: all okOne open point:
image_sample_bon a cube is now accepted through the shared path, but no WARP readback covers the bias case yet.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:50:42Z.
Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is.
We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here.
AI-assisted; commands listed were executed locally.
Pull request closed