mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-15 11:06:54 +00:00
Use EGL directly for Wayland GL support
For Wayland support on GL we currently fall back to the GLES code path just to get EGL. This commit uses the EGL platform directly for Wayland, also removing the dependency on GLES.
This commit is contained in:
committed by
Baldur Karlsson
parent
616a355a63
commit
e8b696cbbf
+2
-2
@@ -189,8 +189,8 @@ if(ENABLE_WAYLAND)
|
||||
pkg_check_modules(PKG_WAYLAND QUIET wayland-client)
|
||||
|
||||
if(PKG_WAYLAND_FOUND)
|
||||
if(NOT ENABLE_GLES)
|
||||
message(WARNING "On Wayland GLES support is required for EGL, disabling GL support")
|
||||
if(NOT ENABLE_EGL)
|
||||
message(WARNING "On Wayland EGL is required for GL, disabling GL support")
|
||||
set(ENABLE_GL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
else()
|
||||
|
||||
@@ -3594,28 +3594,31 @@ static DriverRegistration GLESDriverRegistration(RDCDriver::OpenGLES, &GLES_Crea
|
||||
|
||||
ReplayStatus GL_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, IReplayDriver **driver)
|
||||
{
|
||||
GLPlatform *gl_platform = &GetGLPlatform();
|
||||
|
||||
if(RenderDoc::Inst().GetGlobalEnvironment().waylandDisplay)
|
||||
{
|
||||
#if defined(RENDERDOC_SUPPORT_GLES)
|
||||
#if defined(RENDERDOC_SUPPORT_EGL)
|
||||
RDCLOG("Forcing EGL device creation for wayland");
|
||||
return GLES_CreateReplayDevice(rdc, opts, driver);
|
||||
gl_platform = &GetEGLPlatform();
|
||||
#else
|
||||
RDCERR("GLES support must be enabled at build time when using Wayland");
|
||||
RDCERR("EGL support must be enabled at build time when using Wayland");
|
||||
return ReplayStatus::InternalError;
|
||||
#endif
|
||||
}
|
||||
|
||||
RDCDEBUG("Creating an OpenGL replay device");
|
||||
|
||||
bool load_ok = GetGLPlatform().PopulateForReplay();
|
||||
bool load_ok = gl_platform->PopulateForReplay();
|
||||
|
||||
if(!load_ok)
|
||||
{
|
||||
RDCERR("Couldn't find required platform GL function addresses");
|
||||
RDCERR("Couldn't find required platform %s function addresses",
|
||||
gl_platform == &GetGLPlatform() ? "GL" : "EGL");
|
||||
return ReplayStatus::APIInitFailed;
|
||||
}
|
||||
|
||||
return CreateReplayDevice(rdc ? rdc->GetDriver() : RDCDriver::OpenGL, rdc, opts, GetGLPlatform(),
|
||||
return CreateReplayDevice(rdc ? rdc->GetDriver() : RDCDriver::OpenGL, rdc, opts, *gl_platform,
|
||||
driver);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user