Issue Description
I found a case where vkCreateComputePipelines hangs when a dynamically indexed array is accessed through a member function of a struct stored in an RWStructuredBuffer. The generated SPIR-V passes spirv-val, and vkCreateShaderModule succeeds. The hang occurs during vkCreateComputePipelines, before the shader is ever executed.
Reproducer Code
const static uint MAX_SIZE = 1 << 22;
struct Map
{
uint values[MAX_SIZE];
uint hash(uint k)
{
return k;
}
uint get(uint index)
{
uint slot = hash(index);
return this.values[slot];
}
}
RWStructuredBuffer<Map> hash_map;
RWStructuredBuffer<uint> output;
[shader("compute")]
[numthreads(16, 16, 1)]
void trace_ray(uint3 threadId : SV_DispatchThreadID)
{
output[0] = hash_map[0].get(threadId.x);
}
Changing the MAX_SIZE to much smaller values like 1024 works, however, sizes like 16384 still hang. Making the hash or get free functions work as well.
Expected Behavior
- vkCreateComputePipelines should succeed
Actual Behavior
- Slang compilation succeeds.
- spirv-val accepts the generated SPIR-V.
- vkCreateShaderModule succeeds.
- vkCreateComputePipelines hangs. - The shader is never dispatched/executed.
Environment
- Slang Version
2026.8
- OS: Windows 11
- Vulkan ver:
1.4.351
- NVIDIA driver version:
616.56.0.0
Issue Description
I found a case where vkCreateComputePipelines hangs when a dynamically indexed array is accessed through a member function of a struct stored in an RWStructuredBuffer. The generated SPIR-V passes spirv-val, and vkCreateShaderModule succeeds. The hang occurs during vkCreateComputePipelines, before the shader is ever executed.
Reproducer Code
Changing the MAX_SIZE to much smaller values like 1024 works, however, sizes like 16384 still hang. Making the hash or get free functions work as well.
Expected Behavior
Actual Behavior
Environment
2026.81.4.351616.56.0.0