Hash :
465d6090
Author :
Date :
2019-01-02T16:21:18
Add GL_ANGLE_provoking_vertex on D3D11 and GL. This extension is a subset of GL_ARB_provoking_vertex without the QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query. Bug: angleproject:2829 Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77 Reviewed-on: https://chromium-review.googlesource.com/c/1410289 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 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 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
// 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.cpp:
// Implements ANGLE-specific enums classes for EGLenums and functions operating
// on them.
#include "common/PackedEGLEnums_autogen.h"
#include "common/debug.h"
namespace egl
{
template <>
CompositorTiming FromEGLenum<CompositorTiming>(EGLenum from)
{
switch (from)
{
case EGL_COMPOSITE_DEADLINE_ANDROID:
return CompositorTiming::CompositeDeadline;
case EGL_COMPOSITE_INTERVAL_ANDROID:
return CompositorTiming::CompositInterval;
case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID:
return CompositorTiming::CompositToPresentLatency;
default:
return CompositorTiming::InvalidEnum;
}
}
EGLenum ToEGLenum(CompositorTiming from)
{
switch (from)
{
case CompositorTiming::CompositeDeadline:
return EGL_COMPOSITE_DEADLINE_ANDROID;
case CompositorTiming::CompositInterval:
return EGL_COMPOSITE_INTERVAL_ANDROID;
case CompositorTiming::CompositToPresentLatency:
return EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID;
default:
UNREACHABLE();
return 0;
}
}
template <>
MessageType FromEGLenum<MessageType>(EGLenum from)
{
switch (from)
{
case EGL_DEBUG_MSG_CRITICAL_KHR:
return MessageType::Critical;
case EGL_DEBUG_MSG_ERROR_KHR:
return MessageType::Error;
case EGL_DEBUG_MSG_WARN_KHR:
return MessageType::Warn;
case EGL_DEBUG_MSG_INFO_KHR:
return MessageType::Info;
default:
return MessageType::InvalidEnum;
}
}
EGLenum ToEGLenum(MessageType from)
{
switch (from)
{
case MessageType::Critical:
return EGL_DEBUG_MSG_CRITICAL_KHR;
case MessageType::Error:
return EGL_DEBUG_MSG_ERROR_KHR;
case MessageType::Warn:
return EGL_DEBUG_MSG_WARN_KHR;
case MessageType::Info:
return EGL_DEBUG_MSG_INFO_KHR;
default:
UNREACHABLE();
return 0;
}
}
template <>
ObjectType FromEGLenum<ObjectType>(EGLenum from)
{
switch (from)
{
case EGL_OBJECT_THREAD_KHR:
return ObjectType::Thread;
case EGL_OBJECT_DISPLAY_KHR:
return ObjectType::Display;
case EGL_OBJECT_CONTEXT_KHR:
return ObjectType::Context;
case EGL_OBJECT_SURFACE_KHR:
return ObjectType::Surface;
case EGL_OBJECT_IMAGE_KHR:
return ObjectType::Image;
case EGL_OBJECT_SYNC_KHR:
return ObjectType::Sync;
case EGL_OBJECT_STREAM_KHR:
return ObjectType::Stream;
default:
return ObjectType::InvalidEnum;
}
}
EGLenum ToEGLenum(ObjectType from)
{
switch (from)
{
case ObjectType::Thread:
return EGL_OBJECT_THREAD_KHR;
case ObjectType::Display:
return EGL_OBJECT_DISPLAY_KHR;
case ObjectType::Context:
return EGL_OBJECT_CONTEXT_KHR;
case ObjectType::Surface:
return EGL_OBJECT_SURFACE_KHR;
case ObjectType::Image:
return EGL_OBJECT_IMAGE_KHR;
case ObjectType::Sync:
return EGL_OBJECT_SYNC_KHR;
case ObjectType::Stream:
return EGL_OBJECT_STREAM_KHR;
default:
UNREACHABLE();
return 0;
}
}
template <>
TextureFormat FromEGLenum<TextureFormat>(EGLenum from)
{
switch (from)
{
case EGL_NO_TEXTURE:
return TextureFormat::NoTexture;
case EGL_TEXTURE_RGB:
return TextureFormat::RGB;
case EGL_TEXTURE_RGBA:
return TextureFormat::RGBA;
default:
return TextureFormat::InvalidEnum;
}
}
EGLenum ToEGLenum(TextureFormat from)
{
switch (from)
{
case TextureFormat::NoTexture:
return EGL_NO_TEXTURE;
case TextureFormat::RGB:
return EGL_TEXTURE_RGB;
case TextureFormat::RGBA:
return EGL_TEXTURE_RGBA;
default:
UNREACHABLE();
return 0;
}
}
template <>
Timestamp FromEGLenum<Timestamp>(EGLenum from)
{
switch (from)
{
case EGL_REQUESTED_PRESENT_TIME_ANDROID:
return Timestamp::RequestedPresentTime;
case EGL_RENDERING_COMPLETE_TIME_ANDROID:
return Timestamp::RenderingCompleteTime;
case EGL_COMPOSITION_LATCH_TIME_ANDROID:
return Timestamp::CompositionLatchTime;
case EGL_FIRST_COMPOSITION_START_TIME_ANDROID:
return Timestamp::FirstCompositionStartTime;
case EGL_LAST_COMPOSITION_START_TIME_ANDROID:
return Timestamp::LastCompositionStartTime;
case EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID:
return Timestamp::FirstCompositionGPUFinishedTime;
case EGL_DISPLAY_PRESENT_TIME_ANDROID:
return Timestamp::DisplayPresentTime;
case EGL_DEQUEUE_READY_TIME_ANDROID:
return Timestamp::DequeueReadyTime;
case EGL_READS_DONE_TIME_ANDROID:
return Timestamp::ReadsDoneTime;
default:
return Timestamp::InvalidEnum;
}
}
EGLenum ToEGLenum(Timestamp from)
{
switch (from)
{
case Timestamp::RequestedPresentTime:
return EGL_REQUESTED_PRESENT_TIME_ANDROID;
case Timestamp::RenderingCompleteTime:
return EGL_RENDERING_COMPLETE_TIME_ANDROID;
case Timestamp::CompositionLatchTime:
return EGL_COMPOSITION_LATCH_TIME_ANDROID;
case Timestamp::FirstCompositionStartTime:
return EGL_FIRST_COMPOSITION_START_TIME_ANDROID;
case Timestamp::LastCompositionStartTime:
return EGL_LAST_COMPOSITION_START_TIME_ANDROID;
case Timestamp::FirstCompositionGPUFinishedTime:
return EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID;
case Timestamp::DisplayPresentTime:
return EGL_DISPLAY_PRESENT_TIME_ANDROID;
case Timestamp::DequeueReadyTime:
return EGL_DEQUEUE_READY_TIME_ANDROID;
case Timestamp::ReadsDoneTime:
return EGL_READS_DONE_TIME_ANDROID;
default:
UNREACHABLE();
return 0;
}
}
} // namespace egl