| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 66 |
| ; Schema: 0 |
| OpCapability Shader |
| %29 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1" |
| OpName %x_GLF_color_1_1 "x_GLF_color_1_1" |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %buf0 "buf0" |
| OpMemberName %buf0 0 "two" |
| OpName %x_8 "x_8" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %main_1 "main_1" |
| OpName %a "a" |
| OpName %b "b" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_GLF_color_1" |
| OpName %main_inner "main_inner" |
| OpName %gl_FragCoord_param "gl_FragCoord_param" |
| OpName %main "main" |
| OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord |
| OpDecorate %x_GLF_color_1_1 Location 0 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %x_8 NonWritable |
| OpDecorate %x_8 DescriptorSet 0 |
| OpDecorate %x_8 Binding 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 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %7 = OpConstantNull %v4float |
| %x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7 |
| %buf0 = OpTypeStruct %float |
| %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| %x_8 = OpVariable %_ptr_Uniform_buf0 Uniform |
| %x_GLF_color = OpVariable %_ptr_Private_v4float Private %7 |
| %void = OpTypeVoid |
| %14 = OpTypeFunction %void |
| %_ptr_Function_float = OpTypePointer Function %float |
| %20 = OpConstantNull %float |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %float_2 = OpConstant %float 2 |
| %float_1_89999998 = OpConstant %float 1.89999998 |
| %bool = OpTypeBool |
| %float_2_0999999 = OpConstant %float 2.0999999 |
| %float_1 = OpConstant %float 1 |
| %float_0 = OpConstant %float 0 |
| %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| %main_out = OpTypeStruct %v4float |
| %53 = OpTypeFunction %main_out %v4float |
| %main_1 = OpFunction %void None %14 |
| %17 = OpLabel |
| %a = OpVariable %_ptr_Function_float Function %20 |
| %b = OpVariable %_ptr_Function_float Function %20 |
| %25 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0 |
| %26 = OpLoad %float %25 |
| %28 = OpExtInst %float %29 Cos %26 |
| %27 = OpDPdx %float %28 |
| OpStore %a %27 |
| %31 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 |
| %32 = OpLoad %float %31 |
| %33 = OpLoad %float %a |
| %34 = OpExtInst %float %29 FMix %float_2 %32 %33 |
| OpStore %b %34 |
| %36 = OpLoad %float %b |
| %37 = OpLoad %float %b |
| %39 = OpFOrdGreaterThanEqual %bool %36 %float_1_89999998 |
| OpSelectionMerge %41 None |
| OpBranchConditional %39 %42 %41 |
| %42 = OpLabel |
| %44 = OpFOrdLessThanEqual %bool %37 %float_2_0999999 |
| OpBranch %41 |
| %41 = OpLabel |
| %45 = OpPhi %bool %39 %17 %44 %42 |
| OpSelectionMerge %46 None |
| OpBranchConditional %45 %47 %48 |
| %47 = OpLabel |
| OpStore %x_GLF_color %51 |
| OpBranch %46 |
| %48 = OpLabel |
| OpStore %x_GLF_color %52 |
| OpBranch %46 |
| %46 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %53 |
| %gl_FragCoord_param = OpFunctionParameter %v4float |
| %57 = OpLabel |
| OpStore %gl_FragCoord %gl_FragCoord_param |
| %58 = OpFunctionCall %void %main_1 |
| %59 = OpLoad %v4float %x_GLF_color |
| %60 = OpCompositeConstruct %main_out %59 |
| OpReturnValue %60 |
| OpFunctionEnd |
| %main = OpFunction %void None %14 |
| %62 = OpLabel |
| %64 = OpLoad %v4float %gl_FragCoord_param_1 |
| %63 = OpFunctionCall %main_out %main_inner %64 |
| %65 = OpCompositeExtract %v4float %63 0 |
| OpStore %x_GLF_color_1_1 %65 |
| OpReturn |
| OpFunctionEnd |