Hash :
485cdd8b
Author :
Date :
2019-06-26T16:19:34
Add std::ostream output for packed enums. This can be used to convert them to strings for debugging. It can also be helpful for frame capture and replay. Currently the enums are output as GLenum values. Bug: angleproject:3611 Change-Id: Ifcd04449e0ef61e125e0db65aa0dcc2bf48b38ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678399 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_packed_gl_enums.py using data from packed_egl_enums.json.
//
// Copyright 2019 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.
//
// PackedEGLEnums_autogen.h:
// Declares ANGLE-specific enums classes for EGLenums and functions operating
// on them.
#ifndef COMMON_PACKEDEGLENUMS_AUTOGEN_H_
#define COMMON_PACKEDEGLENUMS_AUTOGEN_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <angle_gl.h>
#include <cstdint>
#include <ostream>
namespace egl
{
template <typename Enum>
Enum FromEGLenum(EGLenum from);
enum class CompositorTiming : uint8_t
{
CompositeDeadline = 0,
CompositInterval = 1,
CompositToPresentLatency = 2,
InvalidEnum = 3,
EnumCount = 3,
};
template <>
CompositorTiming FromEGLenum<CompositorTiming>(EGLenum from);
EGLenum ToEGLenum(CompositorTiming from);
std::ostream &operator<<(std::ostream &os, CompositorTiming value);
enum class MessageType : uint8_t
{
Critical = 0,
Error = 1,
Warn = 2,
Info = 3,
InvalidEnum = 4,
EnumCount = 4,
};
template <>
MessageType FromEGLenum<MessageType>(EGLenum from);
EGLenum ToEGLenum(MessageType from);
std::ostream &operator<<(std::ostream &os, MessageType value);
enum class ObjectType : uint8_t
{
Thread = 0,
Display = 1,
Context = 2,
Surface = 3,
Image = 4,
Sync = 5,
Stream = 6,
InvalidEnum = 7,
EnumCount = 7,
};
template <>
ObjectType FromEGLenum<ObjectType>(EGLenum from);
EGLenum ToEGLenum(ObjectType from);
std::ostream &operator<<(std::ostream &os, ObjectType value);
enum class TextureFormat : uint8_t
{
NoTexture = 0,
RGB = 1,
RGBA = 2,
InvalidEnum = 3,
EnumCount = 3,
};
template <>
TextureFormat FromEGLenum<TextureFormat>(EGLenum from);
EGLenum ToEGLenum(TextureFormat from);
std::ostream &operator<<(std::ostream &os, TextureFormat value);
enum class Timestamp : uint8_t
{
RequestedPresentTime = 0,
RenderingCompleteTime = 1,
CompositionLatchTime = 2,
FirstCompositionStartTime = 3,
LastCompositionStartTime = 4,
FirstCompositionGPUFinishedTime = 5,
DisplayPresentTime = 6,
DequeueReadyTime = 7,
ReadsDoneTime = 8,
InvalidEnum = 9,
EnumCount = 9,
};
template <>
Timestamp FromEGLenum<Timestamp>(EGLenum from);
EGLenum ToEGLenum(Timestamp from);
std::ostream &operator<<(std::ostream &os, Timestamp value);
} // namespace egl
#endif // COMMON_PACKEDEGLENUMS_AUTOGEN_H_