blob: 072754926bbf82612469d550f4f8377cc69e3346 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 101
; Schema: 0
OpCapability Shader
%39 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_uint_values"
OpName %x_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_8 "x_8"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "x_GLF_uniform_float_values"
OpName %x_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %v "v"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_uint_uint_1 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %_arr_float_uint_3 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 2
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
%buf0 = OpTypeStruct %_arr_uint_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%float = OpTypeFloat 32
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf2 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_10 = OpVariable %_ptr_Uniform_buf2 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%22 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %22
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %22
%void = OpTypeVoid
%25 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%bool = OpTypeBool
%true = OpConstantTrue %bool
%uint_92382 = OpConstant %uint 92382
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%89 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %25
%28 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %22
%34 = OpAccessChain %_ptr_Uniform_uint %x_6 %uint_0 %int_0
%35 = OpLoad %uint %34
%36 = OpAccessChain %_ptr_Uniform_uint %x_6 %uint_0 %int_0
%37 = OpLoad %uint %36
%40 = OpSelect %uint %true %uint_92382 %37
%44 = OpUDiv %uint %35 %40
%38 = OpExtInst %v4float %39 UnpackUnorm4x8 %44
OpStore %v %38
%45 = OpLoad %v4float %v
%47 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%48 = OpLoad %int %47
%49 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%50 = OpLoad %int %49
%51 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%52 = OpLoad %int %51
%55 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %int_1
%56 = OpLoad %float %55
%58 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %int_2
%59 = OpLoad %float %58
%60 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %int_0
%61 = OpLoad %float %60
%63 = OpConvertSToF %float %48
%64 = OpConvertSToF %float %50
%65 = OpConvertSToF %float %52
%66 = OpFDiv %float %56 %59
%67 = OpCompositeConstruct %v4float %63 %64 %65 %66
%62 = OpExtInst %float %39 Distance %45 %67
%68 = OpFOrdLessThan %bool %62 %61
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
%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_0
%75 = OpLoad %int %74
%76 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%79 = OpLoad %int %78
%80 = OpConvertSToF %float %73
%81 = OpConvertSToF %float %75
%82 = OpConvertSToF %float %77
%83 = OpConvertSToF %float %79
%84 = OpCompositeConstruct %v4float %80 %81 %82 %83
OpStore %x_GLF_color %84
OpBranch %69
%71 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%86 = OpLoad %int %85
%87 = OpConvertSToF %float %86
%88 = OpCompositeConstruct %v4float %87 %87 %87 %87
OpStore %x_GLF_color %88
OpBranch %69
%69 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %89
%tint_symbol = OpFunctionParameter %main_out
%93 = OpLabel
%94 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %94
OpReturn
OpFunctionEnd
%main = OpFunction %void None %25
%96 = OpLabel
%97 = OpFunctionCall %void %main_1
%99 = OpLoad %v4float %x_GLF_color
%100 = OpCompositeConstruct %main_out %99
%98 = OpFunctionCall %void %tint_symbol_2 %100
OpReturn
OpFunctionEnd