| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 52 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_1 %tint_symbol_3 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %x_2 "x_2" |
| OpName %x_3 "x_3" |
| OpName %x_4 "x_4" |
| OpName %tint_symbol "tint_symbol" |
| OpName %tint_symbol_1 "tint_symbol_1" |
| OpName %tint_symbol_3 "tint_symbol_3" |
| OpName %main_1 "main_1" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_4_1" |
| OpName %tint_symbol_4 "tint_symbol_4" |
| OpName %tint_symbol_2 "tint_symbol_2" |
| OpName %main "main" |
| OpDecorate %tint_symbol BuiltIn FragCoord |
| OpDecorate %tint_symbol_1 Location 0 |
| OpDecorate %tint_symbol_1 Flat |
| OpDecorate %tint_symbol_3 Location 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %5 = OpConstantNull %v4float |
| %x_2 = OpVariable %_ptr_Private_v4float Private %5 |
| %int = OpTypeInt 32 1 |
| %_ptr_Private_int = OpTypePointer Private %int |
| %9 = OpConstantNull %int |
| %x_3 = OpVariable %_ptr_Private_int Private %9 |
| %x_4 = OpVariable %_ptr_Private_int Private %9 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %tint_symbol = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Input_int = OpTypePointer Input %int |
| %tint_symbol_1 = OpVariable %_ptr_Input_int Input |
| %_ptr_Output_int = OpTypePointer Output %int |
| %tint_symbol_3 = OpVariable %_ptr_Output_int Output %9 |
| %void = OpTypeVoid |
| %17 = OpTypeFunction %void |
| %int_1 = OpConstant %int 1 |
| %bool = OpTypeBool |
| %main_out = OpTypeStruct %int |
| %38 = OpTypeFunction %void %main_out |
| %main_1 = OpFunction %void None %17 |
| %20 = OpLabel |
| %21 = OpLoad %v4float %x_2 |
| %22 = OpLoad %int %x_3 |
| %24 = OpCompositeExtract %float %21 0 |
| %23 = OpConvertFToS %int %24 |
| %26 = OpBitwiseAnd %int %23 %int_1 |
| %28 = OpCompositeExtract %float %21 1 |
| %27 = OpConvertFToS %int %28 |
| %29 = OpBitwiseAnd %int %27 %int_1 |
| %30 = OpIAdd %int %26 %29 |
| %31 = OpIAdd %int %30 %22 |
| %33 = OpCompositeExtract %float %21 2 |
| %32 = OpConvertFToS %int %33 |
| %34 = OpIEqual %bool %31 %32 |
| OpSelectionMerge %36 None |
| OpBranchConditional %34 %37 %36 |
| %37 = OpLabel |
| OpBranch %36 |
| %36 = OpLabel |
| OpStore %x_4 %int_1 |
| OpReturn |
| OpFunctionEnd |
| %tint_symbol_4 = OpFunction %void None %38 |
| %tint_symbol_2 = OpFunctionParameter %main_out |
| %42 = OpLabel |
| %43 = OpCompositeExtract %int %tint_symbol_2 0 |
| OpStore %tint_symbol_3 %43 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %17 |
| %45 = OpLabel |
| %46 = OpLoad %v4float %tint_symbol |
| OpStore %x_2 %46 |
| %47 = OpLoad %int %tint_symbol_1 |
| OpStore %x_3 %47 |
| %48 = OpFunctionCall %void %main_1 |
| %50 = OpLoad %int %x_4 |
| %51 = OpCompositeConstruct %main_out %50 |
| %49 = OpFunctionCall %void %tint_symbol_4 %51 |
| OpReturn |
| OpFunctionEnd |