startup: read linear (0x100) textures in slot 70 #2926
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2926"
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:09:57Z.
Summary
Device slot 70 refused a texture description whose
Layoutis0x100(theADDR_SW_LINEARswizzlemode word) unless it was a single texel, with
reason=unsupported_description. The extent of itsrows was not established. AMD addrlib's
Gfx10Lib::HwlComputeSurfaceInfoLineargives the extent:GetMipSize), then aligned to 256 bytes.This change restates that rule in
src/startup_stubs/gfx10_layout.h. Two-dimensional lineartextures then go through the existing console-layout path: view checks, XG holds and upload as
desktop footprint rows. One-dimensional and three-dimensional linear textures stay refused.
gfx10_layout.h:supportsaccepts mode 0 for 2D textures.Layoutcomputes the linear pitch andmip offsets, and
addressreads rows.address_texture.h: comment only (linear is now one of the console layouts).tests/startup_gfx10_layout_check.cpp:--addrlibrun compares every element address and the surface size of 11 linear textures with addrlib itself.tests/startup_address_console_check.py:linear-unpaddednegative control.tests/cmake/startup_gfx10_linear.cmake: the order control, the addrlib run (skips with 77 without addrlib) and the unpadded control on WARP and hardware.docs/startup-runtime.md:0x100moves from the refused list to the accepted list.docs/experiments/startup-gfx10-linear.md: the note.This is independent of #1469, which models
SW_LINEARin its own XG texture computer and does not touch the slot-70 path. Its linear rule is the same one.Tests
Commit
80443a78, rebased on main3e9542a6on 27 Nov to resolve a conflict with #2949 intests/startup_address_console_check.py(both added test modes to the same list; the list now has both). The results below were measured atce2d6f50on main6ee878d8. 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.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 (13 round trips, 1 linear chain, ...).startup_gfx10_layout_display_control: expected failure (unchanged).startup_gfx10_layout_linear_order_control: expected failure. With the largest mip first, all 6 offset and address checks fail.startup_gfx10_layout_linear_addrlib: PASS,338763 linear sizes and addresses compared, 0 mismatches (Mesa 25.1.0 addrlib, SW_LINEAR).startup_address_console_warp,_hardware: PASS. The 4 linear draws match all 65,536 pixels exactly; the 7 earlier draws and the 3 held/late cases are unchanged.startup_address_console_linear_unpadded_warp,_hardware: PASS. The texture is published and 63,488 of 65,536 pixels differ.00000000, and010300ffwas expected.ctest --preset dev -R 'address|gfx10|memory_srv|xg_|bc64|tile64|small_texture|bc7|slot70|texture|console'.-j 8,_hardwareexcluded): 121 tests, 0 failed, 7 skipped. The skips are 6spirv_address_window_*_warpandbc7_mode6_multiblock_warp, all capability skips (77).-j 1): 47 tests, 0 failed, 6 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 2D
0x100shapes three earlier runs refused asunsupported_description(R32_FLOAT with 7 mips, and R16G16B16A16_FLOAT with one mip) were not refused. Two 1D
0x100shapesremain refused, as intended.
The addressing rule is addrlib's desktop GFX10 rule. That console memory uses the same 256-byte
pitch for
0x100is inferred 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:25:16Z.
Review: COMMENTED
PR #2926 by @pigalot — startup: read linear (0x100) textures in slot 70
What works
Issues
Recommendations
Overall
Very solid foundation for linear texture readback. The addrlib-based layout derivation is well-tested with order control, addrlib cross-check, and unpadded mismatch. The 256-byte pitch invariant is clearly enforced. Note that #2929 (1D linear) stacks on this and the PR is safe to merge once the test gap for linear-mode refusals is closed.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:28:02Z.
Review: COMMENTED
PR #2926 by @pigalot -- startup: read linear (0x100) textures in slot 70
What works
Issues
Recommendations
Overall
A well-researched, well-tested implementation. The linear layout extension is cleanly separated from tiled modes. Minor concern about BC format handling in linear mode, but the existing refusal behavior is safe. Ready for merge.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:28:03Z.
Review: COMMENTED
PR #2926 by @pigalot -- startup: read linear (0x100) textures in slot 70
What works
Issues
Recommendations
Overall
A well-researched, well-tested implementation. The linear layout extension is cleanly separated from tiled modes. Minor concern about BC format handling in linear mode, but the existing refusal behavior is safe. Ready for merge.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:53:27Z.
This PR no longer merges cleanly with current main. Please merge main into the branch.
Conflicting files:
docs/startup-runtime.md,src/startup_stubs/gfx10_layout.h,tests/startup_address_console_check.py.Merge order for the stack: #2926 first, then #2929, then #2938. After #2926 lands, #2929 and #2938 will need main merged again.
Once it is conflict-free I will test the exact head on Windows (dev + release) and review again.
AI-assisted; commands listed were executed locally. (Trial merge of the PR head into origin/main with
git merge --no-commit --no-ff.)Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:17:47Z.
Merged main into this branch to clear the conflicts (merge commit
fb6996d54, no rebase); kept main's volume support and this PR's linear mode side by side in gfx10_layout.h, the console check and the docs. Testing on Windows now.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:42:28Z.
Review: COMMENTED
No bug found.
Reviewed the diff against the D3D12 and console layout rules. The linear (0x100) layout (256-byte pitch, smallest mip first, no tail) matches the cited addrlib rule; I re-derived the hand-computed mip offsets in the test. The test fails if the layout is reverted (it carries a largest-first mutant).
Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, aws-1, exact head
fb6996d54, dev and release run in parallel):x2w_pipe.py win2025 2926 --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 (121 of 125 each; the 4 not run are capability skips). Earlier run with a broader 'address' regex hit an unrelated cpu_aot_address_size that was not built in the release leg; it passed in dev.AI-assisted; commands listed were executed locally.