gpu: avoid an indexed constant array in the texture-init shader #742
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/748"
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 lukaslw-lab on 2026-11-23T00:28:27Z.
AI-assisted: prepared with Claude Code; the commands and results below were run on the author's PC.
Change
The texture-init compute shader from #705 picks each texel's color with a select chain instead of an indexed constant array. Windows 10's in-box WARP (
10.0.19041.7811) crashes in its DXIL compiler on that array while creating the PSO, socpu_shim_texture_reuse_warpfails on Windows 10 (#742). The written values are unchanged: the fixture dispatches one 2×2 group, so the index2 * y + xis always 0–3. A shader comment names the cause so the array isn't reintroduced.Fixes #742. Refs #705.
Verification
Commit
c9f9606(on1ab3756) on Windows 10 22H2 (build 19045.7846), Visual Studio 2026 18.12 (MSVC 19.52.37029), Windows SDK 10.0.26100, CMake 4.3.1, Python 3.13.7, DXC 1.9.2609, GPU: NVIDIA GeForce RTX 3080 Ti, driver 610.47.devuses the in-box WARP;w10isdevconfigured with app-local WARP 1.0.22 and Agility SDK 1.620.2 (OFFSCREEN_WARP_DIR,OFFSCREEN_AGILITY_620_DIR).Shim and texture tests, before and after the change (at
fd2486f; the rebase onto1ab3756only touchedtools/setup-spirv-tools.ps1):devcpu_shim_texture_reuse_warpfails: native runner0xc0000005ind3d10warp!CShaderInfo::CompileShaderDXILw10cpu_shim_texture_reuse_warpfails: thepe_maprunner (hosted bypython.exe) loads the in-box WARP and crashes the same wayCapability skips (exit 77):
dev—cpu_shim_chain_warp,mesh_textured_draw_warp,compute_mesh_texture_warp(no mesh shaders on the in-box WARP);w10—cpu_shim_chain_warp.The full
devsuite atc9f9606is still running; I'll post its result as a comment.The native fixture's published output (startup text + three RGBA frames, 49,267 bytes) is byte-identical before and after, for both cases on both adapters wherever the original ran:
textureff7b115bf9d388c7texture-stale0fe5fc1bb64fc246The
devWARP runs, which crashed before, now produce the same two hashes.Evidence and follow-up
texture-stale) still reports its expected first mismatch at stage 2, pixel (24, 8).pe_maprunner, because D3D12 selects the runtime and WARP relative to the host executable.Checklist
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T00:36:52Z.
Full
devsuite atc9f9606(same environment as above, in-box WARP10.0.19041.7811):cpu_shim_texture_reuse_warpandcpu_shim_texture_reuse_hardwarepass.gpu_alias_lookup_writes_warp, already known on this in-box WARP (#332, #369). It's unrelated to this change.mesh_*_warp,dxr_*_warp,bvh_*_warp,wave_shuffle_warp,cpu_shim_chain_warp,compute_mesh_texture_warp); the CPU has no ADX, SHA, CLFLUSHOPT or CLWB (cpu_aot_adx,cpu_aot_crypto_sha,cpu_aot_fences_hints_clflushopt/_clwb,cpu_aot_x87_compare);bvh_wave64_hardwareandwave_shuffle_hardwareneed wave64; the eightspirv_*tests skip because the SPIR-V tools weren't installed when this build was configured.