textures: refuse a block-compressed copy box that does not end on a block #2545
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2553"
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 Asimmimx on 2026-11-25T20:36:46Z.
Summary
check()insrc/startup_stubs/list_copy_texture.hnow also returnsbad_alignmentwhen an explicit block-compressed box'srightorbottomis not a multiple of the block. This includes a box that ends at the edge of a 2x2 or 6x6 mip. Slot 16 already refuses any verdict other thanok(list_copy_texture.inl), so such a copy is dropped and logged, and the rest of the title's command list still closes. Before this change, the copy was forwarded and the desktopClosereturnedE_INVALIDARG, which lost every command in the list.docs/startup-runtime.mdgets one sentence.Fixes #2552
Stacked on #2527. This branch contains #2527's commit (
275d22a5, whole-block bounds). The accepted 8x8 box on a 6x6 mip relies on that rounding. Only the second commit (6cc133c3) belongs to this PR. I will rebase once #2527 lands.Tests
Windows 11 build 26300, dev preset:
5 of 5 passed:
startup_list_copy_texture,_overflow_control(WILL_FAIL),_slice_control(WILL_FAIL),_warp(Microsoft Basic Render Driver) and_hardware(AMD Radeon RX 6600, driver 32.0.21045.29003, debug layer off).tests/docs_links_check.pyandtests/bidi_controls_check.pypass.New cases in
tests/startup_list_copy_texture_check.cpp:bad_alignment):{0,0,2,2}on a 2x2 mip,{0,0,6,6}and{0,0,6,8}on a 6x6 mip;ok:{0,0,8,8}on a 6x6 mip, and an inner whole-block box{4,8,12,16}on a 64x64 texture.Fail-first
With only the header change reverted,
startup_list_copy_texture_check.exeexits 1:With the fix it prints
ok.Device evidence
A source-built scratch program (not added here) records one copy per list with the debug layer off. On both WARP and the RX 6600:
Closereturn0x80070057;The full table is in #2552.
Open
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T21:03:32Z.
I integrated main after #2527, kept the clamped-footprint regressions and added a wrapped-list control in
61401a58. On WARP and RTX 4060 Laptop the wrapper refuses an unaligned right edge and an unaligned bottom edge, then closes and executes the same list. The aligned BC1 block reads back all eight source bytes with the next sentinel intact. Removing only the bottom-edge guard brings backClose→E_INVALIDARGon WARP. The restored Release run passed all five cases withctest --preset release --no-tests=error -j 1 -R '^startup_list_copy_texture' -V. This covers the source-built command list in #2552. The new head is waiting for GitHub’s checks.