mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 03:00:24 +01:00
egl: only accept APIs that are compiled in
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20839>
This commit is contained in:
parent
68418db212
commit
b3485664f3
1 changed files with 8 additions and 4 deletions
|
|
@ -64,12 +64,16 @@ struct _egl_thread_info {
|
|||
static inline EGLBoolean
|
||||
_eglIsApiValid(EGLenum api)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
#if HAVE_OPENGL && !defined(ANDROID)
|
||||
/* OpenGL is not a valid/supported API on Android */
|
||||
return api == EGL_OPENGL_ES_API;
|
||||
#else
|
||||
return (api == EGL_OPENGL_ES_API || api == EGL_OPENGL_API);
|
||||
if (api == EGL_OPENGL_API)
|
||||
return true;
|
||||
#endif
|
||||
#if HAVE_OPENGL_ES_1 || HAVE_OPENGL_ES_2
|
||||
if (api == EGL_OPENGL_ES_API)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
extern _EGLThreadInfo *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue