[client] egl: dmabuf can be used without GL_EXT_buffer_storage support

This commit is contained in:
Geoffrey McRae 2021-12-15 06:10:30 +11:00
parent 5f80ce91e8
commit adbe333414
2 changed files with 14 additions and 6 deletions

View File

@ -326,6 +326,13 @@ bool egl_desktopUpdate(EGL_Desktop * desktop, const FrameBuffer * frame, int dma
desktop->useDMA = false;
const char * gl_exts = (const char *)glGetString(GL_EXTENSIONS);
if (!util_hasGLExt(gl_exts, "GL_EXT_buffer_storage"))
{
DEBUG_ERROR("GL_EXT_buffer_storage is needed to use EGL backend");
return false;
}
egl_textureFree(&desktop->texture);
if (!egl_textureInit(&desktop->texture, desktop->display,
EGL_TEXTYPE_FRAMEBUFFER, true))

View File

@ -798,12 +798,6 @@ static bool egl_renderStartup(LG_Renderer * renderer, bool useDMA)
glGetIntegerv(GL_MAJOR_VERSION, &esMaj);
glGetIntegerv(GL_MINOR_VERSION, &esMin);
if (!util_hasGLExt(gl_exts, "GL_EXT_buffer_storage"))
{
DEBUG_ERROR("GL_EXT_buffer_storage is needed to use EGL backend");
return false;
}
if (!util_hasGLExt(gl_exts, "GL_EXT_texture_format_BGRA8888"))
{
DEBUG_ERROR("GL_EXT_texture_format_BGRA8888 is needed to use EGL backend");
@ -836,7 +830,14 @@ static bool egl_renderStartup(LG_Renderer * renderer, bool useDMA)
this->dmaSupport = true;
if (!this->dmaSupport)
{
useDMA = false;
if (!util_hasGLExt(gl_exts, "GL_EXT_buffer_storage"))
{
DEBUG_ERROR("GL_EXT_buffer_storage is needed to use EGL backend");
return false;
}
}
if (debugContext)
{