| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 39 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %S_block_std140 "S_block_std140" |
| OpMemberName %S_block_std140 0 "inner_0" |
| OpMemberName %S_block_std140 1 "inner_1" |
| OpName %S "S" |
| OpName %load_S_inner_p0 "load_S_inner_p0" |
| OpName %p0 "p0" |
| OpName %func_S_X "func_S_X" |
| OpName %pointer "pointer" |
| OpName %main "main" |
| OpDecorate %S_block_std140 Block |
| OpMemberDecorate %S_block_std140 0 Offset 0 |
| OpMemberDecorate %S_block_std140 1 Offset 8 |
| OpDecorate %S NonWritable |
| OpDecorate %S DescriptorSet 0 |
| OpDecorate %S Binding 0 |
| OpDecorate %_arr_uint_uint_1 ArrayStride 4 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %S_block_std140 = OpTypeStruct %v2float %v2float |
| %_ptr_Uniform_S_block_std140 = OpTypePointer Uniform %S_block_std140 |
| %S = OpVariable %_ptr_Uniform_S_block_std140 Uniform |
| %uint = OpTypeInt 32 0 |
| %6 = OpTypeFunction %v2float %uint |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %uint_1 = OpConstant %uint 1 |
| %22 = OpConstantNull %v2float |
| %_arr_uint_uint_1 = OpTypeArray %uint %uint_1 |
| %23 = OpTypeFunction %v2float %_arr_uint_uint_1 |
| %int = OpTypeInt 32 1 |
| %31 = OpConstantNull %int |
| %void = OpTypeVoid |
| %33 = OpTypeFunction %void |
| %38 = OpConstantComposite %_arr_uint_uint_1 %uint_1 |
| %load_S_inner_p0 = OpFunction %v2float None %6 |
| %p0 = OpFunctionParameter %uint |
| %10 = OpLabel |
| OpSelectionMerge %11 None |
| OpSwitch %p0 %12 0 %13 1 %14 |
| %13 = OpLabel |
| %17 = OpAccessChain %_ptr_Uniform_v2float %S %uint_0 |
| %18 = OpLoad %v2float %17 |
| OpReturnValue %18 |
| %14 = OpLabel |
| %20 = OpAccessChain %_ptr_Uniform_v2float %S %uint_1 |
| %21 = OpLoad %v2float %20 |
| OpReturnValue %21 |
| %12 = OpLabel |
| OpReturnValue %22 |
| %11 = OpLabel |
| OpReturnValue %22 |
| OpFunctionEnd |
| %func_S_X = OpFunction %v2float None %23 |
| %pointer = OpFunctionParameter %_arr_uint_uint_1 |
| %27 = OpLabel |
| %32 = OpCompositeExtract %uint %pointer 0 |
| %28 = OpFunctionCall %v2float %load_S_inner_p0 %32 |
| OpReturnValue %28 |
| OpFunctionEnd |
| %main = OpFunction %void None %33 |
| %36 = OpLabel |
| %37 = OpFunctionCall %v2float %func_S_X %38 |
| OpReturn |
| OpFunctionEnd |