blob: 872fb577fe5a9c326628c9dba38bf4466866d498 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 85
; Schema: 0
OpCapability Shader
%39 = OpExtInstImport "GLSL.std.450"
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_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %f "f"
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_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 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_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = 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
%22 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%28 = OpConstantNull %float
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%float_0_100000001 = OpConstant %float 0.100000001
%float_1 = OpConstant %float 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%72 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %22
%25 = OpLabel
%f = OpVariable %_ptr_Function_float Function %28
%31 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%32 = OpLoad %float %31
%36 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%37 = OpLoad %float %36
%42 = OpFOrdLessThan %bool %32 %37
%41 = OpSelect %float %42 %float_0_100000001 %float_1
%40 = OpExtInst %float %39 Trunc %41
%38 = OpExtInst %float %39 Fract %40
OpStore %f %38
%46 = OpLoad %float %f
%48 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%49 = OpLoad %float %48
%50 = OpFOrdEqual %bool %46 %49
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
%55 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%56 = OpLoad %int %55
%57 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%58 = OpLoad %int %57
%59 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%60 = OpLoad %int %59
%61 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%62 = OpLoad %int %61
%63 = OpConvertSToF %float %56
%64 = OpConvertSToF %float %58
%65 = OpConvertSToF %float %60
%66 = OpConvertSToF %float %62
%67 = OpCompositeConstruct %v4float %63 %64 %65 %66
OpStore %x_GLF_color %67
OpBranch %51
%53 = OpLabel
%68 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%69 = OpLoad %int %68
%70 = OpConvertSToF %float %69
%71 = OpCompositeConstruct %v4float %70 %70 %70 %70
OpStore %x_GLF_color %71
OpBranch %51
%51 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %72
%tint_symbol_1 = OpFunctionParameter %main_out
%76 = OpLabel
%77 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %77
OpReturn
OpFunctionEnd
%main = OpFunction %void None %22
%79 = OpLabel
%80 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %80
%81 = OpFunctionCall %void %main_1
%83 = OpLoad %v4float %x_GLF_color
%84 = OpCompositeConstruct %main_out %83
%82 = OpFunctionCall %void %tint_symbol_3 %84
OpReturn
OpFunctionEnd