| OpCapability Shader |
| %5 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 16 16 1 |
| |
| ; Debug Information |
| OpName %outX "outX" ; id %7 |
| OpName %outY "outY" ; id %9 |
| OpName %outZ "outZ" ; id %10 |
| OpName %main "main" ; id %6 |
| OpName %IndirectDispatchArgs "IndirectDispatchArgs" ; id %15 |
| OpMemberName %IndirectDispatchArgs 0 "x" |
| OpMemberName %IndirectDispatchArgs 1 "y" |
| OpMemberName %IndirectDispatchArgs 2 "z" |
| OpName %args "args" ; id %14 |
| |
| ; Annotations |
| OpMemberDecorate %IndirectDispatchArgs 0 Offset 0 |
| OpMemberDecorate %IndirectDispatchArgs 1 Offset 4 |
| OpMemberDecorate %IndirectDispatchArgs 2 Offset 8 |
| OpDecorate %_arr_IndirectDispatchArgs_int_3 ArrayStride 16 |
| |
| ; Types, variables and constants |
| %int = OpTypeInt 32 1 |
| %_ptr_Input_int = OpTypePointer Input %int |
| %_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 |
| %12 = OpTypeFunction %void |
| %IndirectDispatchArgs = OpTypeStruct %int %int %int |
| %int_3 = OpConstant %int 3 |
| %_arr_IndirectDispatchArgs_int_3 = OpTypeArray %IndirectDispatchArgs %int_3 ; ArrayStride 16 |
| %_ptr_Function__arr_IndirectDispatchArgs_int_3 = OpTypePointer Function %_arr_IndirectDispatchArgs_int_3 |
| %int_0 = OpConstant %int 0 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %int_1 = OpConstant %int 1 |
| %int_2 = OpConstant %int 2 |
| |
| |
| ; Function main |
| %main = OpFunction %void None %12 |
| |
| %13 = OpLabel |
| %args = OpVariable %_ptr_Function__arr_IndirectDispatchArgs_int_3 Function |
| %20 = OpAccessChain %_ptr_Function_int %args %int_0 %int_0 |
| %22 = OpLoad %int %20 |
| OpStore %outX %22 |
| %24 = OpAccessChain %_ptr_Function_int %args %int_1 %int_1 |
| %25 = OpLoad %int %24 |
| OpStore %outY %25 |
| %27 = OpAccessChain %_ptr_Function_int %args %int_2 %int_2 |
| %28 = OpLoad %int %27 |
| OpStore %outZ %28 |
| OpReturn |
| OpFunctionEnd |