blob: 72cbcba7ee8b1cd1d87dbea7f6493e6ea196e46c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 109
; Schema: 0
OpCapability Shader
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 %v "v"
OpName %i "i"
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_4 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_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf0 = OpTypeStruct %_arr_int_uint_4
%_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_v4float = OpTypePointer Function %v4float
%_ptr_Function_int = OpTypePointer Function %int
%23 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_3 = OpConstant %int 3
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%v3uint = OpTypeVector %uint 3
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%51 = OpConstantComposite %v3uint %uint_0 %uint_1 %uint_2
%_ptr_Function_float = OpTypePointer Function %float
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%v4bool = OpTypeVector %bool 4
%main_out = OpTypeStruct %v4float
%97 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %12
%i = OpVariable %_ptr_Function_int Function %23
%27 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%28 = OpLoad %int %27
%29 = OpConvertSToF %float %28
%30 = OpCompositeConstruct %v4float %29 %29 %29 %29
OpStore %v %30
%32 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%33 = OpLoad %int %32
OpStore %i %33
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%38 = OpLoad %int %i
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%40 = OpLoad %int %39
%41 = OpSLessThan %bool %38 %40
OpSelectionMerge %43 None
OpBranchConditional %41 %44 %45
%44 = OpLabel
OpBranch %43
%45 = OpLabel
OpBranch %35
%43 = OpLabel
%46 = OpLoad %int %i
%47 = OpLoad %int %i
%52 = OpVectorExtractDynamic %uint %51 %46
%54 = OpAccessChain %_ptr_Function_float %v %52
%55 = OpConvertSToF %float %47
OpStore %54 %55
OpBranch %36
%36 = OpLabel
%56 = OpLoad %int %i
%58 = OpIAdd %int %56 %int_1
OpStore %i %58
OpBranch %34
%35 = OpLabel
%59 = OpLoad %v4float %v
%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
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%66 = OpLoad %int %65
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%68 = OpLoad %int %67
%70 = OpConvertSToF %float %61
%71 = OpConvertSToF %float %63
%72 = OpConvertSToF %float %66
%73 = OpConvertSToF %float %68
%74 = OpCompositeConstruct %v4float %70 %71 %72 %73
%75 = OpFOrdEqual %v4bool %59 %74
%69 = OpAll %bool %75
OpSelectionMerge %77 None
OpBranchConditional %69 %78 %79
%78 = OpLabel
%80 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%83 = OpLoad %int %82
%84 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%85 = OpLoad %int %84
%86 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%87 = OpLoad %int %86
%88 = OpConvertSToF %float %81
%89 = OpConvertSToF %float %83
%90 = OpConvertSToF %float %85
%91 = OpConvertSToF %float %87
%92 = OpCompositeConstruct %v4float %88 %89 %90 %91
OpStore %x_GLF_color %92
OpBranch %77
%79 = OpLabel
%93 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%94 = OpLoad %int %93
%95 = OpConvertSToF %float %94
%96 = OpCompositeConstruct %v4float %95 %95 %95 %95
OpStore %x_GLF_color %96
OpBranch %77
%77 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %97
%tint_symbol = OpFunctionParameter %main_out
%101 = OpLabel
%102 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %102
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%104 = OpLabel
%105 = OpFunctionCall %void %main_1
%107 = OpLoad %v4float %x_GLF_color
%108 = OpCompositeConstruct %main_out %107
%106 = OpFunctionCall %void %tint_symbol_2 %108
OpReturn
OpFunctionEnd