blob: c4e83440eecde07974eb9f2cd96f0497ef2c11c4 [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" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
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 %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %v "v"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
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
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%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 %5
%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
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%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 %void %main_out
%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
%tint_symbol_3 = OpFunction %void None %88
%tint_symbol_1 = OpFunctionParameter %main_out
%92 = OpLabel
%93 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %93
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%95 = OpLabel
%96 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %96
%97 = OpFunctionCall %void %main_1
%99 = OpLoad %v4float %x_GLF_color
%100 = OpCompositeConstruct %main_out %99
%98 = OpFunctionCall %void %tint_symbol_3 %100
OpReturn
OpFunctionEnd