xref: /aosp_15_r20/external/angle/src/common/uniform_type_info_autogen.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_uniform_type_table.py.
3 //
4 // Copyright 2024 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // Uniform type info table:
9 //   Metadata about a particular uniform format, indexed by GL type.
10 
11 #ifndef COMMON_UNIFORM_TYPE_INFO_AUTOGEN_H_
12 #define COMMON_UNIFORM_TYPE_INFO_AUTOGEN_H_
13 
14 #include "angle_gl.h"
15 #include "utilities.h"
16 
17 namespace gl
18 {
19 
GetUniformElementComponents(UniformTypeIndex index)20 inline GLint GetUniformElementComponents(UniformTypeIndex index)
21 {
22     static constexpr std::array<uint8_t, 77> kElementComponents = {
23         0, 1, 2, 3, 4, 1, 4, 6, 8, 9, 6, 12, 16, 8, 12, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1,
24         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  2, 3,  4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
25         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1, 1,  1, 1, 1, 1, 1, 2, 3, 4, 1, 1};
26     ASSERT(index.value >= 0 && index.value < 77);
27     return kElementComponents[index.value];
28 }
29 
30 }  // namespace gl
31 #endif  // COMMON_UNIFORM_TYPE_INFO_AUTOGEN_H_
32