• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "testMatrix2x2"
9               OpMemberName %_UniformBuffer 1 "colorGreen"
10               OpMemberName %_UniformBuffer 2 "colorRed"
11               OpName %_entrypoint_v "_entrypoint_v"
12               OpName %main "main"
13               OpDecorate %sk_FragColor RelaxedPrecision
14               OpDecorate %sk_FragColor Location 0
15               OpDecorate %sk_FragColor Index 0
16               OpMemberDecorate %_UniformBuffer 0 Offset 0
17               OpMemberDecorate %_UniformBuffer 0 ColMajor
18               OpMemberDecorate %_UniformBuffer 0 MatrixStride 16
19               OpMemberDecorate %_UniformBuffer 1 Offset 32
20               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
21               OpMemberDecorate %_UniformBuffer 2 Offset 48
22               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
23               OpDecorate %_UniformBuffer Block
24               OpDecorate %7 Binding 0
25               OpDecorate %7 DescriptorSet 0
26               OpDecorate %41 RelaxedPrecision
27               OpDecorate %44 RelaxedPrecision
28               OpDecorate %45 RelaxedPrecision
29      %float = OpTypeFloat 32
30    %v4float = OpTypeVector %float 4
31%_ptr_Output_v4float = OpTypePointer Output %v4float
32%sk_FragColor = OpVariable %_ptr_Output_v4float Output
33    %v2float = OpTypeVector %float 2
34%mat2v2float = OpTypeMatrix %v2float 2
35%_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float
36%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
37          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
38       %void = OpTypeVoid
39         %14 = OpTypeFunction %void
40    %float_0 = OpConstant %float 0
41         %17 = OpConstantComposite %v2float %float_0 %float_0
42%_ptr_Function_v2float = OpTypePointer Function %v2float
43         %21 = OpTypeFunction %v4float %_ptr_Function_v2float
44%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
45        %int = OpTypeInt 32 1
46      %int_0 = OpConstant %int 0
47   %float_n2 = OpConstant %float -2
48       %bool = OpTypeBool
49%_ptr_Function_v4float = OpTypePointer Function %v4float
50%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
51      %int_1 = OpConstant %int 1
52      %int_2 = OpConstant %int 2
53%_entrypoint_v = OpFunction %void None %14
54         %15 = OpLabel
55         %18 = OpVariable %_ptr_Function_v2float Function
56               OpStore %18 %17
57         %20 = OpFunctionCall %v4float %main %18
58               OpStore %sk_FragColor %20
59               OpReturn
60               OpFunctionEnd
61       %main = OpFunction %v4float None %21
62         %22 = OpFunctionParameter %_ptr_Function_v2float
63         %23 = OpLabel
64         %33 = OpVariable %_ptr_Function_v4float Function
65         %25 = OpAccessChain %_ptr_Uniform_mat2v2float %7 %int_0
66         %29 = OpLoad %mat2v2float %25
67         %24 = OpExtInst %float %1 Determinant %29
68         %31 = OpFOrdEqual %bool %24 %float_n2
69               OpSelectionMerge %37 None
70               OpBranchConditional %31 %35 %36
71         %35 = OpLabel
72         %38 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
73         %41 = OpLoad %v4float %38
74               OpStore %33 %41
75               OpBranch %37
76         %36 = OpLabel
77         %42 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
78         %44 = OpLoad %v4float %42
79               OpStore %33 %44
80               OpBranch %37
81         %37 = OpLabel
82         %45 = OpLoad %v4float %33
83               OpReturnValue %45
84               OpFunctionEnd
85