summaryrefslogtreecommitdiffstats
path: root/gfx/angle/checkout/src/common/PackedGLEnums_autogen.h
blob: 452dca344eb7590c0d7a203b077414ef45c1d8ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_packed_gl_enums.py using data from packed_gl_enums.json.
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// PackedGLEnums_autogen.h:
//   Declares ANGLE-specific enums classes for GLenums and functions operating
//   on them.

#ifndef COMMON_PACKEDGLENUMS_AUTOGEN_H_
#define COMMON_PACKEDGLENUMS_AUTOGEN_H_

#include <angle_gl.h>

#include <cstdint>
#include <ostream>

namespace gl
{

template <typename Enum>
Enum FromGLenum(GLenum from);

enum class AlphaTestFunc : uint8_t
{
    AlwaysPass = 0,
    Equal      = 1,
    Gequal     = 2,
    Greater    = 3,
    Lequal     = 4,
    Less       = 5,
    Never      = 6,
    NotEqual   = 7,

    InvalidEnum = 8,
    EnumCount   = 8,
};

template <>
AlphaTestFunc FromGLenum<AlphaTestFunc>(GLenum from);
GLenum ToGLenum(AlphaTestFunc from);
std::ostream &operator<<(std::ostream &os, AlphaTestFunc value);

enum class BufferBinding : uint8_t
{
    Array             = 0,
    AtomicCounter     = 1,
    CopyRead          = 2,
    CopyWrite         = 3,
    DispatchIndirect  = 4,
    DrawIndirect      = 5,
    ElementArray      = 6,
    PixelPack         = 7,
    PixelUnpack       = 8,
    ShaderStorage     = 9,
    Texture           = 10,
    TransformFeedback = 11,
    Uniform           = 12,

    InvalidEnum = 13,
    EnumCount   = 13,
};

template <>
BufferBinding FromGLenum<BufferBinding>(GLenum from);
GLenum ToGLenum(BufferBinding from);
std::ostream &operator<<(std::ostream &os, BufferBinding value);

enum class BufferUsage : uint8_t
{
    DynamicCopy = 0,
    DynamicDraw = 1,
    DynamicRead = 2,
    StaticCopy  = 3,
    StaticDraw  = 4,
    StaticRead  = 5,
    StreamCopy  = 6,
    StreamDraw  = 7,
    StreamRead  = 8,

    InvalidEnum = 9,
    EnumCount   = 9,
};

template <>
BufferUsage FromGLenum<BufferUsage>(GLenum from);
GLenum ToGLenum(BufferUsage from);
std::ostream &operator<<(std::ostream &os, BufferUsage value);

enum class ClientVertexArrayType : uint8_t
{
    Color        = 0,
    Normal       = 1,
    PointSize    = 2,
    TextureCoord = 3,
    Vertex       = 4,

    InvalidEnum = 5,
    EnumCount   = 5,
};

template <>
ClientVertexArrayType FromGLenum<ClientVertexArrayType>(GLenum from);
GLenum ToGLenum(ClientVertexArrayType from);
std::ostream &operator<<(std::ostream &os, ClientVertexArrayType value);

enum class CullFaceMode : uint8_t
{
    Back         = 0,
    Front        = 1,
    FrontAndBack = 2,

    InvalidEnum = 3,
    EnumCount   = 3,
};

template <>
CullFaceMode FromGLenum<CullFaceMode>(GLenum from);
GLenum ToGLenum(CullFaceMode from);
std::ostream &operator<<(std::ostream &os, CullFaceMode value);

enum class FilterMode : uint8_t
{
    Nearest              = 0,
    Linear               = 1,
    NearestMipmapNearest = 2,
    NearestMipmapLinear  = 3,
    LinearMipmapLinear   = 4,

    InvalidEnum = 5,
    EnumCount   = 5,
};

template <>
FilterMode FromGLenum<FilterMode>(GLenum from);
GLenum ToGLenum(FilterMode from);
std::ostream &operator<<(std::ostream &os, FilterMode value);

enum class FogMode : uint8_t
{
    Exp    = 0,
    Exp2   = 1,
    Linear = 2,

    InvalidEnum = 3,
    EnumCount   = 3,
};

template <>
FogMode FromGLenum<FogMode>(GLenum from);
GLenum ToGLenum(FogMode from);
std::ostream &operator<<(std::ostream &os, FogMode value);

enum class GraphicsResetStatus : uint8_t
{
    NoError              = 0,
    GuiltyContextReset   = 1,
    InnocentContextReset = 2,
    UnknownContextReset  = 3,
    PurgedContextResetNV = 4,

    InvalidEnum = 5,
    EnumCount   = 5,
};

template <>
GraphicsResetStatus FromGLenum<GraphicsResetStatus>(GLenum from);
GLenum ToGLenum(GraphicsResetStatus from);
std::ostream &operator<<(std::ostream &os, GraphicsResetStatus value);

enum class HandleType : uint8_t
{
    OpaqueFd    = 0,
    ZirconVmo   = 1,
    ZirconEvent = 2,

    InvalidEnum = 3,
    EnumCount   = 3,
};

template <>
HandleType FromGLenum<HandleType>(GLenum from);
GLenum ToGLenum(HandleType from);
std::ostream &operator<<(std::ostream &os, HandleType value);

enum class HintSetting : uint8_t
{
    DontCare = 0,
    Fastest  = 1,
    Nicest   = 2,

    InvalidEnum = 3,
    EnumCount   = 3,
};

template <>
HintSetting FromGLenum<HintSetting>(GLenum from);
GLenum ToGLenum(HintSetting from);
std::ostream &operator<<(std::ostream &os, HintSetting value);

enum class ImageLayout : uint8_t
{
    Undefined                      = 0,
    General                        = 1,
    ColorAttachment                = 2,
    DepthStencilAttachment         = 3,
    DepthStencilReadOnlyAttachment = 4,
    ShaderReadOnly                 = 5,
    TransferSrc                    = 6,
    TransferDst                    = 7,
    DepthReadOnlyStencilAttachment = 8,
    DepthAttachmentStencilReadOnly = 9,

    InvalidEnum = 10,
    EnumCount   = 10,
};

template <>
ImageLayout FromGLenum<ImageLayout>(GLenum from);
GLenum ToGLenum(ImageLayout from);
std::ostream &operator<<(std::ostream &os, ImageLayout value);

enum class LightParameter : uint8_t
{
    Ambient              = 0,
    AmbientAndDiffuse    = 1,
    ConstantAttenuation  = 2,
    Diffuse              = 3,
    LinearAttenuation    = 4,
    Position             = 5,
    QuadraticAttenuation = 6,
    Specular             = 7,
    SpotCutoff           = 8,
    SpotDirection        = 9,
    SpotExponent         = 10,

    InvalidEnum = 11,
    EnumCount   = 11,
};

template <>
LightParameter FromGLenum<LightParameter>(GLenum from);
GLenum ToGLenum(LightParameter from);
std::ostream &operator<<(std::ostream &os, LightParameter value);

enum class LogicalOperation : uint8_t
{
    And          = 0,
    AndInverted  = 1,
    AndReverse   = 2,
    Clear        = 3,
    Copy         = 4,
    CopyInverted = 5,
    Equiv        = 6,
    Invert       = 7,
    Nand         = 8,
    Noop         = 9,
    Nor          = 10,
    Or           = 11,
    OrInverted   = 12,
    OrReverse    = 13,
    Set          = 14,
    Xor          = 15,

    InvalidEnum = 16,
    EnumCount   = 16,
};

template <>
LogicalOperation FromGLenum<LogicalOperation>(GLenum from);
GLenum ToGLenum(LogicalOperation from);
std::ostream &operator<<(std::ostream &os, LogicalOperation value);

enum class MaterialParameter : uint8_t
{
    Ambient           = 0,
    AmbientAndDiffuse = 1,
    Diffuse           = 2,
    Emission          = 3,
    Shininess         = 4,
    Specular          = 5,

    InvalidEnum = 6,
    EnumCount   = 6,
};

template <>
MaterialParameter FromGLenum<MaterialParameter>(GLenum from);
GLenum ToGLenum(MaterialParameter from);
std::ostream &operator<<(std::ostream &os, MaterialParameter value);

enum class MatrixType : uint8_t
{
    Modelview  = 0,
    Projection = 1,
    Texture    = 2,

