textures: check which descriptions take the 64 KiB BC chain #1550
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1557"
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-24T13:56:27Z.
Change
Refs #1149. This adds a device-free check of
x2w_startup::bc64::supports()insrc/startup_stubs/bc64_chain.h. The predicate decides which texture descriptions take the 64 KiB BC chain, and that choice drives two code paths:XGCreateTextureComputer(xg_xs.cpp);d3d12_memory_srv.inl).The
Chainaddress and tile arithmetic is well covered by the existing XG checks. The predicate is not, because every existing test builds only accepted shapes. A predicate that accepts too much passes them all. 8 of 10 mutants left these tests passing:startup_xg_bc_tilingstartup_xg_bc7_layoutstartup_address_srv_warpstartup_address_bc_view_warpstartup_xg_bc_chain_warpstartup_xg_bc_array_warpThe rejected fields (layout
0x109, default alignment, no flags, and so on) are documented as requirements indocs/experiments.md.startup_bc64_supportsincludes only the header and has 26 hand-written descriptions:UNKNOWN, layout64KB_STANDARD_SWIZZLE, the render-target flag,BC7_UNORM_SRGB,BC5_SNORMandBC3_UNORM.startup_bc64_supports_layout_controlruns--mutate layout, which expects layoutUNKNOWNto be accepted, and must fail (WILL_FAIL).The change is test, CMake and
docs/experiments.mdonly. The CMake block followsxg_bc64_tiling_reference, and one paragraph of "Nine-mip BC5/BC7 tile queries" is extended.Verification
Commit
309cfede(main) plus this change,devpreset (Debug), Windows 11 Pro build 26300.9974, MSVC 19.51.36260, Windows SDK 10.0.26100.0, WARP 10.0.26100.9818.xg_bc64_tiling_referenceandxg_swizzle_selectskip (77) here because addrlib is not configured.tests/docs_links_check.py,tests/bidi_controls_check.pyandgit diff --checkpassed.Mutation probe
I applied each mutation to the header alone, rebuilt
startup_stream_consumerandstartup_stub_xg_xs, ran the six tests, then reverted. None of this is committed.startup_bc64_supports(y & 3) << 4→<< 5inaddressAlignment == 0Flags == NONELayout == 0x109SampleDesc.Quality == 0DepthOrArraySize == 1→<= 2TEXTURE2Dtest0x600→0x400Width == 1024→>= 1024!= UNKNOWNI did not test flag value
0x300000.tiled_bc_srvaccepts it on another path, and whether the bc64 chain should ever take it is not settled.Checklist
AI-assisted (Claude Code).