| OpCapability Shader |
| %5 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 16 16 1 |
| |
| ; Debug Information |
| OpName %IndirectDispatchArgs "IndirectDispatchArgs" ; id %8 |
| OpMemberName %IndirectDispatchArgs 0 "x" |
| OpMemberName %IndirectDispatchArgs 1 "y" |
| OpMemberName %IndirectDispatchArgs 2 "z" |
| OpName %InputBuffer "InputBuffer" ; id %9 |
| OpMemberName %InputBuffer 0 "args" |
| OpName %outX "outX" ; id %11 |
| OpName %outY "outY" ; id %13 |
| OpName %outZ "outZ" ; id %14 |
| OpName %main "main" ; id %6 |
| |
| ; Annotations |
| OpMemberDecorate %IndirectDispatchArgs 0 Offset 0 |
| OpMemberDecorate %IndirectDispatchArgs 1 Offset 4 |
| OpMemberDecorate %IndirectDispatchArgs 2 Offset 8 |
| OpMemberDecorate %InputBuffer 0 Offset 0 |
| OpMemberDecorate %InputBuffer 0 RelaxedPrecision |
| OpDecorate %InputBuffer BufferBlock |
| OpDecorate %7 Binding 0 |
| OpDecorate %7 DescriptorSet 0 |
| |
| ; Types, variables and constants |
| %int = OpTypeInt 32 1 |
| %_ptr_Input_int = OpTypePointer Input %int |
| %IndirectDispatchArgs = OpTypeStruct %int %int %int |
| %InputBuffer = OpTypeStruct %IndirectDispatchArgs ; BufferBlock |
| %_ptr_Uniform_InputBuffer = OpTypePointer Uniform %InputBuffer |
| %7 = OpVariable %_ptr_Uniform_InputBuffer Uniform ; Binding 0, DescriptorSet 0 |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| %outX = OpVariable %_ptr_Workgroup_int Workgroup |
| %outY = OpVariable %_ptr_Workgroup_int Workgroup |
| %outZ = OpVariable %_ptr_Workgroup_int Workgroup |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void |
| %int_0 = OpConstant %int 0 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %int_1 = OpConstant %int 1 |
| %int_2 = OpConstant %int 2 |
| |
| |
| ; Function main |
| %main = OpFunction %void None %16 |
| |
| %17 = OpLabel |
| %19 = OpAccessChain %_ptr_Uniform_int %7 %int_0 %int_0 |
| %21 = OpLoad %int %19 |
| OpStore %outX %21 |
| %23 = OpAccessChain %_ptr_Uniform_int %7 %int_0 %int_1 |
| %24 = OpLoad %int %23 |
| OpStore %outY %24 |
| %26 = OpAccessChain %_ptr_Uniform_int %7 %int_0 %int_2 |
| %27 = OpLoad %int %26 |
| OpStore %outZ %27 |
| OpReturn |
| OpFunctionEnd |