    InvalidEnum = 3,
    EnumCount   = 3,
};

template <>
MatrixType FromGLenum<MatrixType>(GLenum from);
GLenum ToGLenum(MatrixType from);
std::ostream &operator<<(std::ostream &os, MatrixType value);

enum class PointParameter : uint8_t
{
    PointSizeMin             = 0,
    PointSizeMax             = 1,
    PointFadeThresholdSize   = 2,
    PointDistanceAttenuation = 3,

    InvalidEnum = 4,
    EnumCount   = 4,
};

template <>
PointParameter FromGLenum<PointParameter>(GLenum from);
GLenum ToGLenum(PointParameter from);
std::ostream &operator<<(std::ostream &os, PointParameter value);

enum class ProvokingVertexConvention : uint8_t
{
    FirstVertexConvention = 0,
    LastVertexConvention  = 1,

    InvalidEnum = 2,
    EnumCount   = 2,
};

template <>
ProvokingVertexConvention FromGLenum<ProvokingVertexConvention>(GLenum from);
GLenum ToGLenum(ProvokingVertexConvention from);
std::ostream &operator<<(std::ostream &os, ProvokingVertexConvention value);

enum class QueryType : uint8_t
{
    AnySamples                         = 0,
    AnySamplesConservative             = 1,
    CommandsCompleted                  = 2,
    PrimitivesGenerated                = 3,
    TimeElapsed                        = 4,
    Timestamp                          = 5,
    TransformFeedbackPrimitivesWritten = 6,

    InvalidEnum = 7,
    EnumCount   = 7,
};

template <>
QueryType FromGLenum<QueryType>(GLenum from);
GLenum ToGLenum(QueryType from);
std::ostream &operator<<(std::ostream &os, QueryType value);

enum class ShaderType : uint8_t
{
    Vertex         = 0,
    TessControl    = 1,
    TessEvaluation = 2,
    Geometry       = 3,
    Fragment       = 4,
    Compute        = 5,

    InvalidEnum = 6,
    EnumCount   = 6,
};

template <>
ShaderType FromGLenum<ShaderType>(GLenum from);
GLenum ToGLenum(ShaderType from);
std::ostream &operator<<(std::ostream &os, ShaderType value);

enum class ShadingModel : uint8_t
{
    Flat   = 0,
    Smooth = 1,

    InvalidEnum = 2,
    EnumCount   = 2,
};

template <>
ShadingModel FromGLenum<ShadingModel>(GLenum from);
GLenum ToGLenum(ShadingModel from);
std::ostream &operator<<(std::ostream &os, ShadingModel value);

enum class ShadingRate : uint8_t
{
    Undefined = 0,
    _1x1      = 1,
    _1x2      = 2,
    _2x1      = 3,
    _2x2      = 4,
    _4x2      = 5,
    _4x4      = 6,

    InvalidEnum = 7,
    EnumCount   = 7,
};

template <>
ShadingRate FromGLenum<ShadingRate>(GLenum from);
GLenum ToGLenum(ShadingRate from);
std::ostream &operator<<(std::ostream &os, ShadingRate value);

enum class TextureCombine : uint8_t
{
    Add         = 0,
    AddSigned   = 1,
    Dot3Rgb     = 2,
    Dot3Rgba    = 3,
    Interpolate = 4,
    Modulate    = 5,
    Replace     = 6,
    Subtract    = 7,

    InvalidEnum = 8,
    EnumCount   = 8,
};

template <>
TextureCombine FromGLenum<TextureCombine>(GLenum from);
GLenum ToGLenum(TextureCombine from);
std::ostream &operator<<(std::ostream &os, TextureCombine value);

enum class TextureEnvMode : uint8_t
{
    Add      = 0,
    Blend    = 1,
    Combine  = 2,
    Decal    = 3,
    Modulate = 4,
    Replace  = 5,

    InvalidEnum = 6,
    EnumCount   = 6,
};

template <>
TextureEnvMode FromGLenum<TextureEnvMode>(GLenum from);
GLenum ToGLenum(TextureEnvMode from);
std::ostream &operator<<(std::ostream &os, TextureEnvMode value);

enum class TextureEnvParameter : uint8_t
{
    Mode              = 0,
    Color             = 1,
    CombineRgb        = 2,
    CombineAlpha      = 3,
    RgbScale          = 4,
    AlphaScale        = 5,
    Src0Rgb           = 6,
    Src1Rgb           = 7,
    Src2Rgb           = 8,
    Src0Alpha         = 9,
    Src1Alpha         = 10,
    Src2Alpha         = 11,
    Op0Rgb            = 12,
    Op1Rgb            = 13,
    Op2Rgb            = 14,
    Op0Alpha          = 15,
    Op1Alpha          = 16,
    Op2Alpha          = 17,
    PointCoordReplace = 18,

