Simply trying to compile this compute shader causes a crash:
; SPIR-V
; Version: 1.5
; Generator: Khronos Slang Compiler; 0
; Bound: 17
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %outImage
OpExecutionMode %main LocalSize 8 8 1
OpSource Slang 1
OpName %outImage "outImage"
OpName %main "main"
OpDecorate %outImage Binding 0
OpDecorate %outImage DescriptorSet 0
%void = OpTypeVoid
%4 = OpTypeFunction %void
%float = OpTypeFloat 32
%6 = OpTypeImage %float 2D 2 0 0 2 R32f
%_ptr_UniformConstant_6 = OpTypePointer UniformConstant %6
%v4float = OpTypeVector %float 4
%float_0 = OpConstant %float 0
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%uint_0 = OpConstant %uint 0
%13 = OpConstantComposite %v2uint %uint_0 %uint_0
%outImage = OpVariable %_ptr_UniformConstant_6 UniformConstant
%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main = OpFunction %void None %4
%15 = OpLabel
%16 = OpLoad %6 %outImage
OpImageWrite %16 %13 %14
OpReturn
OpFunctionEnd
This was compiled from the following .slang file:
[vk::image_format("r32f")]
RWTexture2D<float> outImage;
[numthreads(8,8,1)]
[shader("compute")]
void main(
const vector<uint32_t, 3> invocationId : SV_DispatchThreadID
) {
outImage.Store({}, 0.0f);
}
The issue reproduces regardless of what image format I specify for the RWTexture2D (I can remove it, change it from float to float2,3,4, uint, etc.). Still crashes. Changing the parameters of the Store() function also seems irrelevant. All that seems to matter is that a compute shader writes to any RWTexture2D.
Here's the callstack (the part I can actually see):

Simply trying to compile this compute shader causes a crash:
This was compiled from the following .slang file:
The issue reproduces regardless of what image format I specify for the RWTexture2D (I can remove it, change it from float to float2,3,4, uint, etc.). Still crashes. Changing the parameters of the Store() function also seems irrelevant. All that seems to matter is that a compute shader writes to any RWTexture2D.
Here's the callstack (the part I can actually see):