Publish a placed R8 texture SRV by guest address in device slot 70 #1256
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1263"
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:09:02Z.
Refs #1146 and #1150.
Device slot 70 takes a texture description, an SRV description followed by a guest address at offset 0x28, and a destination CPU descriptor handle. This change looks up a unique live placed texture by its exact base and description, validates the view heap slot, and uses the ordinary SRV writer so the title heap and the desktop heap see the same view. The supported profile is a single-sample, single-mip, single-layer R8_UNORM Texture2D. Zero/interior addresses and mismatched descriptions preserve the prior descriptor. Views over unregistered memory and the language-list mask remain open.
Source-built differential test
On Windows 11 build 26200.9974 with the debug layer off, RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818) each matched all 32 expected RGBA pixels across two distinct row patterns, address switches, an ordinary slot-18 control and three rejected updates. Two passes, zero skips. On the original main revision
48b31812, the same test on each adapter gave 16 wrong pixels. Tested produceraa9d605e. The fixture contains generated inputs only.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:16:18Z.
Review: COMMENTED
Reviewed at commit
aa9d605e8dcc8d95830bb732c78fb9ed1b67abf2.Verification
Linux
git diff --check origin/main...HEAD— cleantests/docs_links_check.py— passed (16 Markdown files, 282 links)tests/bidi_controls_check.py— passed (1058 tracked files)Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP)
--preset dev):cmake --build --preset dev --target startup_stream_consumer d3d12_xs_shim -- -j 6— built cleanly (22.77s)ctest --preset dev -R '^startup_address_srv_' --parallel 4 --no-tests=error --output-on-failure— 2/2 passed (startup_address_srv_warp0.82s,startup_address_srv_hardware0.83s; total0.87s)/O2(--preset release):cmake --build --preset release --target startup_stream_consumer d3d12_xs_shim -- -j 6— built cleanly (38.72s)ctest --preset release -R '^startup_address_srv_' --parallel 4 --no-tests=error --output-on-failure— 2/2 passed (startup_address_srv_hardware0.95s,startup_address_srv_warp1.00s; total1.03s)Code Review Notes
src/startup_stubs/d3d12_memory_srv.inl: Cleanly scopes slot 70 to single-sample, single-mip, single-layerDXGI_FORMAT_R8_UNORMTexture2D, validates the destination descriptor handle againstheap_infos(), requires a unique liveWrapper*(refs > 0, exacttitle_memorybase andinfo.consolematch), and delegates toview_slot<18, 2>.device_memory_srvchecksreadable(input, sizeof(*input))(48 bytes), whileview_slot<18, 2>probesreadable(&input->view, 64)for format remapping. Harmless forDXGI_FORMAT_R8_UNORM(maps to itself), though worth keeping in mind ifMemoryShaderResourceViewis ever placed at the end of a page or extended to mapped formats.tests/startup_address_srv.cpp(slot-18 control, alternating addresses, zero address, mismatched width, and+1interior address), all verified pixel-exact.