blob: 1b6c2cfa9bcf60ded8aa804aaff7f018ba55dda3 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 85
; Schema: 0
OpCapability Shader
%43 = 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_int_values"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %i "i"
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_int_uint_3 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf0 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%15 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%uint_100 = OpConstant %uint 100
%_ptr_Function_float = OpTypePointer Function %float
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %v4float
%73 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%i = OpVariable %_ptr_Function_int Function %21
%v = OpVariable %_ptr_Function_v4float Function %12
%27 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%28 = OpLoad %int %27
OpStore %i %28
OpBranch %29
%29 = OpLabel
OpLoopMerge %30 %31 None
OpBranch %32
%32 = OpLabel
%33 = OpLoad %int %i
%35 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%36 = OpLoad %int %35
%37 = OpSLessThan %bool %33 %36
OpSelectionMerge %39 None
OpBranchConditional %37 %40 %41
%40 = OpLabel
OpBranch %39
%41 = OpLabel
OpBranch %30
%39 = OpLabel
%42 = OpExtInst %v4float %43 UnpackUnorm4x8 %uint_100
OpStore %v %42
%46 = OpAccessChain %_ptr_Function_float %v %uint_0
%47 = OpLoad %float %46
%48 = OpLoad %int %i
%49 = OpConvertFToS %int %47
%50 = OpSGreaterThan %bool %49 %48
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %51
%52 = OpLabel
%53 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%54 = OpLoad %int %53
%55 = OpConvertSToF %float %54
%56 = OpCompositeConstruct %v4float %55 %55 %55 %55
OpStore %x_GLF_color %56
OpReturn
%51 = OpLabel
OpBranch %31
%31 = OpLabel
%57 = OpLoad %int %i
%58 = OpIAdd %int %57 %int_1
OpStore %i %58
OpBranch %29
%30 = OpLabel
%60 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%61 = OpLoad %int %60
%62 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%63 = OpLoad %int %62
%64 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%65 = OpLoad %int %64
%66 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%67 = OpLoad %int %66
%68 = OpConvertSToF %float %61
%69 = OpConvertSToF %float %63
%70 = OpConvertSToF %float %65
%71 = OpConvertSToF %float %67
%72 = OpCompositeConstruct %v4float %68 %69 %70 %71
OpStore %x_GLF_color %72
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %73
%tint_symbol = OpFunctionParameter %main_out
%77 = OpLabel
%78 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %78
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%80 = OpLabel
%81 = OpFunctionCall %void %main_1
%83 = OpLoad %v4float %x_GLF_color
%84 = OpCompositeConstruct %main_out %83
%82 = OpFunctionCall %void %tint_symbol_2 %84
OpReturn
OpFunctionEnd