1 ; SPIR-V 2 ; Version: 1.0 3 ; Generator: Khronos Glslang Reference Front End; 1 4 ; Bound: 65 5 ; Schema: 0 6 OpCapability Shader 7 %1 = OpExtInstImport "GLSL.std.450" 8 OpMemoryModel Logical GLSL450 9 OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID 10 OpExecutionMode %main LocalSize 1 1 1 11 OpSource GLSL 450 12 OpSourceExtension "GL_ARB_shading_language_420pack" 13 OpSourceExtension "GL_GOOGLE_cpp_style_line_directive" 14 OpSourceExtension "GL_GOOGLE_include_directive" 15 OpName %main "main" 16 OpName %xy "xy" 17 OpName %gl_GlobalInvocationID "gl_GlobalInvocationID" 18 OpName %inputPixel "inputPixel" 19 OpName %inputTexture "inputTexture" 20 OpName %res "res" 21 OpName %globalBuffer "globalBuffer" 22 OpMemberName %globalBuffer 0 "coeff" 23 OpMemberName %globalBuffer 1 "width" 24 OpMemberName %globalBuffer 2 "height" 25 OpName %globalBlock "globalBlock" 26 OpName %x "x" 27 OpName %y "y" 28 OpName %outputBufferS "outputBufferS" 29 OpMemberName %outputBufferS 0 "buf" 30 OpName %outputBuffer "outputBuffer" 31 OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId 32 OpDecorate %inputTexture DescriptorSet 0 33 OpDecorate %inputTexture Binding 0 34 OpMemberDecorate %globalBuffer 0 Offset 0 35 OpMemberDecorate %globalBuffer 1 Offset 16 36 OpMemberDecorate %globalBuffer 2 Offset 20 37 OpDecorate %globalBuffer BufferBlock 38 OpDecorate %globalBlock DescriptorSet 0 39 OpDecorate %globalBlock Binding 2 40 OpDecorate %_runtimearr_v4float ArrayStride 16 41 OpMemberDecorate %outputBufferS 0 Offset 0 42 OpDecorate %outputBufferS BufferBlock 43 OpDecorate %outputBuffer DescriptorSet 0 44 OpDecorate %outputBuffer Binding 1 45 %void = OpTypeVoid 46 %3 = OpTypeFunction %void 47 %int = OpTypeInt 32 1 48 %v2int = OpTypeVector %int 2 49 %_ptr_Function_v2int = OpTypePointer Function %v2int 50 %uint = OpTypeInt 32 0 51 %v3uint = OpTypeVector %uint 3 52 %_ptr_Input_v3uint = OpTypePointer Input %v3uint 53 %gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input 54 %v2uint = OpTypeVector %uint 2 55 %float = OpTypeFloat 32 56 %v4float = OpTypeVector %float 4 57 %_ptr_Function_v4float = OpTypePointer Function %v4float 58 %22 = OpTypeImage %float 2D 0 0 0 1 Unknown 59 %23 = OpTypeSampledImage %22 60 %_ptr_UniformConstant_23 = OpTypePointer UniformConstant %23 61 %inputTexture = OpVariable %_ptr_UniformConstant_23 UniformConstant 62 %28 = OpConstant %int 0 63 %globalBuffer = OpTypeStruct %v4float %int %int 64 %_ptr_Uniform_globalBuffer = OpTypePointer Uniform %globalBuffer 65 %globalBlock = OpVariable %_ptr_Uniform_globalBuffer Uniform 66 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float 67 %_ptr_Function_uint = OpTypePointer Function %uint 68 %42 = OpConstant %uint 0 69 %_ptr_Input_uint = OpTypePointer Input %uint 70 %47 = OpConstant %uint 1 71 %_runtimearr_v4float = OpTypeRuntimeArray %v4float 72 %outputBufferS = OpTypeStruct %_runtimearr_v4float 73 %_ptr_Uniform_outputBufferS = OpTypePointer Uniform %outputBufferS 74 %outputBuffer = OpVariable %_ptr_Uniform_outputBufferS Uniform 75 %55 = OpConstant %int 1 76 %_ptr_Uniform_int = OpTypePointer Uniform %int 77 %main = OpFunction %void None %3 78 %5 = OpLabel 79 %xy = OpVariable %_ptr_Function_v2int Function 80 %inputPixel = OpVariable %_ptr_Function_v4float Function 81 %res = OpVariable %_ptr_Function_v4float Function 82 %x = OpVariable %_ptr_Function_uint Function 83 %y = OpVariable %_ptr_Function_uint Function 84 %15 = OpLoad %v3uint %gl_GlobalInvocationID 85 %16 = OpVectorShuffle %v2uint %15 %15 0 1 86 %17 = OpBitcast %v2int %16 87 OpStore %xy %17 88 %26 = OpLoad %23 %inputTexture 89 %27 = OpLoad %v2int %xy 90 %29 = OpImageFetch %v4float %26 %27 Lod %28 91 OpStore %inputPixel %29 92 %31 = OpLoad %v4float %inputPixel 93 %36 = OpAccessChain %_ptr_Uniform_v4float %globalBlock %28 94 %37 = OpLoad %v4float %36 95 %38 = OpDot %float %31 %37 96 %39 = OpCompositeConstruct %v4float %38 %38 %38 %38 97 OpStore %res %39 98 %44 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %42 99 %45 = OpLoad %uint %44 100 OpStore %x %45 101 %48 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %47 102 %49 = OpLoad %uint %48 103 OpStore %y %49 104 %54 = OpLoad %uint %y 105 %57 = OpAccessChain %_ptr_Uniform_int %globalBlock %55 106 %58 = OpLoad %int %57 107 %59 = OpBitcast %uint %58 108 %60 = OpIMul %uint %54 %59 109 %61 = OpLoad %uint %x 110 %62 = OpIAdd %uint %60 %61 111 %63 = OpLoad %v4float %res 112 %64 = OpAccessChain %_ptr_Uniform_v4float %outputBuffer %28 %62 113 OpStore %64 %63 114 OpReturn 115 OpFunctionEnd 116