| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 58 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %out_data "out_data" |
| OpName %tint_symbol "tint_symbol" |
| OpName %tint_symbol_2 "tint_symbol_2" |
| OpName %main_1 "main_1" |
| OpName %x_is_odd "x_is_odd" |
| OpName %y_is_odd "y_is_odd" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "out_data_1" |
| OpName %tint_symbol_3 "tint_symbol_3" |
| OpName %tint_symbol_1 "tint_symbol_1" |
| OpName %main "main" |
| OpDecorate %tint_symbol BuiltIn FragCoord |
| OpDecorate %tint_symbol_2 Location 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %5 = OpConstantNull %v4float |
| %gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5 |
| %int = OpTypeInt 32 1 |
| %_ptr_Private_int = OpTypePointer Private %int |
| %9 = OpConstantNull %int |
| %out_data = OpVariable %_ptr_Private_int Private %9 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %tint_symbol = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_int = OpTypePointer Output %int |
| %tint_symbol_2 = OpVariable %_ptr_Output_int Output %9 |
| %void = OpTypeVoid |
| %14 = OpTypeFunction %void |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %21 = OpConstantNull %bool |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %int_1 = OpConstant %int 1 |
| %uint_1 = OpConstant %uint 1 |
| %int_0 = OpConstant %int 0 |
| %main_out = OpTypeStruct %int |
| %45 = OpTypeFunction %void %main_out |
| %main_1 = OpFunction %void None %14 |
| %17 = OpLabel |
| %x_is_odd = OpVariable %_ptr_Function_bool Function %21 |
| %y_is_odd = OpVariable %_ptr_Function_bool Function %21 |
| %26 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0 |
| %27 = OpLoad %float %26 |
| %28 = OpConvertFToS %int %27 |
| %30 = OpBitwiseAnd %int %28 %int_1 |
| %31 = OpIEqual %bool %30 %int_1 |
| OpStore %x_is_odd %31 |
| %33 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1 |
| %34 = OpLoad %float %33 |
| %35 = OpConvertFToS %int %34 |
| %36 = OpBitwiseAnd %int %35 %int_1 |
| %37 = OpIEqual %bool %36 %int_1 |
| OpStore %y_is_odd %37 |
| %38 = OpLoad %bool %x_is_odd |
| %39 = OpLoad %bool %y_is_odd |
| OpSelectionMerge %41 None |
| OpBranchConditional %38 %41 %42 |
| %42 = OpLabel |
| OpBranch %41 |
| %41 = OpLabel |
| %43 = OpPhi %bool %38 %17 %39 %42 |
| %40 = OpSelect %int %43 %int_1 %int_0 |
| OpStore %out_data %40 |
| OpReturn |
| OpFunctionEnd |
| %tint_symbol_3 = OpFunction %void None %45 |
| %tint_symbol_1 = OpFunctionParameter %main_out |
| %49 = OpLabel |
| %50 = OpCompositeExtract %int %tint_symbol_1 0 |
| OpStore %tint_symbol_2 %50 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %14 |
| %52 = OpLabel |
| %53 = OpLoad %v4float %tint_symbol |
| OpStore %gl_FragCoord %53 |
| %54 = OpFunctionCall %void %main_1 |
| %56 = OpLoad %int %out_data |
| %57 = OpCompositeConstruct %main_out %56 |
| %55 = OpFunctionCall %void %tint_symbol_3 %57 |
| OpReturn |
| OpFunctionEnd |