startup: bind cube views of console-layout textures in slot 70 #2938
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2938"
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 pigalot on 2026-11-26T22:20:31Z.
Refs #2943
Stacked on #2929 (which is stacked on #2926). This branch contains their commits (
80443a78,a8cf51a7,146bf761); the change here is the last commit,d190f0db. Rebased on main3e9542a6on 27 Nov. I'll rebase it ontomainonce those merge.Translator half: no translated shader reads these views yet.
tools/startup/gfx2hlsl.pyrefuses an image instruction withdim:SQ_RSRC_IMG_CUBE(image dimension SQ_RSRC_IMG_CUBE), so it never writes the newtexcubemanifest kind. This PR is the runtime half. The translator half is a separate change: lower cubeimage_sample*to aTextureCubeand writetexcube. That is tracked in #2943.What changes
Device slot 70 refused a two-dimensional array of six slices in a console layout with a
TEXTURECUBEview (reason=unsupported_description), becauseaddress_view_fitshad no cube view.src/startup_stubs/address_texture.h:address_view_fitstakes aTEXTURECUBEview of a 2D texture of exactly six slices that fits the mip range with no LOD clamp. The faces are the slices in D3D order (+X, -X, +Y, -Y, +Z, -Z); they are already addressed and uploaded like any 2D array.src/startup_stubs/d3d12_memory_srv.inl: the desktop format check also asks forD3D12_FORMAT_SUPPORT1_TEXTURECUBEfor a cube view.src/startup_stubs/d3d12_draw.inl: a manifestsrvline of kindtexcube(kind 5) binds aTEXTURECUBEview. The view dimension of each kind is now in one function. A cube view where the shader declarestex2da, or the reverse, still binds null. The d16 exact path still takes only kinds 1 to 4.startup_gfx10_layout, three cube draws instartup_address_console_{warp,hardware}, and a new negative controlstartup_address_console_cube_order_{warp,hardware}(tests/cmake/startup_slot70_cube.cmake).docs/experiments/startup-slot70-cube.md,docs/startup-runtime.md.Results
Build: this branch, dev preset (debug layer on). Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 5090 (driver 32.0.16.1088) and Microsoft WARP.
startup_gfx10_layoutstartup_address_console_{warp,hardware}0x105, its 4-mip chain viewed at mip 1, and BC1 64x64 in0x105. The hand-written shader point-samples each texel centre along the face's directionstartup_address_console_cube_order_{warp,hardware}Without the source change (on its parent commit), the first cube draw reads the null view: pixel (0,0) is
00000000, but010300ffwas expected.Regression on the rebased stack (
d190f0db):ctest --preset dev --no-tests=error -R 'address|gfx10|memory_srv|xg_|bc64|tile64|small_texture|bc7|slot70|texture|console|1d|draw|translated|sampler|d16' -E '_hardware$|startup_audio' -j 8: 228 of 228 passed, 9 capability skips (spirv_*_warp,bc7_mode6_multiblock_warp). The same filter on_hardwaretests at-j 1: 130 of 130 passed, 9 capability skips. The--addrlibcomparison was not rerun after the rebase (that build had no addrlib); the layout code it checks did not change in the rebase. Before the rebase (602a8618): 224 of 224 and 128 of 128.After cpp-migration merged into main (#3039), the same stack rebased locally onto main
98007de5(b38df255) gives the same results: 228 of 228 and 130 of 130, 9 capability skips each. The branch on GitHub still merges cleanly, so it is not force-pushed again.Commands (PowerShell, at the repository root, after
. .\tools\dev.ps1):Still not done: cube arrays (
TEXTURECUBEARRAY) and a cube view of a larger array stay refused.This change was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:22:19Z.
Review: COMMENTED
PR #2938 by @pigalot — startup: bind cube views of console-layout textures in slot 70
What works
Issues
Recommendations
Overall
Clean extension of the slot-70 console path with well-crafted tests. The face ordering control test is particularly good. This is ready as a stack review — defer merge-approval until the stacked PRs (#2926, #2929) also pass review.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:53:29Z.
This PR is stacked on #2929 (which is stacked on #2926) and no longer merges cleanly with main, through the inherited #2926 commit.
Order: #2926, then #2929, then this one. Please merge main into the branch after #2929 lands.
AI-assisted; commands listed were executed locally. (Trial merge against origin/main.)
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:17:49Z.
Merged main into this branch to clear the conflicts (merge commit
16f8d91a9, no rebase); took the updated #2929 branch too; the console view test reads ,1d, ,cube or ,depth, and the check runs the cubes and the volumes. Testing on Windows now.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:42:31Z.
Review: COMMENTED
No bug found.
Reviewed the diff against the D3D12 and console layout rules. Cube views read a 2D array of six as faces +X, -X, +Y, -Y, +Z, -Z (D3D12 order) and check FORMAT_SUPPORT1_TEXTURECUBE on the desktop device.
Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, aws-1, exact head
16f8d91a9, dev and release run in parallel):x2w_pipe.py win2025 2938 --force --scope full --host aws-1 --regex 'startup_address|startup_resource_address|gfx10|memory_srv|slot70|volume|linear|cube|console|_1d|startup_ui_texture': dev and release both pass (127 of 127 in the final run).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:54:37Z.
Review: COMMENTED
Merged main into this branch after #2926 and #2929 landed (merge commit
a44deaa85, no rebase); their squashed files replace the old copies here and only the cube view change remains.Reviewed the diff against the D3D12 and console layout rules. No bug found. A cube view reads a 2D array of six as faces +X, -X, +Y, -Y, +Z, -Z (D3D12 order), checks FORMAT_SUPPORT1_TEXTURECUBE on the desktop device, and the console check draws the cubes (including an order control).
Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, aws-1, exact head
a44deaa85, dev and release in parallel):x2w_pipe.py win2025 2938 --force --scope full --host aws-1 --regex 'startup_address|startup_resource_address|gfx10|memory_srv|slot70|volume|linear|cube|console|_1d|startup_ui_texture': dev 127 of 127 run passed, release exit 0 (capability skips only).AI-assisted; commands listed were executed locally.