Skip to content

vkCreateComputePipelines crashes on 9070 XT (AMD adrenalin 26.8.1) #425

Description

@Phillip-Bociu

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):

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions