Merge pull request #11181 from dankcushions/gles31_32

GLES 3.1 and 3.2 build parameters, and corresponding context checks.
This commit is contained in:
Autechre 2020-11-04 04:58:24 +01:00 committed by GitHub
commit f37d38bcd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -85,6 +85,8 @@ HAVE_VIVANTE_FBDEV=no # Vivante fbdev context support
HAVE_OPENDINGUX_FBDEV=no # Opendingux fbdev context support
HAVE_OPENGLES=no # Use GLESv2 instead of desktop GL
HAVE_OPENGLES3=no # OpenGLES3 support
HAVE_OPENGLES3_1=no # OpenGLES3.1 support
HAVE_OPENGLES3_2=no # OpenGLES3.2 support
HAVE_X11=auto # everything X11.
HAVE_XRANDR=auto # Xrandr support.
HAVE_OMAP=no # OMAP video support

View File

@ -18842,6 +18842,22 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
#if defined(HAVE_OPENGLES3)
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
#ifndef HAVE_OPENGLES3_2
if (major == 3 && minor == 2)
{
RARCH_ERR("Requesting OpenGLES%u.%u context, but RetroArch is compiled against a lesser version. Cannot use HW context.\n",
major, minor);
return false;
}
#endif
#if !defined(HAVE_OPENGLES3_2) && !defined(HAVE_OPENGLES3_1)
if (major == 3 && minor == 1)
{
RARCH_ERR("Requesting OpenGLES%u.%u context, but RetroArch is compiled against a lesser version. Cannot use HW context.\n",
major, minor);
return false;
}
#endif
RARCH_LOG("Requesting OpenGLES%u.%u context.\n",
major, minor);
break;