blob: 1b834bbcf8e306d76c8728460ba82145e1d53751 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 80
; Schema: 0
OpCapability Shader
%38 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf2 "buf2"
OpMemberName %buf2 0 "x_GLF_uniform_uint_values"
OpName %x_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
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 %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %_arr_uint_uint_1 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 2
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
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_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
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%buf2 = OpTypeStruct %_arr_uint_uint_1
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_6 = OpVariable %_ptr_Uniform_buf2 Uniform
%float = OpTypeFloat 32
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf1 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 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_0 = OpConstant %int 0
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%uint_100 = OpConstant %uint 100
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%68 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %24
%27 = OpLabel
%f = OpVariable %_ptr_Function_float Function %30
%34 = OpAccessChain %_ptr_Uniform_uint %x_6 %uint_0 %int_0
%35 = OpLoad %uint %34
%37 = OpExtInst %uint %38 UMax %uint_100 %35
%36 = OpBitcast %float %37
OpStore %f %36
%40 = OpLoad %float %f
%42 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpFOrdEqual %bool %40 %43
OpSelectionMerge %46 None
OpBranchConditional %44 %47 %48
%47 = OpLabel
%50 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%51 = OpLoad %int %50
%53 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%54 = OpLoad %int %53
%55 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%56 = OpLoad %int %55
%57 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%58 = OpLoad %int %57
%59 = OpConvertSToF %float %51
%60 = OpConvertSToF %float %54
%61 = OpConvertSToF %float %56
%62 = OpConvertSToF %float %58
%63 = OpCompositeConstruct %v4float %59 %60 %61 %62
OpStore %x_GLF_color %63
OpBranch %46
%48 = OpLabel
%64 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%65 = OpLoad %int %64
%66 = OpConvertSToF %float %65
%67 = OpCompositeConstruct %v4float %66 %66 %66 %66
OpStore %x_GLF_color %67
OpBranch %46
%46 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %68
%tint_symbol = OpFunctionParameter %main_out
%72 = OpLabel
%73 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %73
OpReturn
OpFunctionEnd
%main = OpFunction %void None %24
%75 = OpLabel
%76 = OpFunctionCall %void %main_1
%78 = OpLoad %v4float %x_GLF_color
%79 = OpCompositeConstruct %main_out %78
%77 = OpFunctionCall %void %tint_symbol_2 %79
OpReturn
OpFunctionEnd