blob: c5cc68e25ec8e6cab5d648c8eb9a26ca86b66ac7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 91
; Schema: 0
OpCapability Shader
%48 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_6 "x_6"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "resolution"
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 %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %f "f"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
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 %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 2
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%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
%v2float = OpTypeVector %float 2
%buf2 = OpTypeStruct %v2float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_8 = OpVariable %_ptr_Uniform_buf2 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%15 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %15
%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_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %15
%void = OpTypeVoid
%24 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%30 = OpConstantNull %float
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_2 = OpConstant %int 2
%uint_1 = OpConstant %uint 1
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%79 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %24
%27 = OpLabel
%f = OpVariable %_ptr_Function_float Function %30
%34 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%35 = OpLoad %float %34
%36 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%37 = OpLoad %float %36
%39 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%40 = OpLoad %float %39
%41 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%42 = OpLoad %float %41
%44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%45 = OpLoad %float %44
%46 = OpFMul %float %35 %37
%47 = OpExtInst %float %48 RoundEven %42
%49 = OpFMul %float %40 %47
%50 = OpFAdd %float %46 %49
%51 = OpFAdd %float %50 %45
OpStore %f %51
%52 = OpLoad %float %f
%54 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%55 = OpLoad %float %54
%56 = OpFOrdEqual %bool %52 %55
OpSelectionMerge %58 None
OpBranchConditional %56 %59 %60
%59 = OpLabel
%62 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%63 = OpLoad %int %62
%64 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%65 = OpLoad %int %64
%66 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%67 = OpLoad %int %66
%68 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%69 = OpLoad %int %68
%70 = OpConvertSToF %float %63
%71 = OpConvertSToF %float %65
%72 = OpConvertSToF %float %67
%73 = OpConvertSToF %float %69
%74 = OpCompositeConstruct %v4float %70 %71 %72 %73
OpStore %x_GLF_color %74
OpBranch %58
%60 = OpLabel
%75 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%76 = OpLoad %int %75
%77 = OpConvertSToF %float %76
%78 = OpCompositeConstruct %v4float %77 %77 %77 %77
OpStore %x_GLF_color %78
OpBranch %58
%58 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %79
%tint_symbol = OpFunctionParameter %main_out
%83 = OpLabel
%84 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %84
OpReturn
OpFunctionEnd
%main = OpFunction %void None %24
%86 = OpLabel
%87 = OpFunctionCall %void %main_1
%89 = OpLoad %v4float %x_GLF_color
%90 = OpCompositeConstruct %main_out %89
%88 = OpFunctionCall %void %tint_symbol_2 %90
OpReturn
OpFunctionEnd