| ; 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 %s "s" |
| 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 %texture_kind "texture_kind" |
| OpName %item_idx "item_idx" |
| OpName %fs "fs" |
| OpDecorate %s DescriptorSet 0 |
| OpDecorate %s Binding 0 |
| OpDecorate %4 DescriptorSet 4 |
| OpDecorate %4 Binding 28 |
| OpDecorate %9 DescriptorSet 4 |
| OpDecorate %9 Binding 28 |
| OpDecorate %12 DescriptorSet 4 |
| OpDecorate %12 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 |
| %3 = OpTypeSampler |
| %_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3 |
| %s = OpVariable %_ptr_UniformConstant_3 UniformConstant |
| %float = OpTypeFloat 32 |
| %7 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_runtimearr_7 = OpTypeRuntimeArray %7 |
| %_ptr_UniformConstant__runtimearr_7 = OpTypePointer UniformConstant %_runtimearr_7 |
| %4 = OpVariable %_ptr_UniformConstant__runtimearr_7 UniformConstant |
| %_runtimearr_7_0 = OpTypeRuntimeArray %7 |
| %_ptr_UniformConstant__runtimearr_7_0 = OpTypePointer UniformConstant %_runtimearr_7_0 |
| %9 = OpVariable %_ptr_UniformConstant__runtimearr_7_0 UniformConstant |
| %_runtimearr_3 = OpTypeRuntimeArray %3 |
| %_ptr_UniformConstant__runtimearr_3 = OpTypePointer UniformConstant %_runtimearr_3 |
| %12 = OpVariable %_ptr_UniformConstant__runtimearr_3 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_6 = OpConstant %uint 6 |
| %_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7 |
| %54 = OpTypeSampledImage %7 |
| %v2float = OpTypeVector %float 2 |
| %56 = OpConstantNull %v2float |
| %uint_1 = OpConstant %uint 1 |
| %v3uint = OpTypeVector %uint 3 |
| %uint_7 = OpConstant %uint 7 |
| %uint_34 = OpConstant %uint 34 |
| %64 = OpConstantComposite %v3uint %uint_6 %uint_7 %uint_34 |
| %v3bool = OpTypeVector %bool 3 |
| %void = OpTypeVoid |
| %73 = OpTypeFunction %void |
| %fs_inner = OpFunction %v4float None %24 |
| %25 = OpLabel |
| %26 = OpLoad %3 %s 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 %v3uint %60 %60 %60 |
| %63 = OpIEqual %v3bool %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 |
| %68 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %43 = OpLoad %uint %68 None |
| OpBranch %39 |
| %41 = OpLabel |
| OpBranch %39 |
| %39 = OpLabel |
| %texture_kind = OpPhi %uint %43 %40 %uint_6 %41 |
| OpSelectionMerge %45 None |
| OpBranchConditional %has_resource %46 %47 |
| %46 = OpLabel |
| OpBranch %45 |
| %47 = OpLabel |
| %69 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %70 = OpLoad %uint %69 None |
| %49 = OpIAdd %uint %uint_0 %70 |
| OpBranch %45 |
| %45 = OpLabel |
| %item_idx = OpPhi %uint %uint_0 %46 %49 %47 |
| %50 = OpAccessChain %_ptr_UniformConstant_7 %4 %item_idx |
| %52 = OpLoad %7 %50 None |
| %53 = OpSampledImage %54 %52 %26 |
| %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 |