| ; |
| ; fragment_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 47 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpExtension "SPV_EXT_descriptor_indexing" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fragment_main "fragment_main" |
| OpExecutionMode %fragment_main OriginUpperLeft |
| OpMemberName %prevent_dce_block 0 "inner" |
| OpName %prevent_dce_block "prevent_dce_block" |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_table_buffer_tint_explicit_layout "tint_resource_table_buffer_tint_explicit_layout" |
| OpName %hasResource_fd2603 "hasResource_fd2603" |
| OpName %res "res" |
| OpName %fragment_main "fragment_main" |
| OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| OpDecorate %prevent_dce_block Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| OpDecorate %5 DescriptorSet 42 |
| OpDecorate %5 Binding 41 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_table_buffer_tint_explicit_layout Block |
| OpDecorate %10 DescriptorSet 42 |
| OpDecorate %10 Binding 42 |
| OpDecorate %10 NonWritable |
| %int = OpTypeInt 32 1 |
| %prevent_dce_block = OpTypeStruct %int |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %uint = OpTypeInt 32 0 |
| %8 = OpTypeImage %uint 2D 0 0 1 1 Unknown |
| %_runtimearr_8 = OpTypeRuntimeArray %8 |
| %_ptr_UniformConstant__runtimearr_8 = OpTypePointer UniformConstant %_runtimearr_8 |
| %5 = OpVariable %_ptr_UniformConstant__runtimearr_8 UniformConstant |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_table_buffer_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_buffer_tint_explicit_layout |
| %10 = OpVariable %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout StorageBuffer |
| %15 = OpTypeFunction %int |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %int_1 = OpConstant %int 1 |
| %int_0 = OpConstant %int 0 |
| %uint_21 = OpConstant %uint 21 |
| %void = OpTypeVoid |
| %42 = OpTypeFunction %void |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| %hasResource_fd2603 = OpFunction %int None %15 |
| %16 = OpLabel |
| %res = OpVariable %_ptr_Function_bool Function |
| %17 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_0 |
| %20 = OpLoad %uint %17 None |
| %21 = OpULessThan %bool %uint_1 %20 |
| OpSelectionMerge %24 None |
| OpBranchConditional %21 %25 %26 |
| %25 = OpLabel |
| %37 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_1 %uint_1 |
| %38 = OpLoad %uint %37 None |
| %28 = OpIEqual %bool %38 %uint_21 |
| OpBranch %24 |
| %26 = OpLabel |
| OpBranch %24 |
| %24 = OpLabel |
| %27 = OpPhi %bool %28 %25 %false %26 |
| OpStore %res %27 |
| %32 = OpLoad %bool %res None |
| %33 = OpLogicalEqual %bool %32 %false |
| %34 = OpSelect %int %33 %int_1 %int_0 |
| OpReturnValue %34 |
| OpFunctionEnd |
| %fragment_main = OpFunction %void None %42 |
| %43 = OpLabel |
| %44 = OpFunctionCall %int %hasResource_fd2603 |
| %45 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 |
| OpStore %45 %44 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; compute_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 47 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpExtension "SPV_EXT_descriptor_indexing" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpMemberName %prevent_dce_block 0 "inner" |
| OpName %prevent_dce_block "prevent_dce_block" |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_table_buffer_tint_explicit_layout "tint_resource_table_buffer_tint_explicit_layout" |
| OpName %hasResource_fd2603 "hasResource_fd2603" |
| OpName %res "res" |
| OpName %compute_main "compute_main" |
| OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| OpDecorate %prevent_dce_block Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| OpDecorate %5 DescriptorSet 42 |
| OpDecorate %5 Binding 41 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_table_buffer_tint_explicit_layout Block |
| OpDecorate %10 DescriptorSet 42 |
| OpDecorate %10 Binding 42 |
| OpDecorate %10 NonWritable |
| %int = OpTypeInt 32 1 |
| %prevent_dce_block = OpTypeStruct %int |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %uint = OpTypeInt 32 0 |
| %8 = OpTypeImage %uint 2D 0 0 1 1 Unknown |
| %_runtimearr_8 = OpTypeRuntimeArray %8 |
| %_ptr_UniformConstant__runtimearr_8 = OpTypePointer UniformConstant %_runtimearr_8 |
| %5 = OpVariable %_ptr_UniformConstant__runtimearr_8 UniformConstant |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_table_buffer_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_buffer_tint_explicit_layout |
| %10 = OpVariable %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout StorageBuffer |
| %15 = OpTypeFunction %int |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %int_1 = OpConstant %int 1 |
| %int_0 = OpConstant %int 0 |
| %uint_21 = OpConstant %uint 21 |
| %void = OpTypeVoid |
| %42 = OpTypeFunction %void |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| %hasResource_fd2603 = OpFunction %int None %15 |
| %16 = OpLabel |
| %res = OpVariable %_ptr_Function_bool Function |
| %17 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_0 |
| %20 = OpLoad %uint %17 None |
| %21 = OpULessThan %bool %uint_1 %20 |
| OpSelectionMerge %24 None |
| OpBranchConditional %21 %25 %26 |
| %25 = OpLabel |
| %37 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_1 %uint_1 |
| %38 = OpLoad %uint %37 None |
| %28 = OpIEqual %bool %38 %uint_21 |
| OpBranch %24 |
| %26 = OpLabel |
| OpBranch %24 |
| %24 = OpLabel |
| %27 = OpPhi %bool %28 %25 %false %26 |
| OpStore %res %27 |
| %32 = OpLoad %bool %res None |
| %33 = OpLogicalEqual %bool %32 %false |
| %34 = OpSelect %int %33 %int_1 %int_0 |
| OpReturnValue %34 |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %42 |
| %43 = OpLabel |
| %44 = OpFunctionCall %int %hasResource_fd2603 |
| %45 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 |
| OpStore %45 %44 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; vertex_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 67 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpExtension "SPV_EXT_descriptor_indexing" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_table_buffer_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_table_buffer_tint_explicit_layout "tint_resource_table_buffer_tint_explicit_layout" |
| OpName %vertex_main_position_Output "vertex_main_position_Output" |
| OpName %vertex_main_loc0_Output "vertex_main_loc0_Output" |
| OpName %vertex_main___point_size_Output "vertex_main___point_size_Output" |
| OpName %hasResource_fd2603 "hasResource_fd2603" |
| OpName %res "res" |
| OpName %vertex_main_inner "vertex_main_inner" |
| OpMemberName %VertexOutput 0 "pos" |
| OpMemberName %VertexOutput 1 "prevent_dce" |
| OpName %VertexOutput "VertexOutput" |
| OpName %out "out" |
| OpName %vertex_main "vertex_main" |
| OpDecorate %1 DescriptorSet 42 |
| OpDecorate %1 Binding 41 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_table_buffer_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_table_buffer_tint_explicit_layout Block |
| OpDecorate %6 DescriptorSet 42 |
| OpDecorate %6 Binding 42 |
| OpDecorate %6 NonWritable |
| OpDecorate %vertex_main_position_Output BuiltIn Position |
| OpDecorate %vertex_main_loc0_Output Location 0 |
| OpDecorate %vertex_main_loc0_Output Flat |
| OpDecorate %vertex_main___point_size_Output BuiltIn PointSize |
| %uint = OpTypeInt 32 0 |
| %4 = OpTypeImage %uint 2D 0 0 1 1 Unknown |
| %_runtimearr_4 = OpTypeRuntimeArray %4 |
| %_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4 |
| %1 = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_table_buffer_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_buffer_tint_explicit_layout |
| %6 = OpVariable %_ptr_StorageBuffer_tint_resource_table_buffer_tint_explicit_layout StorageBuffer |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output |
| %int = OpTypeInt 32 1 |
| %_ptr_Output_int = OpTypePointer Output %int |
| %vertex_main_loc0_Output = OpVariable %_ptr_Output_int Output |
| %_ptr_Output_float = OpTypePointer Output %float |
| %vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output |
| %20 = OpTypeFunction %int |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %int_1 = OpConstant %int 1 |
| %int_0 = OpConstant %int 0 |
| %uint_21 = OpConstant %uint 21 |
| %VertexOutput = OpTypeStruct %v4float %int |
| %47 = OpTypeFunction %VertexOutput |
| %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| %51 = OpConstantNull %VertexOutput |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %54 = OpConstantNull %v4float |
| %_ptr_Function_int = OpTypePointer Function %int |
| %void = OpTypeVoid |
| %61 = OpTypeFunction %void |
| %float_1 = OpConstant %float 1 |
| %hasResource_fd2603 = OpFunction %int None %20 |
| %21 = OpLabel |
| %res = OpVariable %_ptr_Function_bool Function |
| %22 = OpAccessChain %_ptr_StorageBuffer_uint %6 %uint_0 |
| %25 = OpLoad %uint %22 None |
| %26 = OpULessThan %bool %uint_1 %25 |
| OpSelectionMerge %29 None |
| OpBranchConditional %26 %30 %31 |
| %30 = OpLabel |
| %42 = OpAccessChain %_ptr_StorageBuffer_uint %6 %uint_1 %uint_1 |
| %43 = OpLoad %uint %42 None |
| %33 = OpIEqual %bool %43 %uint_21 |
| OpBranch %29 |
| %31 = OpLabel |
| OpBranch %29 |
| %29 = OpLabel |
| %32 = OpPhi %bool %33 %30 %false %31 |
| OpStore %res %32 |
| %37 = OpLoad %bool %res None |
| %38 = OpLogicalEqual %bool %37 %false |
| %39 = OpSelect %int %38 %int_1 %int_0 |
| OpReturnValue %39 |
| OpFunctionEnd |
| %vertex_main_inner = OpFunction %VertexOutput None %47 |
| %48 = OpLabel |
| %out = OpVariable %_ptr_Function_VertexOutput Function %51 |
| %52 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| OpStore %52 %54 None |
| %55 = OpAccessChain %_ptr_Function_int %out %uint_1 |
| %57 = OpFunctionCall %int %hasResource_fd2603 |
| OpStore %55 %57 None |
| %58 = OpLoad %VertexOutput %out None |
| OpReturnValue %58 |
| OpFunctionEnd |
| %vertex_main = OpFunction %void None %61 |
| %62 = OpLabel |
| %63 = OpFunctionCall %VertexOutput %vertex_main_inner |
| %64 = OpCompositeExtract %v4float %63 0 |
| OpStore %vertex_main_position_Output %64 None |
| %65 = OpCompositeExtract %int %63 1 |
| OpStore %vertex_main_loc0_Output %65 None |
| OpStore %vertex_main___point_size_Output %float_1 None |
| OpReturn |
| OpFunctionEnd |