You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kyty: AMDVLK crashes in vkCreateComputePipelines on 3D/PRT tiler shaders with vector OpSpecConstantOp Select #341
On AMD's Windows Vulkan driver (amdvlk64.dll), TileManager::CreatePipeline crashes with an access violation (0xc0000005 at amdvlk64.dll+0x22240ac) inside vkCreateComputePipelines when specializing the 64 KB 3D or PRT tiler compute shaders (gpu_tiler_standard64_3d.comp, gpu_tiler_prt.comp, gpu_tiler_prt_3d.comp).
Standalone: Calling vkCreateComputePipelines on GPU_TILER_STANDARD64_3D_SPV, GPU_TILER_PRT_SPV, or GPU_TILER_PRT_3D_SPV with VkSpecializationInfo (ELEMENT_BYTES in {1, 2, 4, 8, 16}, TILE in {0, 1}) segfaults inside amdvlk64.dll with 0xc0000005.
the 4-component shift vector uvec4 s is computed with a chained ternary expression on the ELEMENT_BYTES specialization constant (ELEMENT_BYTES == 1 ? uvec4(...) : ...).
When compiled with glslang -V --target-env vulkan1.3 -Os, those chained vector ternaries lower to OpSpecConstantOp %v4uint Select .... Although valid SPIR-V (passes spirv-val), AMDVLK's shader compiler crashes when lowering vector-typed OpSpecConstantOp Select during specialization.
An audit of all embedded shaders under core/kyty/graphics/host_gpu/shaders/ shows no other shader emits vector OpSpecConstantOp Select (all other ELEMENT_BYTES ternaries are scalar uint, and standard64_3d_extent() in gpu_tiler_standard64_3d.inc already uses if (ELEMENT_BYTES == ...) branches).
Proposed fix
Replace the chained vector ternaries in gpu_tiler_prt.comp, gpu_tiler_prt_3d.comp, and gpu_tiler_standard64_3d.inc with if / else if / else statements, and add a regression test that:
Validates all 13 embedded tiler SPIR-V modules with spirv-val and rejects vector OpSpecConstantOp Select.
Compiles all 90 specialized tiler compute pipelines on Vulkan and verifies GPU Tile and Detile output for Standard64KB3D, Prt64KB, and Prt64KB3D across all five element sizes (1, 2, 4, 8, 16 bytes) bit-for-bit against CPU TileGetBlockOffset.
Thanks for isolating this to the tiler shaders. Please open a single fix(kyty): … PR against AnyKyty with the shader changes, regenerated embedded SPIR-V, and title-independent regression coverage. The key verification is a before-and-after run on the affected Windows AMD driver: show that the regenerated shaders no longer emit vector OpSpecConstantOp Select, that the specialized pipelines build, and that tile and detile output matches the CPU reference bit-for-bit. Include the results in the PR description.
Activity
github-actions commentedon Nov 26, 2026
Thanks for isolating this to the tiler shaders. Please open a single
fix(kyty): …PR againstAnyKytywith the shader changes, regenerated embedded SPIR-V, and title-independent regression coverage. The key verification is a before-and-after run on the affected Windows AMD driver: show that the regenerated shaders no longer emit vectorOpSpecConstantOp Select, that the specialized pipelines build, and that tile and detile output matches the CPU reference bit-for-bit. Include the results in the PR description.