Hash :
175d918a
Author :
Date :
2018-12-16T19:53:23
Revert "Load correct libGLESv2 on Linux and Mac." This reverts commit dd815b623e60a1e1550f328104ffcd7caf20fde1. Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006 Original change's description: > Load correct libGLESv2 on Linux and Mac. > > libEGL was implicitly loading libGLESv2 on startup. This is bad > because on platforms like Linux and Mac we could sometimes use the > incorrect rpath. This in turn meant we needed workarounds like using > "_angle" extensions to our shared objects to get the correct loading > behaviour. > > Fix this by loading libGLESv2 dynamically in libEGL. We build the > loader automatically from egl.xml. The loader itself is lazily > initialized on every EGL entry point call. This is necessary because > on Linux, etc, there is no equivalent to Windows' DLLMain. > > We also use an EGL.h with different generation options so we have the > proper function pointer types. A README is included for instructions > on how to regenerate EGL.h. > > The entry point generation script is refactored into a helper class > that is used in the loader generator. Also adds the libGLESv2 versions > of the EGL entry points in the DEF file on Windows. This allows them to > be imported properly in 32-bit configurations. > > Also fixes up some errors in ANGLE's entry point definitions. Also > includes a clang-format disable rule for the Khronos headers. > > This CL will help us to run ANGLE tests against native drivers. > > Bug: angleproject:2871 > Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 > Reviewed-on: https://chromium-review.googlesource.com/c/1370725 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2871 Reviewed-on: https://chromium-review.googlesource.com/c/1378887 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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
//
// Copyright(c) 2014 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.
//
// entry_points_egl_ext.h : Defines the EGL extension entry points.
#ifndef LIBGLESV2_ENTRYPOINTSEGLEXT_H_
#define LIBGLESV2_ENTRYPOINTSEGLEXT_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <export.h>
namespace egl
{
// EGL_ANGLE_query_surface_pointer
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
void **value);
// EGL_NV_post_sub_buffer
ANGLE_EXPORT EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy,
EGLSurface surface,
EGLint x,
EGLint y,
EGLint width,
EGLint height);
// EGL_EXT_platform_base
ANGLE_EXPORT EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform,
void *native_display,
const EGLint *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLint *attrib_list);
// EGL_EXT_device_query
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT const char *EGLAPIENTRY QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name);
// EGL_KHR_image_base/EGL_KHR_image
ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLint *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image);
// EGL_EXT_device_creation
ANGLE_EXPORT EGLDeviceEXT EGLAPIENTRY CreateDeviceANGLE(EGLint device_type,
void *native_device,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY ReleaseDeviceANGLE(EGLDeviceEXT device);
// EGL_KHR_stream
ANGLE_EXPORT EGLStreamKHR EGLAPIENTRY CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamAttribKHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLint value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryStreamKHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLint *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryStreamu64KHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLuint64KHR *value);
// EGL_KHR_stream_consumer_gltexture
ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamConsumerGLTextureExternalKHR(EGLDisplay dpy,
EGLStreamKHR stream);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY
StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib *attrib_list);
// EGL_ANGLE_stream_producer_d3d_texture
ANGLE_EXPORT EGLBoolean EGLAPIENTRY
CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamPostD3DTextureANGLE(EGLDisplay dpy,
EGLStreamKHR stream,
void *texture,
const EGLAttrib *attrib_list);
// EGL_CHROMIUM_get_sync_values
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetSyncValuesCHROMIUM(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *ust,
EGLuint64KHR *msc,
EGLuint64KHR *sbc);
// EGL_KHR_swap_buffers_with_damage
ANGLE_EXPORT EGLBoolean EGLAPIENTRY SwapBuffersWithDamageKHR(EGLDisplay dpy,
EGLSurface surface,
EGLint *rects,
EGLint n_rects);
// EGL_ANDROID_presentation_time
ANGLE_EXPORT EGLBoolean EGLAPIENTRY PresentationTimeANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLnsecsANDROID time);
// EGL_ANDRIOD_blob_cache
ANGLE_EXPORT void EGLAPIENTRY SetBlobCacheFuncsANDROID(EGLDisplay dpy,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get);
// EGL_ANGLE_program_cache_control
ANGLE_EXPORT EGLint EGLAPIENTRY ProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib);
ANGLE_EXPORT void EGLAPIENTRY ProgramCacheQueryANGLE(EGLDisplay dpy,
EGLint index,
void *key,
EGLint *keysize,
void *binary,
EGLint *binarysize);
ANGLE_EXPORT void EGLAPIENTRY ProgramCachePopulateANGLE(EGLDisplay dpy,
const void *key,
EGLint keysize,
const void *binary,
EGLint binarysize);
ANGLE_EXPORT EGLint EGLAPIENTRY ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode);
// EGL_KHR_debug
ANGLE_EXPORT EGLint EGLAPIENTRY DebugMessageControlKHR(EGLDEBUGPROCKHR callback,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDebugKHR(EGLint attribute, EGLAttrib *value);
ANGLE_EXPORT EGLint EGLAPIENTRY LabelObjectKHR(EGLDisplay display,
EGLenum objectType,
EGLObjectKHR object,
EGLLabelKHR label);
// ANDROID_get_frame_timestamps
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetCompositorTimingSupportedANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint name);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetCompositorTimingANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint numTimestamps,
const EGLint *names,
EGLnsecsANDROID *values);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetNextFrameIdANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *frameId);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetFrameTimestampSupportedANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint timestamp);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY GetFrameTimestampsANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values);
} // namespace egl
#endif // LIBGLESV2_ENTRYPOINTSEGLEXT_H_