diff options
Diffstat (limited to 'gfx/angle/checkout/src/libEGL')
-rw-r--r-- | gfx/angle/checkout/src/libEGL/egl_loader_autogen.cpp | 261 | ||||
-rw-r--r-- | gfx/angle/checkout/src/libEGL/egl_loader_autogen.h | 118 | ||||
-rw-r--r-- | gfx/angle/checkout/src/libEGL/libEGL.cpp | 709 | ||||
-rw-r--r-- | gfx/angle/checkout/src/libEGL/libEGL.def | 88 | ||||
-rw-r--r-- | gfx/angle/checkout/src/libEGL/libEGL.rc | 103 | ||||
-rw-r--r-- | gfx/angle/checkout/src/libEGL/resource.h | 14 |
6 files changed, 1293 insertions, 0 deletions
diff --git a/gfx/angle/checkout/src/libEGL/egl_loader_autogen.cpp b/gfx/angle/checkout/src/libEGL/egl_loader_autogen.cpp new file mode 100644 index 0000000000..0e622e63c5 --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/egl_loader_autogen.cpp @@ -0,0 +1,261 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_loader.py using data from egl.xml and egl_angle_ext.xml. +// +// 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. +// +// egl_loader_autogen.cpp: +// Simple EGL function loader. + +#include "egl_loader_autogen.h" + +PFNEGLCHOOSECONFIGPROC EGL_ChooseConfig; +PFNEGLCOPYBUFFERSPROC EGL_CopyBuffers; +PFNEGLCREATECONTEXTPROC EGL_CreateContext; +PFNEGLCREATEPBUFFERSURFACEPROC EGL_CreatePbufferSurface; +PFNEGLCREATEPIXMAPSURFACEPROC EGL_CreatePixmapSurface; +PFNEGLCREATEWINDOWSURFACEPROC EGL_CreateWindowSurface; +PFNEGLDESTROYCONTEXTPROC EGL_DestroyContext; +PFNEGLDESTROYSURFACEPROC EGL_DestroySurface; +PFNEGLGETCONFIGATTRIBPROC EGL_GetConfigAttrib; +PFNEGLGETCONFIGSPROC EGL_GetConfigs; +PFNEGLGETCURRENTDISPLAYPROC EGL_GetCurrentDisplay; +PFNEGLGETCURRENTSURFACEPROC EGL_GetCurrentSurface; +PFNEGLGETDISPLAYPROC EGL_GetDisplay; +PFNEGLGETERRORPROC EGL_GetError; +PFNEGLGETPROCADDRESSPROC EGL_GetProcAddress; +PFNEGLINITIALIZEPROC EGL_Initialize; +PFNEGLMAKECURRENTPROC EGL_MakeCurrent; +PFNEGLQUERYCONTEXTPROC EGL_QueryContext; +PFNEGLQUERYSTRINGPROC EGL_QueryString; +PFNEGLQUERYSURFACEPROC EGL_QuerySurface; +PFNEGLSWAPBUFFERSPROC EGL_SwapBuffers; +PFNEGLTERMINATEPROC EGL_Terminate; +PFNEGLWAITGLPROC EGL_WaitGL; +PFNEGLWAITNATIVEPROC EGL_WaitNative; +PFNEGLBINDTEXIMAGEPROC EGL_BindTexImage; +PFNEGLRELEASETEXIMAGEPROC EGL_ReleaseTexImage; +PFNEGLSURFACEATTRIBPROC EGL_SurfaceAttrib; +PFNEGLSWAPINTERVALPROC EGL_SwapInterval; +PFNEGLBINDAPIPROC EGL_BindAPI; +PFNEGLQUERYAPIPROC EGL_QueryAPI; +PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC EGL_CreatePbufferFromClientBuffer; +PFNEGLRELEASETHREADPROC EGL_ReleaseThread; +PFNEGLWAITCLIENTPROC EGL_WaitClient; +PFNEGLGETCURRENTCONTEXTPROC EGL_GetCurrentContext; +PFNEGLCREATESYNCPROC EGL_CreateSync; +PFNEGLDESTROYSYNCPROC EGL_DestroySync; +PFNEGLCLIENTWAITSYNCPROC EGL_ClientWaitSync; +PFNEGLGETSYNCATTRIBPROC EGL_GetSyncAttrib; +PFNEGLCREATEIMAGEPROC EGL_CreateImage; +PFNEGLDESTROYIMAGEPROC EGL_DestroyImage; +PFNEGLGETPLATFORMDISPLAYPROC EGL_GetPlatformDisplay; +PFNEGLCREATEPLATFORMWINDOWSURFACEPROC EGL_CreatePlatformWindowSurface; +PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC EGL_CreatePlatformPixmapSurface; +PFNEGLWAITSYNCPROC EGL_WaitSync; +PFNEGLSETBLOBCACHEFUNCSANDROIDPROC EGL_SetBlobCacheFuncsANDROID; +PFNEGLGETCOMPOSITORTIMINGANDROIDPROC EGL_GetCompositorTimingANDROID; +PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC EGL_GetCompositorTimingSupportedANDROID; +PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC EGL_GetFrameTimestampSupportedANDROID; +PFNEGLGETFRAMETIMESTAMPSANDROIDPROC EGL_GetFrameTimestampsANDROID; +PFNEGLGETNEXTFRAMEIDANDROIDPROC EGL_GetNextFrameIdANDROID; +PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC EGL_GetNativeClientBufferANDROID; +PFNEGLDUPNATIVEFENCEFDANDROIDPROC EGL_DupNativeFenceFDANDROID; +PFNEGLPRESENTATIONTIMEANDROIDPROC EGL_PresentationTimeANDROID; +PFNEGLCREATEDEVICEANGLEPROC EGL_CreateDeviceANGLE; +PFNEGLRELEASEDEVICEANGLEPROC EGL_ReleaseDeviceANGLE; +PFNEGLQUERYDISPLAYATTRIBANGLEPROC EGL_QueryDisplayAttribANGLE; +PFNEGLQUERYSTRINGIANGLEPROC EGL_QueryStringiANGLE; +PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC EGL_ProgramCacheGetAttribANGLE; +PFNEGLPROGRAMCACHEPOPULATEANGLEPROC EGL_ProgramCachePopulateANGLE; +PFNEGLPROGRAMCACHEQUERYANGLEPROC EGL_ProgramCacheQueryANGLE; +PFNEGLPROGRAMCACHERESIZEANGLEPROC EGL_ProgramCacheResizeANGLE; +PFNEGLQUERYSURFACEPOINTERANGLEPROC EGL_QuerySurfacePointerANGLE; +PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC EGL_CreateStreamProducerD3DTextureANGLE; +PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC EGL_StreamPostD3DTextureANGLE; +PFNEGLGETSYNCVALUESCHROMIUMPROC EGL_GetSyncValuesCHROMIUM; +PFNEGLQUERYDEVICEATTRIBEXTPROC EGL_QueryDeviceAttribEXT; +PFNEGLQUERYDEVICESTRINGEXTPROC EGL_QueryDeviceStringEXT; +PFNEGLQUERYDISPLAYATTRIBEXTPROC EGL_QueryDisplayAttribEXT; +PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC EGL_CreatePlatformPixmapSurfaceEXT; +PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC EGL_CreatePlatformWindowSurfaceEXT; +PFNEGLGETPLATFORMDISPLAYEXTPROC EGL_GetPlatformDisplayEXT; +PFNEGLDEBUGMESSAGECONTROLKHRPROC EGL_DebugMessageControlKHR; +PFNEGLLABELOBJECTKHRPROC EGL_LabelObjectKHR; +PFNEGLQUERYDEBUGKHRPROC EGL_QueryDebugKHR; +PFNEGLCLIENTWAITSYNCKHRPROC EGL_ClientWaitSyncKHR; +PFNEGLCREATESYNCKHRPROC EGL_CreateSyncKHR; +PFNEGLDESTROYSYNCKHRPROC EGL_DestroySyncKHR; +PFNEGLGETSYNCATTRIBKHRPROC EGL_GetSyncAttribKHR; +PFNEGLCREATEIMAGEKHRPROC EGL_CreateImageKHR; +PFNEGLDESTROYIMAGEKHRPROC EGL_DestroyImageKHR; +PFNEGLCREATESTREAMKHRPROC EGL_CreateStreamKHR; +PFNEGLDESTROYSTREAMKHRPROC EGL_DestroyStreamKHR; +PFNEGLQUERYSTREAMKHRPROC EGL_QueryStreamKHR; +PFNEGLQUERYSTREAMU64KHRPROC EGL_QueryStreamu64KHR; +PFNEGLSTREAMATTRIBKHRPROC EGL_StreamAttribKHR; +PFNEGLSTREAMCONSUMERACQUIREKHRPROC EGL_StreamConsumerAcquireKHR; +PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC EGL_StreamConsumerGLTextureExternalKHR; +PFNEGLSTREAMCONSUMERRELEASEKHRPROC EGL_StreamConsumerReleaseKHR; +PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC EGL_SwapBuffersWithDamageKHR; +PFNEGLWAITSYNCKHRPROC EGL_WaitSyncKHR; +PFNEGLPOSTSUBBUFFERNVPROC EGL_PostSubBufferNV; +PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC EGL_StreamConsumerGLTextureExternalAttribsNV; + +namespace angle +{ +void LoadEGL_EGL(LoadProc loadProc) +{ + EGL_ChooseConfig = reinterpret_cast<PFNEGLCHOOSECONFIGPROC>(loadProc("EGL_ChooseConfig")); + EGL_CopyBuffers = reinterpret_cast<PFNEGLCOPYBUFFERSPROC>(loadProc("EGL_CopyBuffers")); + EGL_CreateContext = reinterpret_cast<PFNEGLCREATECONTEXTPROC>(loadProc("EGL_CreateContext")); + EGL_CreatePbufferSurface = + reinterpret_cast<PFNEGLCREATEPBUFFERSURFACEPROC>(loadProc("EGL_CreatePbufferSurface")); + EGL_CreatePixmapSurface = + reinterpret_cast<PFNEGLCREATEPIXMAPSURFACEPROC>(loadProc("EGL_CreatePixmapSurface")); + EGL_CreateWindowSurface = + reinterpret_cast<PFNEGLCREATEWINDOWSURFACEPROC>(loadProc("EGL_CreateWindowSurface")); + EGL_DestroyContext = reinterpret_cast<PFNEGLDESTROYCONTEXTPROC>(loadProc("EGL_DestroyContext")); + EGL_DestroySurface = reinterpret_cast<PFNEGLDESTROYSURFACEPROC>(loadProc("EGL_DestroySurface")); + EGL_GetConfigAttrib = + reinterpret_cast<PFNEGLGETCONFIGATTRIBPROC>(loadProc("EGL_GetConfigAttrib")); + EGL_GetConfigs = reinterpret_cast<PFNEGLGETCONFIGSPROC>(loadProc("EGL_GetConfigs")); + EGL_GetCurrentDisplay = + reinterpret_cast<PFNEGLGETCURRENTDISPLAYPROC>(loadProc("EGL_GetCurrentDisplay")); + EGL_GetCurrentSurface = + reinterpret_cast<PFNEGLGETCURRENTSURFACEPROC>(loadProc("EGL_GetCurrentSurface")); + EGL_GetDisplay = reinterpret_cast<PFNEGLGETDISPLAYPROC>(loadProc("EGL_GetDisplay")); + EGL_GetError = reinterpret_cast<PFNEGLGETERRORPROC>(loadProc("EGL_GetError")); + EGL_GetProcAddress = reinterpret_cast<PFNEGLGETPROCADDRESSPROC>(loadProc("EGL_GetProcAddress")); + EGL_Initialize = reinterpret_cast<PFNEGLINITIALIZEPROC>(loadProc("EGL_Initialize")); + EGL_MakeCurrent = reinterpret_cast<PFNEGLMAKECURRENTPROC>(loadProc("EGL_MakeCurrent")); + EGL_QueryContext = reinterpret_cast<PFNEGLQUERYCONTEXTPROC>(loadProc("EGL_QueryContext")); + EGL_QueryString = reinterpret_cast<PFNEGLQUERYSTRINGPROC>(loadProc("EGL_QueryString")); + EGL_QuerySurface = reinterpret_cast<PFNEGLQUERYSURFACEPROC>(loadProc("EGL_QuerySurface")); + EGL_SwapBuffers = reinterpret_cast<PFNEGLSWAPBUFFERSPROC>(loadProc("EGL_SwapBuffers")); + EGL_Terminate = reinterpret_cast<PFNEGLTERMINATEPROC>(loadProc("EGL_Terminate")); + EGL_WaitGL = reinterpret_cast<PFNEGLWAITGLPROC>(loadProc("EGL_WaitGL")); + EGL_WaitNative = reinterpret_cast<PFNEGLWAITNATIVEPROC>(loadProc("EGL_WaitNative")); + EGL_BindTexImage = reinterpret_cast<PFNEGLBINDTEXIMAGEPROC>(loadProc("EGL_BindTexImage")); + EGL_ReleaseTexImage = + reinterpret_cast<PFNEGLRELEASETEXIMAGEPROC>(loadProc("EGL_ReleaseTexImage")); + EGL_SurfaceAttrib = reinterpret_cast<PFNEGLSURFACEATTRIBPROC>(loadProc("EGL_SurfaceAttrib")); + EGL_SwapInterval = reinterpret_cast<PFNEGLSWAPINTERVALPROC>(loadProc("EGL_SwapInterval")); + EGL_BindAPI = reinterpret_cast<PFNEGLBINDAPIPROC>(loadProc("EGL_BindAPI")); + EGL_QueryAPI = reinterpret_cast<PFNEGLQUERYAPIPROC>(loadProc("EGL_QueryAPI")); + EGL_CreatePbufferFromClientBuffer = reinterpret_cast<PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC>( + loadProc("EGL_CreatePbufferFromClientBuffer")); + EGL_ReleaseThread = reinterpret_cast<PFNEGLRELEASETHREADPROC>(loadProc("EGL_ReleaseThread")); + EGL_WaitClient = reinterpret_cast<PFNEGLWAITCLIENTPROC>(loadProc("EGL_WaitClient")); + EGL_GetCurrentContext = + reinterpret_cast<PFNEGLGETCURRENTCONTEXTPROC>(loadProc("EGL_GetCurrentContext")); + EGL_CreateSync = reinterpret_cast<PFNEGLCREATESYNCPROC>(loadProc("EGL_CreateSync")); + EGL_DestroySync = reinterpret_cast<PFNEGLDESTROYSYNCPROC>(loadProc("EGL_DestroySync")); + EGL_ClientWaitSync = reinterpret_cast<PFNEGLCLIENTWAITSYNCPROC>(loadProc("EGL_ClientWaitSync")); + EGL_GetSyncAttrib = reinterpret_cast<PFNEGLGETSYNCATTRIBPROC>(loadProc("EGL_GetSyncAttrib")); + EGL_CreateImage = reinterpret_cast<PFNEGLCREATEIMAGEPROC>(loadProc("EGL_CreateImage")); + EGL_DestroyImage = reinterpret_cast<PFNEGLDESTROYIMAGEPROC>(loadProc("EGL_DestroyImage")); + EGL_GetPlatformDisplay = + reinterpret_cast<PFNEGLGETPLATFORMDISPLAYPROC>(loadProc("EGL_GetPlatformDisplay")); + EGL_CreatePlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEPROC>( + loadProc("EGL_CreatePlatformWindowSurface")); + EGL_CreatePlatformPixmapSurface = reinterpret_cast<PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC>( + loadProc("EGL_CreatePlatformPixmapSurface")); + EGL_WaitSync = reinterpret_cast<PFNEGLWAITSYNCPROC>(loadProc("EGL_WaitSync")); + EGL_SetBlobCacheFuncsANDROID = reinterpret_cast<PFNEGLSETBLOBCACHEFUNCSANDROIDPROC>( + loadProc("EGL_SetBlobCacheFuncsANDROID")); + EGL_GetCompositorTimingANDROID = reinterpret_cast<PFNEGLGETCOMPOSITORTIMINGANDROIDPROC>( + loadProc("EGL_GetCompositorTimingANDROID")); + EGL_GetCompositorTimingSupportedANDROID = + reinterpret_cast<PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC>( + loadProc("EGL_GetCompositorTimingSupportedANDROID")); + EGL_GetFrameTimestampSupportedANDROID = + reinterpret_cast<PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC>( + loadProc("EGL_GetFrameTimestampSupportedANDROID")); + EGL_GetFrameTimestampsANDROID = reinterpret_cast<PFNEGLGETFRAMETIMESTAMPSANDROIDPROC>( + loadProc("EGL_GetFrameTimestampsANDROID")); + EGL_GetNextFrameIdANDROID = + reinterpret_cast<PFNEGLGETNEXTFRAMEIDANDROIDPROC>(loadProc("EGL_GetNextFrameIdANDROID")); + EGL_GetNativeClientBufferANDROID = reinterpret_cast<PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC>( + loadProc("EGL_GetNativeClientBufferANDROID")); + EGL_DupNativeFenceFDANDROID = reinterpret_cast<PFNEGLDUPNATIVEFENCEFDANDROIDPROC>( + loadProc("EGL_DupNativeFenceFDANDROID")); + EGL_PresentationTimeANDROID = reinterpret_cast<PFNEGLPRESENTATIONTIMEANDROIDPROC>( + loadProc("EGL_PresentationTimeANDROID")); + EGL_CreateDeviceANGLE = + reinterpret_cast<PFNEGLCREATEDEVICEANGLEPROC>(loadProc("EGL_CreateDeviceANGLE")); + EGL_ReleaseDeviceANGLE = + reinterpret_cast<PFNEGLRELEASEDEVICEANGLEPROC>(loadProc("EGL_ReleaseDeviceANGLE")); + EGL_QueryDisplayAttribANGLE = reinterpret_cast<PFNEGLQUERYDISPLAYATTRIBANGLEPROC>( + loadProc("EGL_QueryDisplayAttribANGLE")); + EGL_QueryStringiANGLE = + reinterpret_cast<PFNEGLQUERYSTRINGIANGLEPROC>(loadProc("EGL_QueryStringiANGLE")); + EGL_ProgramCacheGetAttribANGLE = reinterpret_cast<PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC>( + loadProc("EGL_ProgramCacheGetAttribANGLE")); + EGL_ProgramCachePopulateANGLE = reinterpret_cast<PFNEGLPROGRAMCACHEPOPULATEANGLEPROC>( + loadProc("EGL_ProgramCachePopulateANGLE")); + EGL_ProgramCacheQueryANGLE = + reinterpret_cast<PFNEGLPROGRAMCACHEQUERYANGLEPROC>(loadProc("EGL_ProgramCacheQueryANGLE")); + EGL_ProgramCacheResizeANGLE = reinterpret_cast<PFNEGLPROGRAMCACHERESIZEANGLEPROC>( + loadProc("EGL_ProgramCacheResizeANGLE")); + EGL_QuerySurfacePointerANGLE = reinterpret_cast<PFNEGLQUERYSURFACEPOINTERANGLEPROC>( + loadProc("EGL_QuerySurfacePointerANGLE")); + EGL_CreateStreamProducerD3DTextureANGLE = + reinterpret_cast<PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC>( + loadProc("EGL_CreateStreamProducerD3DTextureANGLE")); + EGL_StreamPostD3DTextureANGLE = reinterpret_cast<PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC>( + loadProc("EGL_StreamPostD3DTextureANGLE")); + EGL_GetSyncValuesCHROMIUM = + reinterpret_cast<PFNEGLGETSYNCVALUESCHROMIUMPROC>(loadProc("EGL_GetSyncValuesCHROMIUM")); + EGL_QueryDeviceAttribEXT = + reinterpret_cast<PFNEGLQUERYDEVICEATTRIBEXTPROC>(loadProc("EGL_QueryDeviceAttribEXT")); + EGL_QueryDeviceStringEXT = + reinterpret_cast<PFNEGLQUERYDEVICESTRINGEXTPROC>(loadProc("EGL_QueryDeviceStringEXT")); + EGL_QueryDisplayAttribEXT = + reinterpret_cast<PFNEGLQUERYDISPLAYATTRIBEXTPROC>(loadProc("EGL_QueryDisplayAttribEXT")); + EGL_CreatePlatformPixmapSurfaceEXT = reinterpret_cast<PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC>( + loadProc("EGL_CreatePlatformPixmapSurfaceEXT")); + EGL_CreatePlatformWindowSurfaceEXT = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>( + loadProc("EGL_CreatePlatformWindowSurfaceEXT")); + EGL_GetPlatformDisplayEXT = + reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(loadProc("EGL_GetPlatformDisplayEXT")); + EGL_DebugMessageControlKHR = + reinterpret_cast<PFNEGLDEBUGMESSAGECONTROLKHRPROC>(loadProc("EGL_DebugMessageControlKHR")); + EGL_LabelObjectKHR = reinterpret_cast<PFNEGLLABELOBJECTKHRPROC>(loadProc("EGL_LabelObjectKHR")); + EGL_QueryDebugKHR = reinterpret_cast<PFNEGLQUERYDEBUGKHRPROC>(loadProc("EGL_QueryDebugKHR")); + EGL_ClientWaitSyncKHR = + reinterpret_cast<PFNEGLCLIENTWAITSYNCKHRPROC>(loadProc("EGL_ClientWaitSyncKHR")); + EGL_CreateSyncKHR = reinterpret_cast<PFNEGLCREATESYNCKHRPROC>(loadProc("EGL_CreateSyncKHR")); + EGL_DestroySyncKHR = reinterpret_cast<PFNEGLDESTROYSYNCKHRPROC>(loadProc("EGL_DestroySyncKHR")); + EGL_GetSyncAttribKHR = + reinterpret_cast<PFNEGLGETSYNCATTRIBKHRPROC>(loadProc("EGL_GetSyncAttribKHR")); + EGL_CreateImageKHR = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(loadProc("EGL_CreateImageKHR")); + EGL_DestroyImageKHR = + reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(loadProc("EGL_DestroyImageKHR")); + EGL_CreateStreamKHR = + reinterpret_cast<PFNEGLCREATESTREAMKHRPROC>(loadProc("EGL_CreateStreamKHR")); + EGL_DestroyStreamKHR = + reinterpret_cast<PFNEGLDESTROYSTREAMKHRPROC>(loadProc("EGL_DestroyStreamKHR")); + EGL_QueryStreamKHR = reinterpret_cast<PFNEGLQUERYSTREAMKHRPROC>(loadProc("EGL_QueryStreamKHR")); + EGL_QueryStreamu64KHR = + reinterpret_cast<PFNEGLQUERYSTREAMU64KHRPROC>(loadProc("EGL_QueryStreamu64KHR")); + EGL_StreamAttribKHR = + reinterpret_cast<PFNEGLSTREAMATTRIBKHRPROC>(loadProc("EGL_StreamAttribKHR")); + EGL_StreamConsumerAcquireKHR = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREKHRPROC>( + loadProc("EGL_StreamConsumerAcquireKHR")); + EGL_StreamConsumerGLTextureExternalKHR = + reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC>( + loadProc("EGL_StreamConsumerGLTextureExternalKHR")); + EGL_StreamConsumerReleaseKHR = reinterpret_cast<PFNEGLSTREAMCONSUMERRELEASEKHRPROC>( + loadProc("EGL_StreamConsumerReleaseKHR")); + EGL_SwapBuffersWithDamageKHR = reinterpret_cast<PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC>( + loadProc("EGL_SwapBuffersWithDamageKHR")); + EGL_WaitSyncKHR = reinterpret_cast<PFNEGLWAITSYNCKHRPROC>(loadProc("EGL_WaitSyncKHR")); + EGL_PostSubBufferNV = + reinterpret_cast<PFNEGLPOSTSUBBUFFERNVPROC>(loadProc("EGL_PostSubBufferNV")); + EGL_StreamConsumerGLTextureExternalAttribsNV = + reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC>( + loadProc("EGL_StreamConsumerGLTextureExternalAttribsNV")); +} +} // namespace angle diff --git a/gfx/angle/checkout/src/libEGL/egl_loader_autogen.h b/gfx/angle/checkout/src/libEGL/egl_loader_autogen.h new file mode 100644 index 0000000000..e6f2240ee7 --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/egl_loader_autogen.h @@ -0,0 +1,118 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_loader.py using data from egl.xml and egl_angle_ext.xml. +// +// 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. +// +// egl_loader_autogen.h: +// Simple EGL function loader. + +#ifndef LIBEGL_EGL_LOADER_AUTOGEN_H_ +#define LIBEGL_EGL_LOADER_AUTOGEN_H_ + +#include <EGL/egl.h> +#include <EGL/eglext.h> + +extern PFNEGLCHOOSECONFIGPROC EGL_ChooseConfig; +extern PFNEGLCOPYBUFFERSPROC EGL_CopyBuffers; +extern PFNEGLCREATECONTEXTPROC EGL_CreateContext; +extern PFNEGLCREATEPBUFFERSURFACEPROC EGL_CreatePbufferSurface; +extern PFNEGLCREATEPIXMAPSURFACEPROC EGL_CreatePixmapSurface; +extern PFNEGLCREATEWINDOWSURFACEPROC EGL_CreateWindowSurface; +extern PFNEGLDESTROYCONTEXTPROC EGL_DestroyContext; +extern PFNEGLDESTROYSURFACEPROC EGL_DestroySurface; +extern PFNEGLGETCONFIGATTRIBPROC EGL_GetConfigAttrib; +extern PFNEGLGETCONFIGSPROC EGL_GetConfigs; +extern PFNEGLGETCURRENTDISPLAYPROC EGL_GetCurrentDisplay; +extern PFNEGLGETCURRENTSURFACEPROC EGL_GetCurrentSurface; +extern PFNEGLGETDISPLAYPROC EGL_GetDisplay; +extern PFNEGLGETERRORPROC EGL_GetError; +extern PFNEGLGETPROCADDRESSPROC EGL_GetProcAddress; +extern PFNEGLINITIALIZEPROC EGL_Initialize; +extern PFNEGLMAKECURRENTPROC EGL_MakeCurrent; +extern PFNEGLQUERYCONTEXTPROC EGL_QueryContext; +extern PFNEGLQUERYSTRINGPROC EGL_QueryString; +extern PFNEGLQUERYSURFACEPROC EGL_QuerySurface; +extern PFNEGLSWAPBUFFERSPROC EGL_SwapBuffers; +extern PFNEGLTERMINATEPROC EGL_Terminate; +extern PFNEGLWAITGLPROC EGL_WaitGL; +extern PFNEGLWAITNATIVEPROC EGL_WaitNative; +extern PFNEGLBINDTEXIMAGEPROC EGL_BindTexImage; +extern PFNEGLRELEASETEXIMAGEPROC EGL_ReleaseTexImage; +extern PFNEGLSURFACEATTRIBPROC EGL_SurfaceAttrib; +extern PFNEGLSWAPINTERVALPROC EGL_SwapInterval; +extern PFNEGLBINDAPIPROC EGL_BindAPI; +extern PFNEGLQUERYAPIPROC EGL_QueryAPI; +extern PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC EGL_CreatePbufferFromClientBuffer; +extern PFNEGLRELEASETHREADPROC EGL_ReleaseThread; +extern PFNEGLWAITCLIENTPROC EGL_WaitClient; +extern PFNEGLGETCURRENTCONTEXTPROC EGL_GetCurrentContext; +extern PFNEGLCREATESYNCPROC EGL_CreateSync; +extern PFNEGLDESTROYSYNCPROC EGL_DestroySync; +extern PFNEGLCLIENTWAITSYNCPROC EGL_ClientWaitSync; +extern PFNEGLGETSYNCATTRIBPROC EGL_GetSyncAttrib; +extern PFNEGLCREATEIMAGEPROC EGL_CreateImage; +extern PFNEGLDESTROYIMAGEPROC EGL_DestroyImage; +extern PFNEGLGETPLATFORMDISPLAYPROC EGL_GetPlatformDisplay; +extern PFNEGLCREATEPLATFORMWINDOWSURFACEPROC EGL_CreatePlatformWindowSurface; +extern PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC EGL_CreatePlatformPixmapSurface; +extern PFNEGLWAITSYNCPROC EGL_WaitSync; +extern PFNEGLSETBLOBCACHEFUNCSANDROIDPROC EGL_SetBlobCacheFuncsANDROID; +extern PFNEGLGETCOMPOSITORTIMINGANDROIDPROC EGL_GetCompositorTimingANDROID; +extern PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC EGL_GetCompositorTimingSupportedANDROID; +extern PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC EGL_GetFrameTimestampSupportedANDROID; +extern PFNEGLGETFRAMETIMESTAMPSANDROIDPROC EGL_GetFrameTimestampsANDROID; +extern PFNEGLGETNEXTFRAMEIDANDROIDPROC EGL_GetNextFrameIdANDROID; +extern PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC EGL_GetNativeClientBufferANDROID; +extern PFNEGLDUPNATIVEFENCEFDANDROIDPROC EGL_DupNativeFenceFDANDROID; +extern PFNEGLPRESENTATIONTIMEANDROIDPROC EGL_PresentationTimeANDROID; +extern PFNEGLCREATEDEVICEANGLEPROC EGL_CreateDeviceANGLE; +extern PFNEGLRELEASEDEVICEANGLEPROC EGL_ReleaseDeviceANGLE; +extern PFNEGLQUERYDISPLAYATTRIBANGLEPROC EGL_QueryDisplayAttribANGLE; +extern PFNEGLQUERYSTRINGIANGLEPROC EGL_QueryStringiANGLE; +extern PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC EGL_ProgramCacheGetAttribANGLE; +extern PFNEGLPROGRAMCACHEPOPULATEANGLEPROC EGL_ProgramCachePopulateANGLE; +extern PFNEGLPROGRAMCACHEQUERYANGLEPROC EGL_ProgramCacheQueryANGLE; +extern PFNEGLPROGRAMCACHERESIZEANGLEPROC EGL_ProgramCacheResizeANGLE; +extern PFNEGLQUERYSURFACEPOINTERANGLEPROC EGL_QuerySurfacePointerANGLE; +extern PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC EGL_CreateStreamProducerD3DTextureANGLE; +extern PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC EGL_StreamPostD3DTextureANGLE; +extern PFNEGLGETSYNCVALUESCHROMIUMPROC EGL_GetSyncValuesCHROMIUM; +extern PFNEGLQUERYDEVICEATTRIBEXTPROC EGL_QueryDeviceAttribEXT; +extern PFNEGLQUERYDEVICESTRINGEXTPROC EGL_QueryDeviceStringEXT; +extern PFNEGLQUERYDISPLAYATTRIBEXTPROC EGL_QueryDisplayAttribEXT; +extern PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC EGL_CreatePlatformPixmapSurfaceEXT; +extern PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC EGL_CreatePlatformWindowSurfaceEXT; +extern PFNEGLGETPLATFORMDISPLAYEXTPROC EGL_GetPlatformDisplayEXT; +extern PFNEGLDEBUGMESSAGECONTROLKHRPROC EGL_DebugMessageControlKHR; +extern PFNEGLLABELOBJECTKHRPROC EGL_LabelObjectKHR; +extern PFNEGLQUERYDEBUGKHRPROC EGL_QueryDebugKHR; +extern PFNEGLCLIENTWAITSYNCKHRPROC EGL_ClientWaitSyncKHR; +extern PFNEGLCREATESYNCKHRPROC EGL_CreateSyncKHR; +extern PFNEGLDESTROYSYNCKHRPROC EGL_DestroySyncKHR; +extern PFNEGLGETSYNCATTRIBKHRPROC EGL_GetSyncAttribKHR; +extern PFNEGLCREATEIMAGEKHRPROC EGL_CreateImageKHR; +extern PFNEGLDESTROYIMAGEKHRPROC EGL_DestroyImageKHR; +extern PFNEGLCREATESTREAMKHRPROC EGL_CreateStreamKHR; +extern PFNEGLDESTROYSTREAMKHRPROC EGL_DestroyStreamKHR; +extern PFNEGLQUERYSTREAMKHRPROC EGL_QueryStreamKHR; +extern PFNEGLQUERYSTREAMU64KHRPROC EGL_QueryStreamu64KHR; +extern PFNEGLSTREAMATTRIBKHRPROC EGL_StreamAttribKHR; +extern PFNEGLSTREAMCONSUMERACQUIREKHRPROC EGL_StreamConsumerAcquireKHR; +extern PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC EGL_StreamConsumerGLTextureExternalKHR; +extern PFNEGLSTREAMCONSUMERRELEASEKHRPROC EGL_StreamConsumerReleaseKHR; +extern PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC EGL_SwapBuffersWithDamageKHR; +extern PFNEGLWAITSYNCKHRPROC EGL_WaitSyncKHR; +extern PFNEGLPOSTSUBBUFFERNVPROC EGL_PostSubBufferNV; +extern PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC + EGL_StreamConsumerGLTextureExternalAttribsNV; + +namespace angle +{ +using GenericProc = void (*)(); +using LoadProc = GenericProc(KHRONOS_APIENTRY *)(const char *); +void LoadEGL_EGL(LoadProc loadProc); +} // namespace angle + +#endif // LIBEGL_EGL_LOADER_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libEGL/libEGL.cpp b/gfx/angle/checkout/src/libEGL/libEGL.cpp new file mode 100644 index 0000000000..8ee1f33d1e --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/libEGL.cpp @@ -0,0 +1,709 @@ +// +// Copyright (c) 2002-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. +// + +// libEGL.cpp: Implements the exported EGL functions. + +#include "common/system_utils.h" + +#include <memory> + +#if defined(ANGLE_USE_EGL_LOADER) +# include "libEGL/egl_loader_autogen.h" +#else +# include "libGLESv2/entry_points_egl.h" +# include "libGLESv2/entry_points_egl_ext.h" +#endif // defined(ANGLE_USE_EGL_LOADER) + +namespace +{ +#if defined(ANGLE_USE_EGL_LOADER) +bool gLoaded = false; +std::unique_ptr<angle::Library> gEntryPointsLib; + +angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol) +{ + return reinterpret_cast<angle::GenericProc>(gEntryPointsLib->getSymbol(symbol)); +} + +void EnsureEGLLoaded() +{ + if (gLoaded) + return; + + gEntryPointsLib.reset( + angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir)); + angle::LoadEGL_EGL(GlobalLoad); + if (!EGL_GetPlatformDisplay) + { + fprintf(stderr, "Error loading EGL entry points.\n"); + } + else + { + gLoaded = true; + } +} +#else +void EnsureEGLLoaded() {} +#endif // defined(ANGLE_USE_EGL_LOADER) +} // anonymous namespace + +extern "C" { + +EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, + const EGLint *attrib_list, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + EnsureEGLLoaded(); + return EGL_ChooseConfig(dpy, attrib_list, configs, config_size, num_config); +} + +EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, + EGLSurface surface, + EGLNativePixmapType target) +{ + EnsureEGLLoaded(); + return EGL_CopyBuffers(dpy, surface, target); +} + +EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, + EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateContext(dpy, config, share_context, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, + EGLConfig config, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePbufferSurface(dpy, config, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePixmapSurface(dpy, config, pixmap, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateWindowSurface(dpy, config, win, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx) +{ + EnsureEGLLoaded(); + return EGL_DestroyContext(dpy, ctx); +} + +EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface) +{ + EnsureEGLLoaded(); + return EGL_DestroySurface(dpy, surface); +} + +EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, + EGLConfig config, + EGLint attribute, + EGLint *value) +{ + EnsureEGLLoaded(); + return EGL_GetConfigAttrib(dpy, config, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + EnsureEGLLoaded(); + return EGL_GetConfigs(dpy, configs, config_size, num_config); +} + +EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void) +{ + EnsureEGLLoaded(); + return EGL_GetCurrentDisplay(); +} + +EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw) +{ + EnsureEGLLoaded(); + return EGL_GetCurrentSurface(readdraw); +} + +EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id) +{ + EnsureEGLLoaded(); + return EGL_GetDisplay(display_id); +} + +EGLint EGLAPIENTRY eglGetError(void) +{ + EnsureEGLLoaded(); + return EGL_GetError(); +} + +EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) +{ + EnsureEGLLoaded(); + return EGL_Initialize(dpy, major, minor); +} + +EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, + EGLSurface draw, + EGLSurface read, + EGLContext ctx) +{ + EnsureEGLLoaded(); + return EGL_MakeCurrent(dpy, draw, read, ctx); +} + +EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, + EGLContext ctx, + EGLint attribute, + EGLint *value) +{ + EnsureEGLLoaded(); + return EGL_QueryContext(dpy, ctx, attribute, value); +} + +const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) +{ + EnsureEGLLoaded(); + return EGL_QueryString(dpy, name); +} + +EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint *value) +{ + EnsureEGLLoaded(); + return EGL_QuerySurface(dpy, surface, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) +{ + EnsureEGLLoaded(); + return EGL_SwapBuffers(dpy, surface); +} + +EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) +{ + EnsureEGLLoaded(); + return EGL_Terminate(dpy); +} + +EGLBoolean EGLAPIENTRY eglWaitGL(void) +{ + EnsureEGLLoaded(); + return EGL_WaitGL(); +} + +EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine) +{ + EnsureEGLLoaded(); + return EGL_WaitNative(engine); +} + +EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + EnsureEGLLoaded(); + return EGL_BindTexImage(dpy, surface, buffer); +} + +EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + EnsureEGLLoaded(); + return EGL_ReleaseTexImage(dpy, surface, buffer); +} + +EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint value) +{ + EnsureEGLLoaded(); + return EGL_SurfaceAttrib(dpy, surface, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) +{ + EnsureEGLLoaded(); + return EGL_SwapInterval(dpy, interval); +} + +EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api) +{ + EnsureEGLLoaded(); + return EGL_BindAPI(api); +} + +EGLenum EGLAPIENTRY eglQueryAPI(void) +{ + EnsureEGLLoaded(); + return EGL_QueryAPI(); +} + +EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, + EGLenum buftype, + EGLClientBuffer buffer, + EGLConfig config, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglReleaseThread(void) +{ + EnsureEGLLoaded(); + return EGL_ReleaseThread(); +} + +EGLBoolean EGLAPIENTRY eglWaitClient(void) +{ + EnsureEGLLoaded(); + return EGL_WaitClient(); +} + +EGLContext EGLAPIENTRY eglGetCurrentContext(void) +{ + EnsureEGLLoaded(); + return EGL_GetCurrentContext(); +} + +EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateSync(dpy, type, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync) +{ + EnsureEGLLoaded(); + return EGL_DestroySync(dpy, sync); +} + +EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) +{ + EnsureEGLLoaded(); + return EGL_ClientWaitSync(dpy, sync, flags, timeout); +} + +EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, + EGLSync sync, + EGLint attribute, + EGLAttrib *value) +{ + EnsureEGLLoaded(); + return EGL_GetSyncAttrib(dpy, sync, attribute, value); +} + +EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateImage(dpy, ctx, target, buffer, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image) +{ + EnsureEGLLoaded(); + return EGL_DestroyImage(dpy, image); +} + +EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, + void *native_display, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_GetPlatformDisplay(platform, native_display, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePlatformWindowSurface(dpy, config, native_window, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) +{ + EnsureEGLLoaded(); + return EGL_WaitSync(dpy, sync, flags); +} + +EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + void **value) +{ + EnsureEGLLoaded(); + return EGL_QuerySurfacePointerANGLE(dpy, surface, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, + EGLSurface surface, + EGLint x, + EGLint y, + EGLint width, + EGLint height) +{ + EnsureEGLLoaded(); + return EGL_PostSubBufferNV(dpy, surface, x, y, width, height); +} + +EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, + void *native_display, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_GetPlatformDisplayEXT(platform, native_display, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list); +} + +EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value) +{ + EnsureEGLLoaded(); + return EGL_QueryDisplayAttribEXT(dpy, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy, + EGLint attribute, + EGLAttrib *value) +{ + EnsureEGLLoaded(); + return EGL_QueryDisplayAttribANGLE(dpy, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device, + EGLint attribute, + EGLAttrib *value) +{ + EnsureEGLLoaded(); + return EGL_QueryDeviceAttribEXT(device, attribute, value); +} + +const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) +{ + EnsureEGLLoaded(); + return EGL_QueryDeviceStringEXT(device, name); +} + +EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateImageKHR(dpy, ctx, target, buffer, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) +{ + EnsureEGLLoaded(); + return EGL_DestroyImageKHR(dpy, image); +} + +EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, + void *native_device, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateDeviceANGLE(device_type, native_device, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device) +{ + EnsureEGLLoaded(); + return EGL_ReleaseDeviceANGLE(device); +} + +__eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname) +{ + EnsureEGLLoaded(); + return EGL_GetProcAddress(procname); +} + +EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateStreamKHR(dpy, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + EnsureEGLLoaded(); + return EGL_DestroyStreamKHR(dpy, stream); +} + +EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint value) +{ + EnsureEGLLoaded(); + return EGL_StreamAttribKHR(dpy, stream, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint *value) +{ + EnsureEGLLoaded(); + return EGL_QueryStreamKHR(dpy, stream, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLuint64KHR *value) +{ + EnsureEGLLoaded(); + return EGL_QueryStreamu64KHR(dpy, stream, attribute, value); +} + +EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + EnsureEGLLoaded(); + return EGL_StreamConsumerGLTextureExternalKHR(dpy, stream); +} + +EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + EnsureEGLLoaded(); + return EGL_StreamConsumerAcquireKHR(dpy, stream); +} + +EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + EnsureEGLLoaded(); + return EGL_StreamConsumerReleaseKHR(dpy, stream); +} + +EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_CreateStreamProducerD3DTextureANGLE(dpy, stream, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + void *texture, + const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_StreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *ust, + EGLuint64KHR *msc, + EGLuint64KHR *sbc) +{ + EnsureEGLLoaded(); + return EGL_GetSyncValuesCHROMIUM(dpy, surface, ust, msc, sbc); +} + +EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy, + EGLSurface surface, + EGLint *rects, + EGLint n_rects) +{ + EnsureEGLLoaded(); + return EGL_SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects); +} + +EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLnsecsANDROID time) +{ + EnsureEGLLoaded(); + return EGL_PresentationTimeANDROID(dpy, surface, time); +} + +EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib) +{ + EnsureEGLLoaded(); + return EGL_ProgramCacheGetAttribANGLE(dpy, attrib); +} + +void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, + EGLint index, + void *key, + EGLint *keysize, + void *binary, + EGLint *binarysize) +{ + EGL_ProgramCacheQueryANGLE(dpy, index, key, keysize, binary, binarysize); +} + +void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, + const void *key, + EGLint keysize, + const void *binary, + EGLint binarysize) +{ + EGL_ProgramCachePopulateANGLE(dpy, key, keysize, binary, binarysize); +} + +EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode) +{ + EnsureEGLLoaded(); + return EGL_ProgramCacheResizeANGLE(dpy, limit, mode); +} + +EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list) +{ + EnsureEGLLoaded(); + return EGL_DebugMessageControlKHR(callback, attrib_list); +} + +EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value) +{ + EnsureEGLLoaded(); + return EGL_QueryDebugKHR(attribute, value); +} + +EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay dpy, + EGLenum objectType, + EGLObjectKHR object, + EGLLabelKHR label) +{ + EnsureEGLLoaded(); + return EGL_LabelObjectKHR(dpy, objectType, object, label); +} + +void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, + EGLSetBlobFuncANDROID set, + EGLGetBlobFuncANDROID get) +{ + EnsureEGLLoaded(); + return EGL_SetBlobCacheFuncsANDROID(dpy, set, get); +} + +EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint name) +{ + EnsureEGLLoaded(); + return EGL_GetCompositorTimingSupportedANDROID(dpy, surface, name); +} + +EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint numTimestamps, + const EGLint *names, + EGLnsecsANDROID *values) +{ + EnsureEGLLoaded(); + return EGL_GetCompositorTimingANDROID(dpy, surface, numTimestamps, names, values); +} + +EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *frameId) +{ + EnsureEGLLoaded(); + return EGL_GetNextFrameIdANDROID(dpy, surface, frameId); +} + +EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp) +{ + EnsureEGLLoaded(); + return EGL_GetFrameTimestampSupportedANDROID(dpy, surface, timestamp); +} + +EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR frameId, + EGLint numTimestamps, + const EGLint *timestamps, + EGLnsecsANDROID *values) +{ + EnsureEGLLoaded(); + return EGL_GetFrameTimestampsANDROID(dpy, surface, frameId, numTimestamps, timestamps, values); +} + +const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index) +{ + EnsureEGLLoaded(); + return EGL_QueryStringiANGLE(dpy, name, index); +} + +EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer) +{ + EnsureEGLLoaded(); + return EGL_GetNativeClientBufferANDROID(buffer); +} + +EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) +{ + EnsureEGLLoaded(); + return EGL_DupNativeFenceFDANDROID(dpy, sync); +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libEGL/libEGL.def b/gfx/angle/checkout/src/libEGL/libEGL.def new file mode 100644 index 0000000000..630c7b69c0 --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/libEGL.def @@ -0,0 +1,88 @@ +LIBRARY libEGL +EXPORTS + eglBindAPI @14 + eglBindTexImage @20 + eglChooseConfig @7 + eglCopyBuffers @33 + eglCreateContext @23 + eglCreatePbufferFromClientBuffer @18 + eglCreatePbufferSurface @10 + eglCreatePixmapSurface @11 + eglCreateWindowSurface @9 + eglDestroyContext @24 + eglDestroySurface @12 + eglGetConfigAttrib @8 + eglGetConfigs @6 + eglGetCurrentContext @26 + eglGetCurrentDisplay @28 + eglGetCurrentSurface @27 + eglGetDisplay @2 + eglGetError @1 + eglGetProcAddress @34 + eglInitialize @3 + eglMakeCurrent @25 + eglQueryAPI @15 + eglQueryContext @29 + eglQueryString @5 + eglQuerySurface @13 + eglReleaseTexImage @21 + eglReleaseThread @17 + eglSurfaceAttrib @19 + eglSwapBuffers @32 + eglSwapInterval @22 + eglTerminate @4 + eglWaitClient @16 + eglWaitGL @30 + eglWaitNative @31 + + ; Extensions + eglGetPlatformDisplayEXT @35 + eglQuerySurfacePointerANGLE @36 + eglPostSubBufferNV @37 + eglQueryDisplayAttribEXT @48 + eglQueryDeviceAttribEXT @49 + eglQueryDeviceStringEXT @50 + eglCreateImageKHR @51 + eglDestroyImageKHR @52 + eglCreateDeviceANGLE @53 + eglReleaseDeviceANGLE @54 + eglCreateStreamKHR @55 + eglDestroyStreamKHR @56 + eglStreamAttribKHR @57 + eglQueryStreamKHR @58 + eglQueryStreamu64KHR @59 + eglStreamConsumerGLTextureExternalKHR @60 + eglStreamConsumerAcquireKHR @61 + eglStreamConsumerReleaseKHR @62 + eglStreamConsumerGLTextureExternalAttribsNV @63 + eglCreateStreamProducerD3DTextureANGLE @64 + eglStreamPostD3DTextureANGLE @65 + eglGetSyncValuesCHROMIUM @66 + eglSwapBuffersWithDamageKHR @67 + eglProgramCacheGetAttribANGLE @68 + eglProgramCachePopulateANGLE @69 + eglProgramCacheQueryANGLE @70 + eglProgramCacheResizeANGLE @71 + eglCreatePlatformWindowSurfaceEXT @72 + eglCreatePlatformPixmapSurfaceEXT @73 + eglPresentationTimeANDROID @74 + eglDebugMessageControlKHR @75 + eglQueryDebugKHR @76 + eglLabelObjectKHR @77 + eglSetBlobCacheFuncsANDROID @78 + eglQueryDisplayAttribANGLE @79 + eglQueryStringiANGLE @80 + eglGetNativeClientBufferANDROID @81 + eglDupNativeFenceFDANDROID @82 + + ; 1.5 entry points + eglCreateSync @38 + eglDestroySync @39 + eglClientWaitSync @40 + eglGetSyncAttrib @41 + eglCreateImage @42 + eglDestroyImage @43 + eglGetPlatformDisplay @44 + eglCreatePlatformWindowSurface @45 + eglCreatePlatformPixmapSurface @46 + eglWaitSync @47 diff --git a/gfx/angle/checkout/src/libEGL/libEGL.rc b/gfx/angle/checkout/src/libEGL/libEGL.rc new file mode 100644 index 0000000000..52d92676a4 --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/libEGL.rc @@ -0,0 +1,103 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include <windows.h> +#include "../common/version.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "#include ""../common/version.h""\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION ANGLE_MAJOR_VERSION,ANGLE_MINOR_VERSION,ANGLE_REVISION,0 + PRODUCTVERSION ANGLE_MAJOR_VERSION,ANGLE_MINOR_VERSION,ANGLE_REVISION,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "ANGLE libEGL Dynamic Link Library" + VALUE "FileVersion", ANGLE_VERSION_STRING + VALUE "InternalName", "libEGL" + VALUE "LegalCopyright", "Copyright (C) 2015 Google Inc." + VALUE "OriginalFilename", "libEGL.dll" + VALUE "PrivateBuild", ANGLE_VERSION_STRING + VALUE "ProductName", "ANGLE libEGL Dynamic Link Library" + VALUE "ProductVersion", ANGLE_VERSION_STRING + VALUE "Comments", "Build Date: " ANGLE_COMMIT_DATE + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/gfx/angle/checkout/src/libEGL/resource.h b/gfx/angle/checkout/src/libEGL/resource.h new file mode 100644 index 0000000000..018d085c02 --- /dev/null +++ b/gfx/angle/checkout/src/libEGL/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by libEGL.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +# ifndef APSTUDIO_READONLY_SYMBOLS +# define _APS_NEXT_RESOURCE_VALUE 101 +# define _APS_NEXT_COMMAND_VALUE 40001 +# define _APS_NEXT_CONTROL_VALUE 1001 +# define _APS_NEXT_SYMED_VALUE 101 +# endif +#endif |