diff --git a/renderdoc/driver/gl/egl_dispatch_table.h b/renderdoc/driver/gl/egl_dispatch_table.h index 4cbc7c229..6b3e59a94 100644 --- a/renderdoc/driver/gl/egl_dispatch_table.h +++ b/renderdoc/driver/gl/egl_dispatch_table.h @@ -31,6 +31,8 @@ typedef EGLenum(EGLAPIENTRY *PFN_eglQueryAPI)(); typedef EGLDisplay(EGLAPIENTRY *PFN_eglGetDisplay)(EGLNativeDisplayType display_id); typedef EGLDisplay(EGLAPIENTRY *PFN_eglGetPlatformDisplay)(EGLenum platform, void *native_display, const EGLAttrib *attrib_list); +typedef EGLDisplay(EGLAPIENTRY *PFN_eglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, + const EGLAttrib *attrib_list); typedef EGLContext(EGLAPIENTRY *PFN_eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); @@ -49,6 +51,10 @@ typedef EGLSurface(EGLAPIENTRY *PFN_eglCreateWindowSurface)(EGLDisplay dpy, EGLC typedef EGLSurface(EGLAPIENTRY *PFN_eglCreatePlatformWindowSurface)(EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); +typedef EGLSurface(EGLAPIENTRY *PFN_eglCreatePlatformWindowSurfaceEXT)(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLAttrib *attrib_list); typedef EGLBoolean(EGLAPIENTRY *PFN_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); @@ -68,20 +74,22 @@ typedef PFNEGLPOSTSUBBUFFERNVPROC PFN_eglPostSubBufferNV; typedef PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC PFN_eglSwapBuffersWithDamageEXT; typedef PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC PFN_eglSwapBuffersWithDamageKHR; -#define EGL_HOOKED_SYMBOLS(FUNC) \ - FUNC(BindAPI, false, true); \ - FUNC(GetProcAddress, false, true); \ - FUNC(GetDisplay, false, true); \ - FUNC(GetPlatformDisplay, false, false); \ - FUNC(CreateContext, false, true); \ - FUNC(DestroyContext, false, true); \ - FUNC(CreateWindowSurface, false, true); \ - FUNC(CreatePlatformWindowSurface, false, false); \ - FUNC(MakeCurrent, false, true); \ - FUNC(SwapBuffers, false, true); \ - FUNC(QueryString, false, true); \ - FUNC(PostSubBufferNV, true, false); \ - FUNC(SwapBuffersWithDamageEXT, true, false); \ +#define EGL_HOOKED_SYMBOLS(FUNC) \ + FUNC(BindAPI, false, true); \ + FUNC(GetProcAddress, false, true); \ + FUNC(GetDisplay, false, true); \ + FUNC(GetPlatformDisplay, false, false); \ + FUNC(CreateContext, false, true); \ + FUNC(DestroyContext, false, true); \ + FUNC(CreateWindowSurface, false, true); \ + FUNC(CreatePlatformWindowSurface, false, false); \ + FUNC(MakeCurrent, false, true); \ + FUNC(SwapBuffers, false, true); \ + FUNC(QueryString, false, true); \ + FUNC(PostSubBufferNV, true, false); \ + FUNC(GetPlatformDisplayEXT, true, false); \ + FUNC(CreatePlatformWindowSurfaceEXT, true, false); \ + FUNC(SwapBuffersWithDamageEXT, true, false); \ FUNC(SwapBuffersWithDamageKHR, true, false); #define EGL_NONHOOKED_SYMBOLS(FUNC) \ diff --git a/renderdoc/driver/gl/egl_hooks.cpp b/renderdoc/driver/gl/egl_hooks.cpp index 800cbbd64..4fd845842 100644 --- a/renderdoc/driver/gl/egl_hooks.cpp +++ b/renderdoc/driver/gl/egl_hooks.cpp @@ -226,6 +226,12 @@ HOOK_EXPORT EGLDisplay EGLAPIENTRY eglGetPlatformDisplay_renderdoc_hooked(EGLenu return EGL.GetPlatformDisplay(platform, native_display, attrib_list); } +HOOK_EXPORT EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT_renderdoc_hooked( + EGLenum platform, void *native_display, const EGLAttrib *attrib_list) +{ + return eglGetPlatformDisplay_renderdoc_hooked(platform, native_display, attrib_list); +} + HOOK_EXPORT EGLBoolean EGLAPIENTRY eglBindAPI_renderdoc_hooked(EGLenum api) { if(RenderDoc::Inst().IsReplayApp()) @@ -461,6 +467,12 @@ HOOK_EXPORT EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface_renderdoc_hook return ret; } +HOOK_EXPORT EGLDisplay EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT_renderdoc_hooked( + EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list) +{ + return eglCreatePlatformWindowSurface_renderdoc_hooked(dpy, config, native_window, attrib_list); +} + HOOK_EXPORT EGLBoolean EGLAPIENTRY eglMakeCurrent_renderdoc_hooked(EGLDisplay display, EGLSurface draw, EGLSurface read, EGLContext ctx)