shader: map a bounded SPIR-V address window to D3D12 storage buffers #547
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/553"
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-22T11:32:47Z.
Refs #218. The first shared failure in a local five-stage SPIR-V to HLSL survey was physical buffer addressing. This change introduces one optional, bounded alternative for a named DWORD-pointer layout. It validates the physical input and logical output with SPIRV-Tools. The runtime provides descriptor-backed packed user words and a raw address window. Nonrepresentable and misaligned offsets select a descriptor out-of-bounds address; overflowing 64-bit index addition cannot alias the start of the buffer.
The public regression builds its own SPIR-V input. It subtracts two words and writes through a third address. Swapping operands, relocating the destination, high words, unaligned accesses, full-width addition overflow and writing past the real view distinguish mapping and bounds errors. Each run compares every word, including the guards.
Tested over main
0a9f4b4on Windows 11 build 26200.9974 with RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818, MSVC 19.51, Windows SDK 10.0.26100.0, SPIRV-Cross57e4efc, and D3D12 debug enabled.python3 -B tests/spirv_window/check.pypassed under WSL. Original and transformed modules validate; invalid input and rejection controls pass.cmake --build --preset dev --target offscreen_checkpassed.offscreen_check.exe hardware --spirv-address-window public-window.dxiland the correspondingwarpinvocation each passed all eight full-buffer comparisons, zero debug errors or warnings and zero skips.ctest --preset dev --no-tests=error -R 'docs_links|^offscreen_warp$' --output-on-failurepassed 2/2. The generated fixture used WSL tools locally. Optional native-tool CTests register on Windows when the three SPIR-V executables are available.Only source and test data created from source are in the patch. The offline corpus prototype additionally handles typed resource arrays and arithmetic and wave operations; its package counts do not constitute coverage of this single adapter. The default pixel translator, CPU AOT, and the native/mapped comparison keep their existing contracts.
AI-assisted contribution.
Imported from R0Y00/Xbox2Windows. Originally posted by rwZephyr on 2026-11-22T18:57:39Z.
Independent AMD verification on upstream
mainatedc2e54e7e75fcd7c0f13e98b47ba119d9a08268. AI-assisted report, tests run locally from unmodified Xbox2Windows source.Windows 11 25H2 x64 build
26200.9974, MSVC19.44.35230, Windows SDK10.0.26100, DXC1.8.2502.8, Python3.12.10. The renderer selected the discrete RX 9070 XT (1002:7550, driver32.0.32029.2010) and WARP (1414:008c,10.0.26100.9818). Both reporteddebug_layer=unavailable.I built SPIRV-Tools v2025.5 with its pinned headers and SPIRV-Cross
57e4efcfrom Khronos source archives. With those tools onPATH,$intakePythonpointing to the local Python environment, and the debug CRT DLLs staged beside the renderer:Both
spirv_address_windowtests passed. Each adapter matched all 16 words for each of the eight cases, including the guard words, the overflowing index addition, and the beyond-descriptor write. The separate& $intakePython -B tests/spirv_window/check.pyrun validated the physical and logical SPIR-V and passed the rejection cases. No unexpected mismatches or capability skips.