    InvalidEnum = 19,
    EnumCount   = 19,
};

template <>
TextureEnvParameter FromGLenum<TextureEnvParameter>(GLenum from);
GLenum ToGLenum(TextureEnvParameter from);
std::ostream &operator<<(std::ostream &os, TextureEnvParameter value);

enum class TextureEnvTarget : uint8_t
{
    Env         = 0,
    PointSprite = 1,

    InvalidEnum = 2,
    EnumCount   = 2,
};

template <>
TextureEnvTarget FromGLenum<TextureEnvTarget>(GLenum from);
GLenum ToGLenum(TextureEnvTarget from);
std::ostream &operator<<(std::ostream &os, TextureEnvTarget value);

enum class TextureOp : uint8_t
{
    OneMinusSrcAlpha = 0,
    OneMinusSrcColor = 1,
    SrcAlpha         = 2,
    SrcColor         = 3,

    InvalidEnum = 4,
    EnumCount   = 4,
};

template <>
TextureOp FromGLenum<TextureOp>(GLenum from);
GLenum ToGLenum(TextureOp from);
std::ostream &operator<<(std::ostream &os, TextureOp value);

enum class TextureSrc : uint8_t
{
    Constant     = 0,
    Previous     = 1,
    PrimaryColor = 2,
    Texture      = 3,

    InvalidEnum = 4,
    EnumCount   = 4,
};

template <>
TextureSrc FromGLenum<TextureSrc>(GLenum from);
GLenum ToGLenum(TextureSrc from);
std::ostream &operator<<(std::ostream &os, TextureSrc value);

enum class TextureTarget : uint8_t
{
    _2D                 = 0,
    _2DArray            = 1,
    _2DMultisample      = 2,
    _2DMultisampleArray = 3,
    _3D                 = 4,
    External            = 5,
    Rectangle           = 6,
    CubeMapPositiveX    = 7,
    CubeMapNegativeX    = 8,
    CubeMapPositiveY    = 9,
    CubeMapNegativeY    = 10,
    CubeMapPositiveZ    = 11,
    CubeMapNegativeZ    = 12,
    CubeMapArray        = 13,
    VideoImage          = 14,
    Buffer              = 15,

    InvalidEnum = 16,
    EnumCount   = 16,
};

template <>
TextureTarget FromGLenum<TextureTarget>(GLenum from);
GLenum ToGLenum(TextureTarget from);
std::ostream &operator<<(std::ostream &os, TextureTarget value);

enum class TextureType : uint8_t
{
    _2D                 = 0,
    _2DArray            = 1,
    _2DMultisample      = 2,
    _2DMultisampleArray = 3,
    _3D                 = 4,
    External            = 5,
    Rectangle           = 6,
    CubeMap             = 7,
    CubeMapArray        = 8,
    VideoImage          = 9,
    Buffer              = 10,

    InvalidEnum = 11,
    EnumCount   = 11,
};

template <>
TextureType FromGLenum<TextureType>(GLenum from);
GLenum ToGLenum(TextureType from);
std::ostream &operator<<(std::ostream &os, TextureType value);

enum class VertexArrayType : uint8_t
{
    Color        = 0,
    Normal       = 1,
    PointSize    = 2,
    TextureCoord = 3,
    Vertex       = 4,

    InvalidEnum = 5,
    EnumCount   = 5,
};

template <>
VertexArrayType FromGLenum<VertexArrayType>(GLenum from);
GLenum ToGLenum(VertexArrayType from);
std::ostream &operator<<(std::ostream &os, VertexArrayType value);

enum class WrapMode : uint8_t
{
    ClampToEdge    = 0,
    ClampToBorder  = 1,
    MirroredRepeat = 2,
    Repeat         = 3,

    InvalidEnum = 4,
    EnumCount   = 4,
};

template <>
WrapMode FromGLenum<WrapMode>(GLenum from);
GLenum ToGLenum(WrapMode from);
std::ostream &operator<<(std::ostream &os, WrapMode value);

}  // namespace gl

#endif  // COMMON_PACKEDGLENUMS_AUTOGEN_H_