| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 68 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %local_invocation_index_1 |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %p "p" |
| OpName %w "w" |
| OpName %uniforms_block "uniforms_block" |
| OpMemberName %uniforms_block 0 "inner" |
| OpName %uniforms "uniforms" |
| OpName %storages_block "storages_block" |
| OpMemberName %storages_block 0 "inner" |
| OpName %storages "storages" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| 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 %main_inner "main_inner" |
| OpName %local_invocation_index "local_invocation_index" |
| OpName %main "main" |
| OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex |
| OpDecorate %uniforms_block Block |
| OpMemberDecorate %uniforms_block 0 Offset 0 |
| OpDecorate %uniforms NonWritable |
| OpDecorate %uniforms DescriptorSet 0 |
| OpDecorate %uniforms Binding 1 |
| OpDecorate %storages_block Block |
| OpMemberDecorate %storages_block 0 Offset 0 |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| OpDecorate %storages DescriptorSet 0 |
| OpDecorate %storages Binding 0 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %float = OpTypeFloat 32 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %7 = OpConstantNull %float |
| %p = OpVariable %_ptr_Private_float Private %7 |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %w = OpVariable %_ptr_Workgroup_float Workgroup |
| %v2float = OpTypeVector %float 2 |
| %uniforms_block = OpTypeStruct %v2float |
| %_ptr_StorageBuffer_uniforms_block = OpTypePointer StorageBuffer %uniforms_block |
| %uniforms = OpVariable %_ptr_StorageBuffer_uniforms_block StorageBuffer |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %storages_block = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_storages_block = OpTypePointer StorageBuffer %storages_block |
| %storages = OpVariable %_ptr_StorageBuffer_storages_block StorageBuffer |
| %void = OpTypeVoid |
| %18 = OpTypeFunction %void %uint |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %31 = OpTypeFunction %void |
| %float_2 = OpConstant %float 2 |
| %39 = OpTypeFunction %void %float %float |
| %uint_0 = OpConstant %uint 0 |
| %int = OpTypeInt 32 1 |
| %46 = OpConstantNull %int |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %52 = OpTypeFunction %void %float |
| %float_1 = OpConstant %float 1 |
| %tint_zero_workgroup_memory = OpFunction %void None %18 |
| %local_idx = OpFunctionParameter %uint |
| %22 = OpLabel |
| %24 = OpULessThan %bool %local_idx %uint_1 |
| OpSelectionMerge %26 None |
| OpBranchConditional %24 %27 %26 |
| %27 = OpLabel |
| OpStore %w %7 |
| OpBranch %26 |
| %26 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %no_uses = OpFunction %void None %31 |
| %33 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %zoo = OpFunction %void None %31 |
| %35 = OpLabel |
| %36 = OpLoad %float %p |
| %38 = OpFMul %float %36 %float_2 |
| OpStore %p %38 |
| OpReturn |
| OpFunctionEnd |
| %bar = OpFunction %void None %39 |
| %a = OpFunctionParameter %float |
| %b = OpFunctionParameter %float |
| %43 = OpLabel |
| OpStore %p %a |
| OpStore %w %b |
| %48 = OpAccessChain %_ptr_StorageBuffer_float %storages %uint_0 %46 |
| %49 = OpAccessChain %_ptr_StorageBuffer_float %uniforms %uint_0 %uint_0 |
| %50 = OpLoad %float %49 |
| OpStore %48 %50 |
| %51 = OpFunctionCall %void %zoo |
| OpReturn |
| OpFunctionEnd |
| %foo = OpFunction %void None %52 |
| %a_0 = OpFunctionParameter %float |
| %55 = OpLabel |
| %56 = OpFunctionCall %void %bar %a_0 %float_2 |
| %57 = OpFunctionCall %void %no_uses |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %18 |
| %local_invocation_index = OpFunctionParameter %uint |
| %60 = OpLabel |
| %61 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index |
| %62 = OpFunctionCall %void %foo %float_1 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %31 |
| %65 = OpLabel |
| %67 = OpLoad %uint %local_invocation_index_1 |
| %66 = OpFunctionCall %void %main_inner %67 |
| OpReturn |
| OpFunctionEnd |