blob: c00bb8c9756ee32574feed58b17ca9837910640a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 101
; Schema: 0
OpCapability Shader
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 "x_GLF_uniform_float_values"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_8 "x_8"
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 %_arr_float_uint_3 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
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
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf1 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%int = OpTypeInt 32 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%void = OpTypeVoid
%23 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
%_ptr_Function_v2int = OpTypePointer Function %v2int
%30 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%v2float = OpTypeVector %float 2
%_ptr_Function_int = OpTypePointer Function %int
%main_out = OpTypeStruct %v4float
%88 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %23
%26 = OpLabel
%v = OpVariable %_ptr_Function_v2int Function %30
%33 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%34 = OpLoad %float %33
%38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%39 = OpLoad %float %38
%40 = OpFOrdLessThan %bool %34 %39
OpSelectionMerge %42 None
OpBranchConditional %40 %43 %44
%43 = OpLabel
%46 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%47 = OpLoad %int %46
%48 = OpConvertSToF %float %47
%49 = OpCompositeConstruct %v4float %48 %48 %48 %48
OpStore %x_GLF_color %49
OpBranch %42
%44 = OpLabel
%50 = OpLoad %v4float %gl_FragCoord
%52 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%55 = OpLoad %float %54
%57 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%58 = OpLoad %float %57
%61 = OpCompositeExtract %float %50 0
%62 = OpCompositeExtract %float %50 1
%63 = OpCompositeConstruct %v2float %61 %62
%64 = OpCompositeConstruct %v2float %53 %55
%65 = OpFSub %v2float %63 %64
%66 = OpVectorTimesScalar %v2float %65 %58
%59 = OpConvertFToS %v2int %66
OpStore %v %59
%67 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%68 = OpLoad %float %67
%70 = OpAccessChain %_ptr_Function_int %v %uint_1
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%73 = OpLoad %int %72
%74 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%75 = OpLoad %int %74
%76 = OpAccessChain %_ptr_Function_int %v %uint_0
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%81 = OpLoad %float %80
%83 = OpISub %int %71 %73
%84 = OpBitwiseAnd %int %83 %75
%82 = OpConvertSToF %float %84
%86 = OpBitwiseAnd %int %77 %79
%85 = OpConvertSToF %float %86
%87 = OpCompositeConstruct %v4float %68 %82 %85 %81
OpStore %x_GLF_color %87
OpBranch %42
%42 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %88
%gl_FragCoord_param = OpFunctionParameter %v4float
%92 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%93 = OpFunctionCall %void %main_1
%94 = OpLoad %v4float %x_GLF_color
%95 = OpCompositeConstruct %main_out %94
OpReturnValue %95
OpFunctionEnd
%main = OpFunction %void None %23
%97 = OpLabel
%99 = OpLoad %v4float %gl_FragCoord_param_1
%98 = OpFunctionCall %main_out %main_inner %99
%100 = OpCompositeExtract %v4float %98 0
OpStore %x_GLF_color_1_1 %100
OpReturn
OpFunctionEnd