| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 59 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %frag_color_param_1 %color_out_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %frag_color_param_1 "frag_color_param_1" |
| OpName %color_out_1_1 "color_out_1_1" |
| OpName %frag_color "frag_color" |
| OpName %color_out "color_out" |
| OpName %main_1 "main_1" |
| OpName %iv "iv" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "color_out_1" |
| OpName %main_inner "main_inner" |
| OpName %frag_color_param "frag_color_param" |
| OpName %main "main" |
| OpDecorate %frag_color_param_1 Location 1 |
| OpDecorate %color_out_1_1 Location 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %frag_color_param_1 = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %7 = OpConstantNull %v4float |
| %color_out_1_1 = OpVariable %_ptr_Output_v4float Output %7 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %frag_color = OpVariable %_ptr_Private_v4float Private %7 |
| %color_out = OpVariable %_ptr_Private_v4float Private %7 |
| %void = OpTypeVoid |
| %11 = OpTypeFunction %void |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %_ptr_Function_v2int = OpTypePointer Function %v2int |
| %19 = OpConstantNull %v2int |
| %v2float = OpTypeVector %float 2 |
| %float_256 = OpConstant %float 256 |
| %uint = OpTypeInt 32 0 |
| %uint_1 = OpConstant %uint 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %int_2 = OpConstant %int 2 |
| %int_64 = OpConstant %int 64 |
| %bool = OpTypeBool |
| %float_1 = OpConstant %float 1 |
| %float_0 = OpConstant %float 0 |
| %44 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| %45 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1 |
| %main_out = OpTypeStruct %v4float |
| %46 = OpTypeFunction %main_out %v4float |
| %main_1 = OpFunction %void None %11 |
| %14 = OpLabel |
| %iv = OpVariable %_ptr_Function_v2int Function %19 |
| %20 = OpLoad %v4float %frag_color |
| %23 = OpCompositeExtract %float %20 0 |
| %24 = OpCompositeExtract %float %20 1 |
| %25 = OpCompositeConstruct %v2float %23 %24 |
| %27 = OpVectorTimesScalar %v2float %25 %float_256 |
| %21 = OpConvertFToS %v2int %27 |
| OpStore %iv %21 |
| %31 = OpAccessChain %_ptr_Function_int %iv %uint_1 |
| %32 = OpLoad %int %31 |
| %34 = OpSDiv %int %32 %int_2 |
| %36 = OpBitwiseAnd %int %34 %int_64 |
| %37 = OpIEqual %bool %36 %int_64 |
| OpSelectionMerge %39 None |
| OpBranchConditional %37 %40 %41 |
| %40 = OpLabel |
| OpStore %color_out %44 |
| OpBranch %39 |
| %41 = OpLabel |
| OpStore %color_out %45 |
| OpBranch %39 |
| %39 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %46 |
| %frag_color_param = OpFunctionParameter %v4float |
| %50 = OpLabel |
| OpStore %frag_color %frag_color_param |
| %51 = OpFunctionCall %void %main_1 |
| %52 = OpLoad %v4float %color_out |
| %53 = OpCompositeConstruct %main_out %52 |
| OpReturnValue %53 |
| OpFunctionEnd |
| %main = OpFunction %void None %11 |
| %55 = OpLabel |
| %57 = OpLoad %v4float %frag_color_param_1 |
| %56 = OpFunctionCall %main_out %main_inner %57 |
| %58 = OpCompositeExtract %v4float %56 0 |
| OpStore %color_out_1_1 %58 |
| OpReturn |
| OpFunctionEnd |