| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 44 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" |
| OpExecutionMode %main OriginUpperLeft |
| 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 %continue_execution "continue_execution" |
| OpName %foo "foo" |
| OpName %bar "bar" |
| OpName %main "main" |
| OpMemberDecorate %tint_symbol_1 0 Offset 0 |
| OpDecorate %tint_symbol_1 Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| OpMemberDecorate %tint_symbol_3 0 Offset 0 |
| OpDecorate %tint_symbol_3 Block |
| OpDecorate %5 DescriptorSet 0 |
| OpDecorate %5 Binding 1 |
| OpDecorate %5 Coherent |
| %int = OpTypeInt 32 1 |
| %tint_symbol_1 = OpTypeStruct %int |
| %_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1 |
| %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer |
| %float = OpTypeFloat 32 |
| %tint_symbol_3 = OpTypeStruct %float |
| %_ptr_StorageBuffer_tint_symbol_3 = OpTypePointer StorageBuffer %tint_symbol_3 |
| %5 = OpVariable %_ptr_StorageBuffer_tint_symbol_3 StorageBuffer |
| %bool = OpTypeBool |
| %_ptr_Private_bool = OpTypePointer Private %bool |
| %true = OpConstantTrue %bool |
| %continue_execution = OpVariable %_ptr_Private_bool Private %true |
| %void = OpTypeVoid |
| %15 = OpTypeFunction %void |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %int_0 = OpConstant %int 0 |
| %false = OpConstantFalse %bool |
| %float_1 = OpConstant %float 1 |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %foo = OpFunction %void None %15 |
| %16 = OpLabel |
| %17 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 |
| %21 = OpLoad %int %17 None |
| %22 = OpSLessThan %bool %21 %int_0 |
| OpSelectionMerge %24 None |
| OpBranchConditional %22 %25 %24 |
| %25 = OpLabel |
| OpStore %continue_execution %false None |
| OpBranch %24 |
| %24 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %bar = OpFunction %void None %15 |
| %28 = OpLabel |
| %29 = OpDPdx %float %float_1 |
| %31 = OpAccessChain %_ptr_StorageBuffer_float %5 %uint_0 |
| %33 = OpLoad %bool %continue_execution None |
| OpSelectionMerge %34 None |
| OpBranchConditional %33 %35 %34 |
| %35 = OpLabel |
| OpStore %31 %29 None |
| OpBranch %34 |
| %34 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %15 |
| %37 = OpLabel |
| %38 = OpFunctionCall %void %foo |
| %39 = OpFunctionCall %void %bar |
| %40 = OpLoad %bool %continue_execution None |
| %41 = OpLogicalNot %bool %40 |
| OpSelectionMerge %42 None |
| OpBranchConditional %41 %43 %42 |
| %43 = OpLabel |
| OpKill |
| %42 = OpLabel |
| OpReturn |
| OpFunctionEnd |