| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 82 |
| ; Schema: 0 |
| OpCapability Shader |
| %48 = 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 %buf1 "buf1" |
| OpMemberName %buf1 0 "one" |
| OpName %x_8 "x_8" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %buf0 "buf0" |
| OpMemberName %buf0 0 "x_GLF_uniform_int_values" |
| OpName %x_10 "x_10" |
| OpName %func_ "func_" |
| OpName %main_1 "main_1" |
| OpName %v "v" |
| 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 %buf1 Block |
| OpMemberDecorate %buf1 0 Offset 0 |
| OpDecorate %x_8 NonWritable |
| OpDecorate %x_8 DescriptorSet 0 |
| OpDecorate %x_8 Binding 1 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %_arr_int_uint_1 ArrayStride 16 |
| OpDecorate %x_10 NonWritable |
| OpDecorate %x_10 DescriptorSet 0 |
| OpDecorate %x_10 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 |
| %uint = OpTypeInt 32 0 |
| %buf1 = OpTypeStruct %uint |
| %_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1 |
| %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform |
| %x_GLF_color = OpVariable %_ptr_Private_v4float Private %7 |
| %int = OpTypeInt 32 1 |
| %uint_1 = OpConstant %uint 1 |
| %_arr_int_uint_1 = OpTypeArray %int %uint_1 |
| %buf0 = OpTypeStruct %_arr_int_uint_1 |
| %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| %x_10 = OpVariable %_ptr_Uniform_buf0 Uniform |
| %21 = OpTypeFunction %float |
| %int_1 = OpConstant %int 1 |
| %float_1 = OpConstant %float 1 |
| %float_0 = OpConstant %float 0 |
| %void = OpTypeVoid |
| %30 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %36 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %bool = OpTypeBool |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| %uint_2 = OpConstant %uint 2 |
| %62 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| %int_0 = OpConstant %int 0 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %main_out = OpTypeStruct %v4float |
| %69 = OpTypeFunction %main_out %v4float |
| %func_ = OpFunction %float None %21 |
| %23 = OpLabel |
| OpSelectionMerge %24 None |
| OpSwitch %int_1 %26 0 %27 |
| %27 = OpLabel |
| OpReturnValue %float_1 |
| %26 = OpLabel |
| OpBranch %24 |
| %24 = OpLabel |
| OpReturnValue %float_0 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %30 |
| %33 = OpLabel |
| %v = OpVariable %_ptr_Function_v4float Function %7 |
| OpStore %v %36 |
| %38 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1 |
| %39 = OpLoad %float %38 |
| %40 = OpFOrdLessThan %bool %39 %float_0 |
| OpSelectionMerge %42 None |
| OpBranchConditional %40 %43 %42 |
| %43 = OpLabel |
| %44 = OpFunctionCall %float %func_ |
| %45 = OpCompositeConstruct %v4float %44 %44 %44 %44 |
| OpStore %v %45 |
| OpBranch %42 |
| %42 = OpLabel |
| %46 = OpLoad %v4float %v |
| %47 = OpExtInst %uint %48 PackUnorm4x8 %46 |
| %49 = OpIEqual %bool %47 %uint_1 |
| OpSelectionMerge %50 None |
| OpBranchConditional %49 %51 %50 |
| %51 = OpLabel |
| OpReturn |
| %50 = OpLabel |
| %54 = OpAccessChain %_ptr_Uniform_uint %x_8 %uint_0 |
| %55 = OpLoad %uint %54 |
| %56 = OpShiftLeftLogical %uint %uint_1 %55 |
| %58 = OpIEqual %bool %56 %uint_2 |
| OpSelectionMerge %59 None |
| OpBranchConditional %58 %60 %61 |
| %60 = OpLabel |
| OpStore %x_GLF_color %62 |
| OpBranch %59 |
| %61 = OpLabel |
| %65 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0 |
| %66 = OpLoad %int %65 |
| %67 = OpConvertSToF %float %66 |
| %68 = OpCompositeConstruct %v4float %67 %67 %67 %67 |
| OpStore %x_GLF_color %68 |
| OpBranch %59 |
| %59 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %69 |
| %gl_FragCoord_param = OpFunctionParameter %v4float |
| %73 = OpLabel |
| OpStore %gl_FragCoord %gl_FragCoord_param |
| %74 = OpFunctionCall %void %main_1 |
| %75 = OpLoad %v4float %x_GLF_color |
| %76 = OpCompositeConstruct %main_out %75 |
| OpReturnValue %76 |
| OpFunctionEnd |
| %main = OpFunction %void None %30 |
| %78 = OpLabel |
| %80 = OpLoad %v4float %gl_FragCoord_param_1 |
| %79 = OpFunctionCall %main_out %main_inner %80 |
| %81 = OpCompositeExtract %v4float %79 0 |
| OpStore %x_GLF_color_1_1 %81 |
| OpReturn |
| OpFunctionEnd |