| OpCapability Shader |
| %5 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID |
| OpExecutionMode %main LocalSize 64 1 1 |
| |
| ; Debug Information |
| OpName %constants "constants" ; id %8 |
| OpMemberName %constants 0 "x" |
| OpName %outputBuffer "outputBuffer" ; id %12 |
| OpMemberName %outputBuffer 0 "results" |
| OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" ; id %14 |
| OpName %main "main" ; id %6 |
| |
| ; Annotations |
| OpMemberDecorate %constants 0 Offset 0 |
| OpDecorate %constants Block |
| OpDecorate %7 Binding 0 |
| OpDecorate %7 DescriptorSet 0 |
| OpDecorate %_runtimearr_int ArrayStride 4 |
| OpMemberDecorate %outputBuffer 0 Offset 0 |
| OpDecorate %outputBuffer BufferBlock |
| OpDecorate %10 Binding 1 |
| OpDecorate %10 DescriptorSet 0 |
| OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId |
| |
| ; Types, variables and constants |
| %int = OpTypeInt 32 1 |
| %_ptr_Input_int = OpTypePointer Input %int |
| %constants = OpTypeStruct %int ; Block |
| %_ptr_Uniform_constants = OpTypePointer Uniform %constants |
| %7 = OpVariable %_ptr_Uniform_constants Uniform ; Binding 0, DescriptorSet 0 |
| %_runtimearr_int = OpTypeRuntimeArray %int ; ArrayStride 4 |
| %outputBuffer = OpTypeStruct %_runtimearr_int ; BufferBlock |
| %_ptr_Uniform_outputBuffer = OpTypePointer Uniform %outputBuffer |
| %10 = OpVariable %_ptr_Uniform_outputBuffer Uniform ; Binding 1, DescriptorSet 0 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input ; BuiltIn GlobalInvocationId |
| %void = OpTypeVoid |
| %19 = OpTypeFunction %void |
| %int_0 = OpConstant %int 0 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| |
| |
| ; Function main |
| %main = OpFunction %void None %19 |
| |
| %20 = OpLabel |
| %22 = OpLoad %v3uint %sk_GlobalInvocationID |
| %23 = OpCompositeExtract %uint %22 0 |
| %24 = OpAccessChain %_ptr_Uniform_int %10 %int_0 %23 |
| %26 = OpLoad %int %24 |
| %27 = OpAccessChain %_ptr_Uniform_int %7 %int_0 |
| %28 = OpLoad %int %27 |
| %29 = OpIMul %int %26 %28 |
| OpStore %24 %29 |
| OpReturn |
| OpFunctionEnd |