Sample address-only 4 KiB tiled BC3/BC7 views in translated draws #1265
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1272"
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 R0Y00 on 2026-11-24T06:24:24Z.
Refs #1146 and #1150. Stacked on #1263. After #1263 lands, retarget this PR to main for integration.
For a read-only, single-sample, single-layer, single-mip BC3_UNORM or BC7_UNORM texture with layout 0x105 and complete 64×64 texel tiles, slot 70 can publish an SRV from guest memory without a placed resource. Translated draws create the desktop texture on first use and copy the compressed blocks into D3D12 footprint rows. The XG layout probe and the uploader share the block addressing formula. The guest address and allocation must remain valid while sampled. Direct submission through a persistent desktop heap is outside the translated-draw profile. No package inputs or recorded textures are included.
Each source-built test samples four complete 128×128 images for each format. Two addresses contain different tile arrangements. Address zero retains the second view, and republishing the first address restores it. The test compares all 65,536 RGBA pixels per format on each adapter. Exchanging neighboring tiles changes 16,384/16,384 pixels for BC3 and 15,360/16,384 for BC7. On #1263 alone the first BC3 pixel was 00000000 instead of ff000070.
Windows 11 build 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, debug layer off. Six tests passed, zero skips, 9.41 s on candidate
06673a11.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:29:00Z.
Review: COMMENTED
Dual-platform review at commit
06673a11b931ff024909881defd163f9dbfe949b:Findings
docs/experiments.md(breaksdocs_links_check.py): lines 8283 (16\xa1\xc116) and 8295 (128\xa1\xc1128) contain invalid UTF-8 byte sequences (0xa1 0xc1) instead of×(\xc3\x97), causingtests/docs_links_check.pyto fail withUnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1.Verification
git diff --check origin/main...HEAD: passedpython -B tests/bidi_controls_check.py: passed (1060 files)python -B tests/docs_links_check.py: failed (UnicodeDecodeErrorindocs/experiments.md)--preset dev):cmake --build --preset dev --target startup_stream_consumer startup_stub_consumer d3d12_xs_shim -- -j 6+ctest --preset dev -R '^(startup_address_(bc_view|srv)_warp|startup_xg_bc7_layout|bc7_tile_swizzle)$' --parallel 4 --no-tests=error --output-on-failure-> 4/4 passed (3.57s:startup_xg_bc7_layout,bc7_tile_swizzle,startup_address_srv_warp,startup_address_bc_view_warp)/O2(--preset release):cmake --build --preset release --target startup_stream_consumer startup_stub_consumer d3d12_xs_shim -- -j 6+ctest --preset release -R '^(startup_address_(bc_view|srv)_warp|startup_xg_bc7_layout|bc7_tile_swizzle)$' --parallel 4 --no-tests=error --output-on-failure-> 4/4 passed (3.58s)Code Notes
Bc16Surfaceintosrc/startup_stubs/bc16_surface.hcleanly shares the 4 KiB standard non-XOR block addressing betweenxg_xs.cppand the draw/memory-SRV path.upload_texturecallscopy_4k_s_to_rowsassuming single-mip, single-slice (plan.count == 1,slices == 1), which is enforced bysupports_memory_srv.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T06:42:05Z.
#1263 has landed. This PR now targets main. The placed-BC7 and address-only BC3/BC7 paths share the same 4 KiB block addressing and upload helper, with their separate eligibility checks intact. The combined Release run passed 12 tests, including R8/SRV and BC3/BC7 pixel readbacks on RTX 4060 Laptop and WARP. The sole skip was WARP's logical-heap fallback test, since WARP accepts the requested heap directly.
ctest --preset release --no-tests=error --output-on-failure -R '^(startup_(address_(bc_view|srv)|logical_view|stream_(draw|request)|xg_bc7_(draw|layout))|bc7_tile_swizzle)'