| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 76 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpExtension "SPV_EXT_descriptor_indexing" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" %fs_loc0_Output |
| OpExecutionMode %fs OriginUpperLeft |
| OpName %t "t" |
| 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 %tint_storage_metadata_length "tint_storage_metadata_length" |
| OpName %has_resource "has_resource" |
| OpName %sampler_kind "sampler_kind" |
| OpName %item_idx "item_idx" |
| OpName %fs "fs" |
| OpDecorate %t DescriptorSet 0 |
| OpDecorate %t Binding 0 |
| OpDecorate %5 DescriptorSet 4 |
| OpDecorate %5 Binding 28 |
| OpDecorate %8 DescriptorSet 4 |
| OpDecorate %8 Binding 28 |
| OpDecorate %11 DescriptorSet 4 |
| OpDecorate %11 Binding 28 |
| 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 5 |
| OpDecorate %tint_resource_table_metadata Binding 29 |
| OpDecorate %tint_resource_table_metadata NonWritable |
| OpDecorate %fs_loc0_Output Location 0 |
| %float = OpTypeFloat 32 |
| %3 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3 |
| %t = OpVariable %_ptr_UniformConstant_3 UniformConstant |
| %_runtimearr_3 = OpTypeRuntimeArray %3 |
| %_ptr_UniformConstant__runtimearr_3 = OpTypePointer UniformConstant %_runtimearr_3 |
| %5 = OpVariable %_ptr_UniformConstant__runtimearr_3 UniformConstant |
| %_runtimearr_3_0 = OpTypeRuntimeArray %3 |
| %_ptr_UniformConstant__runtimearr_3_0 = OpTypePointer UniformConstant %_runtimearr_3_0 |
| %8 = OpVariable %_ptr_UniformConstant__runtimearr_3_0 UniformConstant |
| %14 = OpTypeSampler |
| %_runtimearr_14 = OpTypeRuntimeArray %14 |
| %_ptr_UniformConstant__runtimearr_14 = OpTypePointer UniformConstant %_runtimearr_14 |
| %11 = OpVariable %_ptr_UniformConstant__runtimearr_14 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 |
| %24 = OpTypeFunction %v4float |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %uint_41 = OpConstant %uint 41 |
| %_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14 |
| %54 = OpTypeSampledImage %3 |
| %v2float = OpTypeVector %float 2 |
| %56 = OpConstantNull %v2float |
| %uint_1 = OpConstant %uint 1 |
| %v2uint = OpTypeVector %uint 2 |
| %uint_40 = OpConstant %uint 40 |
| %64 = OpConstantComposite %v2uint %uint_40 %uint_41 |
| %v2bool = OpTypeVector %bool 2 |
| %uint_4 = OpConstant %uint 4 |
| %void = OpTypeVoid |
| %73 = OpTypeFunction %void |
| %fs_inner = OpFunction %v4float None %24 |
| %25 = OpLabel |
| %26 = OpLoad %3 %t None |
| %tint_storage_metadata_length = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %30 = OpLoad %uint %tint_storage_metadata_length None |
| %31 = OpULessThan %bool %uint_0 %30 |
| OpSelectionMerge %33 None |
| OpBranchConditional %31 %34 %35 |
| %34 = OpLabel |
| %58 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %60 = OpLoad %uint %58 None |
| %62 = OpCompositeConstruct %v2uint %60 %60 |
| %63 = OpIEqual %v2bool %62 %64 |
| %37 = OpAny %bool %63 |
| OpBranch %33 |
| %35 = OpLabel |
| OpBranch %33 |
| %33 = OpLabel |
| %has_resource = OpPhi %bool %37 %34 %false %35 |
| OpSelectionMerge %39 None |
| OpBranchConditional %has_resource %40 %41 |
| %40 = OpLabel |
| %67 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %43 = OpLoad %uint %67 None |
| OpBranch %39 |
| %41 = OpLabel |
| OpBranch %39 |
| %39 = OpLabel |
| %sampler_kind = OpPhi %uint %43 %40 %uint_41 %41 |
| OpSelectionMerge %45 None |
| OpBranchConditional %has_resource %46 %47 |
| %46 = OpLabel |
| OpBranch %45 |
| %47 = OpLabel |
| %68 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %69 = OpLoad %uint %68 None |
| %49 = OpIAdd %uint %uint_4 %69 |
| OpBranch %45 |
| %45 = OpLabel |
| %item_idx = OpPhi %uint %uint_0 %46 %49 %47 |
| %50 = OpAccessChain %_ptr_UniformConstant_14 %11 %item_idx |
| %52 = OpLoad %14 %50 None |
| %53 = OpSampledImage %54 %26 %52 |
| %55 = OpImageSampleImplicitLod %v4float %53 %56 None |
| OpReturnValue %55 |
| OpFunctionEnd |
| %fs = OpFunction %void None %73 |
| %74 = OpLabel |
| %75 = OpFunctionCall %v4float %fs_inner |
| OpStore %fs_loc0_Output %75 None |
| OpReturn |
| OpFunctionEnd |