• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Amber Authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef SRC_FORMAT_DATA_H_
16 #define SRC_FORMAT_DATA_H_
17 
18 enum class FormatComponentType {
19   kR = 0,
20   kG,
21   kB,
22   kA,
23   kX,
24   kD,
25   kS,
26 };
27 
28 enum class FormatMode {
29   kUNorm = 0,
30   kUInt,
31   kUFloat,
32   kUScaled,
33   kSInt,
34   kSNorm,
35   kSScaled,
36   kSFloat,
37   kSRGB,
38 };
39 
40 enum class FormatType {
41   kUnknown = 0,
42   kA1R5G5B5_UNORM_PACK16,
43   kA2B10G10R10_SINT_PACK32,
44   kA2B10G10R10_SNORM_PACK32,
45   kA2B10G10R10_SSCALED_PACK32,
46   kA2B10G10R10_UINT_PACK32,
47   kA2B10G10R10_UNORM_PACK32,
48   kA2B10G10R10_USCALED_PACK32,
49   kA2R10G10B10_SINT_PACK32,
50   kA2R10G10B10_SNORM_PACK32,
51   kA2R10G10B10_SSCALED_PACK32,
52   kA2R10G10B10_UINT_PACK32,
53   kA2R10G10B10_UNORM_PACK32,
54   kA2R10G10B10_USCALED_PACK32,
55   kA8B8G8R8_SINT_PACK32,
56   kA8B8G8R8_SNORM_PACK32,
57   kA8B8G8R8_SRGB_PACK32,
58   kA8B8G8R8_SSCALED_PACK32,
59   kA8B8G8R8_UINT_PACK32,
60   kA8B8G8R8_UNORM_PACK32,
61   kA8B8G8R8_USCALED_PACK32,
62   kB10G11R11_UFLOAT_PACK32,
63   kB4G4R4A4_UNORM_PACK16,
64   kB5G5R5A1_UNORM_PACK16,
65   kB5G6R5_UNORM_PACK16,
66   kB8G8R8A8_SINT,
67   kB8G8R8A8_SNORM,
68   kB8G8R8A8_SRGB,
69   kB8G8R8A8_SSCALED,
70   kB8G8R8A8_UINT,
71   kB8G8R8A8_UNORM,
72   kB8G8R8A8_USCALED,
73   kB8G8R8_SINT,
74   kB8G8R8_SNORM,
75   kB8G8R8_SRGB,
76   kB8G8R8_SSCALED,
77   kB8G8R8_UINT,
78   kB8G8R8_UNORM,
79   kB8G8R8_USCALED,
80   kD16_UNORM,
81   kD16_UNORM_S8_UINT,
82   kD24_UNORM_S8_UINT,
83   kD32_SFLOAT,
84   kD32_SFLOAT_S8_UINT,
85   kR16G16B16A16_SFLOAT,
86   kR16G16B16A16_SINT,
87   kR16G16B16A16_SNORM,
88   kR16G16B16A16_SSCALED,
89   kR16G16B16A16_UINT,
90   kR16G16B16A16_UNORM,
91   kR16G16B16A16_USCALED,
92   kR16G16B16_SFLOAT,
93   kR16G16B16_SINT,
94   kR16G16B16_SNORM,
95   kR16G16B16_SSCALED,
96   kR16G16B16_UINT,
97   kR16G16B16_UNORM,
98   kR16G16B16_USCALED,
99   kR16G16_SFLOAT,
100   kR16G16_SINT,
101   kR16G16_SNORM,
102   kR16G16_SSCALED,
103   kR16G16_UINT,
104   kR16G16_UNORM,
105   kR16G16_USCALED,
106   kR16_SFLOAT,
107   kR16_SINT,
108   kR16_SNORM,
109   kR16_SSCALED,
110   kR16_UINT,
111   kR16_UNORM,
112   kR16_USCALED,
113   kR32G32B32A32_SFLOAT,
114   kR32G32B32A32_SINT,
115   kR32G32B32A32_UINT,
116   kR32G32B32_SFLOAT,
117   kR32G32B32_SINT,
118   kR32G32B32_UINT,
119   kR32G32_SFLOAT,
120   kR32G32_SINT,
121   kR32G32_UINT,
122   kR32_SFLOAT,
123   kR32_SINT,
124   kR32_UINT,
125   kR4G4B4A4_UNORM_PACK16,
126   kR4G4_UNORM_PACK8,
127   kR5G5B5A1_UNORM_PACK16,
128   kR5G6B5_UNORM_PACK16,
129   kR64G64B64A64_SFLOAT,
130   kR64G64B64A64_SINT,
131   kR64G64B64A64_UINT,
132   kR64G64B64_SFLOAT,
133   kR64G64B64_SINT,
134   kR64G64B64_UINT,
135   kR64G64_SFLOAT,
136   kR64G64_SINT,
137   kR64G64_UINT,
138   kR64_SFLOAT,
139   kR64_SINT,
140   kR64_UINT,
141   kR8G8B8A8_SINT,
142   kR8G8B8A8_SNORM,
143   kR8G8B8A8_SRGB,
144   kR8G8B8A8_SSCALED,
145   kR8G8B8A8_UINT,
146   kR8G8B8A8_UNORM,
147   kR8G8B8A8_USCALED,
148   kR8G8B8_SINT,
149   kR8G8B8_SNORM,
150   kR8G8B8_SRGB,
151   kR8G8B8_SSCALED,
152   kR8G8B8_UINT,
153   kR8G8B8_UNORM,
154   kR8G8B8_USCALED,
155   kR8G8_SINT,
156   kR8G8_SNORM,
157   kR8G8_SRGB,
158   kR8G8_SSCALED,
159   kR8G8_UINT,
160   kR8G8_UNORM,
161   kR8G8_USCALED,
162   kR8_SINT,
163   kR8_SNORM,
164   kR8_SRGB,
165   kR8_SSCALED,
166   kR8_UINT,
167   kR8_UNORM,
168   kR8_USCALED,
169   kS8_UINT,
170   kX8_D24_UNORM_PACK32,
171 };
172 
173 #endif  // SRC_FORMAT_DATA_H_
174