| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 56 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %out_data_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1" |
| OpName %out_data_1_1 "out_data_1_1" |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %out_data "out_data" |
| 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 %main_inner "main_inner" |
| OpName %gl_FragCoord_param "gl_FragCoord_param" |
| OpName %main "main" |
| OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord |
| OpDecorate %out_data_1_1 Location 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input |
| %int = OpTypeInt 32 1 |
| %_ptr_Output_int = OpTypePointer Output %int |
| %8 = OpConstantNull %int |
| %out_data_1_1 = OpVariable %_ptr_Output_int Output %8 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %11 = OpConstantNull %v4float |
| %gl_FragCoord = OpVariable %_ptr_Private_v4float Private %11 |
| %_ptr_Private_int = OpTypePointer Private %int |
| %out_data = OpVariable %_ptr_Private_int Private %8 |
| %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 |
| %43 = OpTypeFunction %main_out %v4float |
| %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 |
| %41 = OpLogicalOr %bool %38 %39 |
| %40 = OpSelect %int %41 %int_1 %int_0 |
| OpStore %out_data %40 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %43 |
| %gl_FragCoord_param = OpFunctionParameter %v4float |
| %47 = OpLabel |
| OpStore %gl_FragCoord %gl_FragCoord_param |
| %48 = OpFunctionCall %void %main_1 |
| %49 = OpLoad %int %out_data |
| %50 = OpCompositeConstruct %main_out %49 |
| OpReturnValue %50 |
| OpFunctionEnd |
| %main = OpFunction %void None %14 |
| %52 = OpLabel |
| %54 = OpLoad %v4float %gl_FragCoord_param_1 |
| %53 = OpFunctionCall %main_out %main_inner %54 |
| %55 = OpCompositeExtract %int %53 0 |
| OpStore %out_data_1_1 %55 |
| OpReturn |
| OpFunctionEnd |