startup: read one-dimensional linear (0x100) textures in slot 70 #2929
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2929"
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-26T21:37:24Z.
Stacked on #2926. This branch contains its commit (
80443a78); the change here is the next two commits,a8cf51a7and146bf761. Rebased on main3e9542a6on 27 Nov. Please review #2926 first. I will rebase this onto main once that one merges.Summary
#2926 reads two-dimensional textures in the console linear layout (
0x100) throughdevice slot 70. A one-dimensional
0x100description is still refused withreason=unsupported_description:gfx10::supportstakes only 2D textures andaddress_view_fitshas no1D view.
AMD addrlib's
Gfx10Lib::HwlComputeSurfaceInfoLinearlays out a 1D surface with the same linear rule,one row per mip (each mip padded to 256 bytes, the smallest first), and refuses a 1D surface taller than
one row. This change takes such textures through the existing console-layout path. The draw already
uploads a 1D texture that is not an array.
src/startup_stubs/gfx10_layout.h:supportstakes a 1D texture in the linear mode with a height ofone and an element of one texel. Block-compressed formats and the tiled modes stay refused for 1D.
src/startup_stubs/address_texture.h: a 1D array is refused.address_view_fitstakes aTEXTURE1Dview of a 1D texture that fits the mip range with no LOD clamp.
src/startup_stubs/d3d12_memory_srv.inl: the desktop format check asks for theTEXTURE1Dsupportbit for a 1D texture.
tests/startup_gfx10_layout_check.cpp:146bf761gfx10::supportsrefuses it asaddress_view_fitsalready did), 3 new address descriptions and 6 new view checks.--addrlibrun gains three 1D textures (ADDR_RSRC_TEX_1D).tests/startup_address_srv.cpp:X2W_TEST_CONSOLE_DESCtakes an optional trailing1d, whichcreates a 1D description with a 1D view.
tests/startup_address_console_check.py:Texture1Dview: RGBA8 300 with one mip, and a 4-mip chain viewed at mips 0 and 2.linear-unpaddedcontrol also checks the 1D chain with its mips packed without padding.docs/startup-runtime.md: the description rule names 1D linear textures.docs/experiments/startup-gfx10-linear-1d.md: the note (linked from the 2D note).Tests
Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 5090 (driver 32.0.16.1088), Microsoft WARP. Debug layer
on (dev preset). addrlib: Mesa 25.1.0 via
tools/fetch_addrlib.py.startup_gfx10_layout: PASS (15 round trips, 1 linear chain, 15 refusals, 22 address descriptions, 33 views). Negative control for146bf761: without its guard,FAIL accepted: 1D array.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.startup_gfx10_layout_linear_order_control: expected failure (unchanged).startup_gfx10_layout_linear_addrlib: PASS,349547 linear sizes and addresses compared, 0 mismatches.startup_address_console_warp,_hardware: PASS. The 3 new 1D draws match all 65,536 pixelsexactly; the earlier draws and the held/late cases are unchanged.
startup_address_console_linear_unpadded_warp,_hardware: PASS. The unpadded 1D chain (mip 2 at152 instead of 256) is published and 65,536 of 65,536 pixels differ. The 2D case is unchanged
(63,488 differ).
00000000, and010300ffwas expected.ctest --preset dev -R 'address|gfx10|memory_srv|xg_|bc64|tile64|small_texture|bc7|slot70|texture|console|1d'.-j 8,_hardwareandstartup_audioexcluded): 124 tests, 0 failed, 7 skipped(
spirv_address_window*_warpandbc7_mode6_multiblock_warp, all capability skips, 77).-j 1): 49 tests, 0 failed, 7 skipped (the same capability skips).A local 600 s real-world run (release build, same change on top of the slot-70 stack) ended at the
timeout with exit 0. The two 1D
0x100shapes the previous run refused asunsupported_description(R8G8B8A8_UNORM_SRGB and R8_UNORM, one mip each) were not refused, and no
0x100description wasrefused.
The addressing rule is addrlib's desktop GFX10 rule. That console memory uses it for
0x100isinferred from the layout word, not measured on console hardware.
This change was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:24:47Z.
Review: COMMENTED
PR #2929 by @pigalot — startup: read one-dimensional linear (0x100) textures in slot 70
What works
Issues
Recommendations
Overall
A clean extension of the linear layout path to 1D textures. The layout derivation from addrlib is well-documented and the test matrix covers accepted, refused, and control cases. Ready to merge once the minor view-dimension explicitness items are addressed.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:27:26Z.
Review: COMMENTED
PR #2929 by @pigalot -- startup: read one-dimensional linear (0x100) textures in slot 70
What works
Issues
Recommendations
Overall
A focused, well-tested extension to the linear layout path. The code is clean and consistent with the existing 2D linear work. No blocking issues.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:53:28Z.
This PR is stacked on #2926 and no longer merges cleanly with main (it carries #2926's commit, which now conflicts in
docs/startup-runtime.md,src/startup_stubs/gfx10_layout.h,tests/startup_address_console_check.py).Order: #2926 merges first, then this one, then #2938. Please resolve #2926 first, then merge main into this branch once #2926 has landed.
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:48Z.
Merged main into this branch to clear the conflicts (merge commit
1fc90585d, no rebase); took the updated #2926 branch too; the console view test now reads one description suffix (,1d or ,depth). Testing on Windows now.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:42:29Z.
Review: COMMENTED
No bug found.
Reviewed the diff against the D3D12 and console layout rules. One-dimensional linear textures: 1D arrays are refused consistently in supports() and console_address_texture, and the 1D view and format-support checks match D3D12.
Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, aws-1, exact head
1fc90585d, dev and release run in parallel):x2w_pipe.py win2025 2929 --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 (149 of 149 in the first, broader run; skips are capability skips).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:49:01Z.
Review: COMMENTED
Merged main into this branch again after #2926 landed (merge commit
59584e54d, no rebase); main now holds #2926 as one squashed commit, so its files replace the old copy here and only the 1D linear change remains.Reviewed the diff against the D3D12 and console layout rules. No bug found. 1D arrays are refused consistently in supports() and console_address_texture; the 1D view and format-support checks match D3D12; tests extend the layout check, the SRV check and the console check.
Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, aws-1, exact head
59584e54d, dev and release in parallel):x2w_pipe.py win2025 2929 --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 125 of 125 run passed, release exit 0 (capability skips only).AI-assisted; commands listed were executed locally.