| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 67 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %p "p" |
| OpName %w "w" |
| OpMemberName %tint_symbol_1 0 "tint_symbol" |
| OpName %tint_symbol_1 "tint_symbol_1" |
| OpMemberName %tint_symbol_3 0 "tint_symbol_2" |
| OpName %tint_symbol_3 "tint_symbol_3" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %no_uses "no_uses" |
| OpName %zoo "zoo" |
| OpName %bar "bar" |
| OpName %a "a" |
| OpName %b "b" |
| OpName %foo "foo" |
| OpName %a_0 "a" |
| OpName %b_0 "b" |
| OpName %main_inner "main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %main "main" |
| OpMemberDecorate %tint_symbol_1 0 Offset 0 |
| OpDecorate %tint_symbol_1 Block |
| OpDecorate %7 DescriptorSet 0 |
| OpDecorate %7 Binding 1 |
| OpDecorate %7 NonWritable |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| OpMemberDecorate %tint_symbol_3 0 Offset 0 |
| OpDecorate %tint_symbol_3 Block |
| OpDecorate %11 DescriptorSet 0 |
| OpDecorate %11 Binding 0 |
| OpDecorate %11 Coherent |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %float = OpTypeFloat 32 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %4 = OpConstantNull %float |
| %p = OpVariable %_ptr_Private_float Private %4 |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %w = OpVariable %_ptr_Workgroup_float Workgroup |
| %v2float = OpTypeVector %float 2 |
| %tint_symbol_1 = OpTypeStruct %v2float |
| %_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1 |
| %7 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %tint_symbol_3 = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_tint_symbol_3 = OpTypePointer StorageBuffer %tint_symbol_3 |
| %11 = OpVariable %_ptr_StorageBuffer_tint_symbol_3 StorageBuffer |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %20 = OpTypeFunction %void |
| %b_0 = OpConstant %float 2 |
| %30 = OpTypeFunction %void %float %float |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %uint_0 = OpConstant %uint 0 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float |
| %_ptr_StorageBuffer_float_0 = OpTypePointer StorageBuffer %float |
| %45 = OpTypeFunction %void %float |
| %51 = OpTypeFunction %void %uint |
| %bool = OpTypeBool |
| %float_0 = OpConstant %float 0 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %float_1 = OpConstant %float 1 |
| %no_uses = OpFunction %void None %20 |
| %21 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %zoo = OpFunction %void None %20 |
| %23 = OpLabel |
| %24 = OpLoad %float %p None |
| %25 = OpFMul %float %24 %b_0 |
| OpStore %p %25 None |
| OpReturn |
| OpFunctionEnd |
| %bar = OpFunction %void None %30 |
| %a = OpFunctionParameter %float |
| %b = OpFunctionParameter %float |
| %31 = OpLabel |
| OpStore %p %a None |
| OpStore %w %b None |
| %32 = OpAccessChain %_ptr_StorageBuffer_float %11 %uint_0 %int_0 |
| %37 = OpAccessChain %_ptr_StorageBuffer_v2float %7 %uint_0 |
| %39 = OpAccessChain %_ptr_StorageBuffer_float_0 %37 %uint_0 |
| %41 = OpLoad %float %39 None |
| OpStore %32 %41 None |
| %42 = OpFunctionCall %void %zoo |
| OpReturn |
| OpFunctionEnd |
| %foo = OpFunction %void None %45 |
| %a_0 = OpFunctionParameter %float |
| %46 = OpLabel |
| %47 = OpFunctionCall %void %bar %a_0 %b_0 |
| %48 = OpFunctionCall %void %no_uses |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %51 |
| %tint_local_index = OpFunctionParameter %uint |
| %52 = OpLabel |
| %53 = OpIEqual %bool %tint_local_index %uint_0 |
| OpSelectionMerge %55 None |
| OpBranchConditional %53 %56 %55 |
| %56 = OpLabel |
| OpStore %w %float_0 None |
| OpBranch %55 |
| %55 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %61 = OpFunctionCall %void %foo %float_1 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %20 |
| %64 = OpLabel |
| %65 = OpLoad %uint %main_local_invocation_index_Input None |
| %66 = OpFunctionCall %void %main_inner %65 |
| OpReturn |
| OpFunctionEnd |