blob: 7c2ac8648342f59191e76fd21cdcf2a2ee4aee6f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 88
; Schema: 0
OpCapability Shader
%67 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "matrix_a_uni"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %x "x"
OpName %matrix_u "matrix_u"
OpName %b "b"
OpName %matrix_b "matrix_b"
OpName %x_42 "x_42"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpMemberDecorate %buf0 0 ColMajor
OpMemberDecorate %buf0 0 MatrixStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%mat4v4float = OpTypeMatrix %v4float 4
%buf0 = OpTypeStruct %mat4v4float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%19 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%int_4 = OpConstant %int 4
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Function_float = OpTypePointer Function %float
%float_1 = OpConstant %float 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_n1 = OpConstant %float -1
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
%76 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%77 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x = OpVariable %_ptr_Function_int Function %19
%matrix_u = OpVariable %_ptr_Function_v4float Function %5
%b = OpVariable %_ptr_Function_int Function %19
%matrix_b = OpVariable %_ptr_Function_v4float Function %5
%x_42 = OpVariable %_ptr_Function_v4float Function %5
OpStore %x %int_4
OpBranch %26
%26 = OpLabel
OpLoopMerge %27 %28 None
OpBranch %29
%29 = OpLabel
%30 = OpLoad %int %x
%32 = OpSGreaterThanEqual %bool %30 %int_1
OpSelectionMerge %34 None
OpBranchConditional %32 %35 %36
%35 = OpLabel
OpBranch %34
%36 = OpLabel
OpBranch %27
%34 = OpLabel
%37 = OpLoad %int %x
%39 = OpAccessChain %_ptr_Function_float %matrix_u %37
OpStore %39 %float_1
OpBranch %28
%28 = OpLabel
%41 = OpLoad %int %x
%42 = OpISub %int %41 %int_1
OpStore %x %42
OpBranch %26
%27 = OpLabel
OpStore %b %int_4
OpBranch %43
%43 = OpLabel
OpLoopMerge %44 %45 None
OpBranch %46
%46 = OpLabel
%51 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0 %uint_0
%52 = OpLoad %float %51
%54 = OpFOrdLessThan %bool %52 %float_n1
OpSelectionMerge %55 None
OpBranchConditional %54 %56 %57
%56 = OpLabel
OpBranch %55
%57 = OpLabel
OpBranch %44
%55 = OpLabel
%58 = OpLoad %int %b
%59 = OpLoad %int %b
%60 = OpSGreaterThan %bool %59 %int_1
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %63
%62 = OpLabel
%64 = OpLoad %v4float %matrix_b
%65 = OpLoad %v4float %matrix_b
%66 = OpExtInst %v4float %67 NMin %64 %65
OpStore %x_42 %66
OpBranch %61
%63 = OpLabel
%68 = OpLoad %v4float %matrix_u
OpStore %x_42 %68
OpBranch %61
%61 = OpLabel
%70 = OpAccessChain %_ptr_Function_float %x_42 %uint_1
%71 = OpLoad %float %70
%72 = OpAccessChain %_ptr_Function_float %matrix_b %58
OpStore %72 %71
OpBranch %45
%45 = OpLabel
%73 = OpLoad %int %b
%74 = OpISub %int %73 %int_1
OpStore %b %74
OpBranch %43
%44 = OpLabel
OpStore %x_GLF_color %76
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %77
%80 = OpLabel
%81 = OpFunctionCall %void %main_1
%82 = OpLoad %v4float %x_GLF_color
%83 = OpCompositeConstruct %main_out %82
OpReturnValue %83
OpFunctionEnd
%main = OpFunction %void None %12
%85 = OpLabel
%86 = OpFunctionCall %main_out %main_inner
%87 = OpCompositeExtract %v4float %86 0
OpStore %x_GLF_color_1_1 %87
OpReturn
OpFunctionEnd