blob: 413b393b19edc678ff195000acc8cc7cf87a90f2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 78
; Schema: 0
OpCapability Shader
%52 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "one"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %a "a"
OpName %b "b"
OpName %c "c"
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 %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_int_uint_3 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%void = OpTypeVoid
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%_ptr_Function__arr_int_uint_3 = OpTypePointer Function %_arr_int_uint_3
%21 = OpConstantNull %_arr_int_uint_3
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%46 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_0
%int_4 = OpConstant %int 4
%64 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%65 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%66 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%a = OpVariable %_ptr_Function__arr_int_uint_3 Function %21
%b = OpVariable %_ptr_Function_int Function %24
%c = OpVariable %_ptr_Function_int Function %24
%27 = OpAccessChain %_ptr_Function_int %a %int_0
OpStore %27 %int_1
%29 = OpAccessChain %_ptr_Function_int %a %int_1
OpStore %29 %int_2
%31 = OpAccessChain %_ptr_Function_int %a %int_2
OpStore %31 %int_3
OpStore %b %int_0
%35 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%36 = OpLoad %int %35
%37 = OpAccessChain %_ptr_Function_int %a %36
%38 = OpLoad %int %37
OpStore %c %38
%39 = OpLoad %int %c
%40 = OpSGreaterThan %bool %39 %int_1
OpSelectionMerge %42 None
OpBranchConditional %40 %43 %42
%43 = OpLabel
OpStore %x_GLF_color %46
%47 = OpLoad %int %b
%48 = OpIAdd %int %47 %int_1
OpStore %b %48
OpBranch %42
%42 = OpLabel
%49 = OpLoad %int %b
%50 = OpIAdd %int %49 %int_1
OpStore %b %50
%51 = OpExtInst %int %52 SClamp %50 %int_0 %int_2
%53 = OpAccessChain %_ptr_Function_int %a %51
%54 = OpLoad %int %53
%55 = OpAccessChain %_ptr_Function_int %a %51
%56 = OpIAdd %int %54 %int_1
OpStore %55 %56
%57 = OpAccessChain %_ptr_Function_int %a %int_2
%58 = OpLoad %int %57
%60 = OpIEqual %bool %58 %int_4
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %63
%62 = OpLabel
OpStore %x_GLF_color %64
OpBranch %61
%63 = OpLabel
OpStore %x_GLF_color %65
OpBranch %61
%61 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %66
%tint_symbol = OpFunctionParameter %main_out
%70 = OpLabel
%71 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %71
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%73 = OpLabel
%74 = OpFunctionCall %void %main_1
%76 = OpLoad %v4float %x_GLF_color
%77 = OpCompositeConstruct %main_out %76
%75 = OpFunctionCall %void %tint_symbol_2 %77
OpReturn
OpFunctionEnd