| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 83 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpExtension "SPV_EXT_descriptor_indexing" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" %fs_loc0_Output |
| OpExecutionMode %fs OriginUpperLeft |
| OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_table_metadata_struct_tint_explicit_layout "tint_resource_table_metadata_struct_tint_explicit_layout" |
| OpName %tint_resource_table_metadata "tint_resource_table_metadata" |
| OpName %fs_loc0_Output "fs_loc0_Output" |
| OpName %fs_inner "fs_inner" |
| OpName %fs "fs" |
| OpDecorate %1 DescriptorSet 43 |
| OpDecorate %1 Binding 51 |
| OpDecorate %6 DescriptorSet 43 |
| OpDecorate %6 Binding 51 |
| OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_table_metadata_struct_tint_explicit_layout Block |
| OpDecorate %tint_resource_table_metadata DescriptorSet 42 |
| OpDecorate %tint_resource_table_metadata Binding 52 |
| OpDecorate %tint_resource_table_metadata NonWritable |
| OpDecorate %fs_loc0_Output Location 0 |
| %float = OpTypeFloat 32 |
| %4 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_runtimearr_4 = OpTypeRuntimeArray %4 |
| %_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4 |
| %1 = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant |
| %9 = OpTypeSampler |
| %_runtimearr_9 = OpTypeRuntimeArray %9 |
| %_ptr_UniformConstant__runtimearr_9 = OpTypePointer UniformConstant %_runtimearr_9 |
| %6 = OpVariable %_ptr_UniformConstant__runtimearr_9 UniformConstant |
| %uint = OpTypeInt 32 0 |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_table_metadata_struct_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_metadata_struct_tint_explicit_layout |
| %tint_resource_table_metadata = OpVariable %_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout StorageBuffer |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %fs_loc0_Output = OpVariable %_ptr_Output_v4float Output |
| %19 = OpTypeFunction %v4float |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4 |
| %int_1 = OpConstant %int 1 |
| %_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 |
| %63 = OpTypeSampledImage %4 |
| %v2float = OpTypeVector %float 2 |
| %65 = OpConstantNull %v2float |
| %uint_1 = OpConstant %uint 1 |
| %uint_5 = OpConstant %uint 5 |
| %uint_33 = OpConstant %uint 33 |
| %void = OpTypeVoid |
| %80 = OpTypeFunction %void |
| %fs_inner = OpFunction %v4float None %19 |
| %20 = OpLabel |
| %21 = OpBitcast %uint %int_0 |
| %24 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %27 = OpLoad %uint %24 None |
| %28 = OpULessThan %bool %21 %27 |
| OpSelectionMerge %30 None |
| OpBranchConditional %28 %31 %32 |
| %31 = OpLabel |
| %67 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %21 |
| %69 = OpLoad %uint %67 None |
| %34 = OpIEqual %bool %69 %uint_5 |
| OpBranch %30 |
| %32 = OpLabel |
| OpBranch %30 |
| %30 = OpLabel |
| %33 = OpPhi %bool %34 %31 %false %32 |
| OpSelectionMerge %36 None |
| OpBranchConditional %33 %37 %38 |
| %37 = OpLabel |
| OpBranch %36 |
| %38 = OpLabel |
| %71 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %72 = OpLoad %uint %71 None |
| %40 = OpIAdd %uint %uint_0 %72 |
| OpBranch %36 |
| %36 = OpLabel |
| %39 = OpPhi %uint %21 %37 %40 %38 |
| %41 = OpAccessChain %_ptr_UniformConstant_4 %1 %39 |
| %43 = OpLoad %4 %41 None |
| %44 = OpBitcast %uint %int_1 |
| %46 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %47 = OpLoad %uint %46 None |
| %48 = OpULessThan %bool %44 %47 |
| OpSelectionMerge %49 None |
| OpBranchConditional %48 %50 %51 |
| %50 = OpLabel |
| %73 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %44 |
| %74 = OpLoad %uint %73 None |
| %53 = OpIEqual %bool %74 %uint_33 |
| OpBranch %49 |
| %51 = OpLabel |
| OpBranch %49 |
| %49 = OpLabel |
| %52 = OpPhi %bool %53 %50 %false %51 |
| OpSelectionMerge %54 None |
| OpBranchConditional %52 %55 %56 |
| %55 = OpLabel |
| OpBranch %54 |
| %56 = OpLabel |
| %76 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %77 = OpLoad %uint %76 None |
| %58 = OpIAdd %uint %uint_1 %77 |
| OpBranch %54 |
| %54 = OpLabel |
| %57 = OpPhi %uint %44 %55 %58 %56 |
| %59 = OpAccessChain %_ptr_UniformConstant_9 %6 %57 |
| %61 = OpLoad %9 %59 None |
| %62 = OpSampledImage %63 %43 %61 |
| %64 = OpImageSampleImplicitLod %v4float %62 %65 None |
| OpReturnValue %64 |
| OpFunctionEnd |
| %fs = OpFunction %void None %80 |
| %81 = OpLabel |
| %82 = OpFunctionCall %v4float %fs_inner |
| OpStore %fs_loc0_Output %82 None |
| OpReturn |
| OpFunctionEnd |