mesa/main: clean up extension-check for GL_TEXTURE_EXTERNAL

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>
This commit is contained in:
Erik Faye-Lund 2019-02-25 13:20:35 +01:00
parent dd6b35c99e
commit 9ddd9d454c

View file

@ -1229,9 +1229,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* GL_OES_EGL_image_external */
case GL_TEXTURE_EXTERNAL_OES:
if (!_mesa_is_gles(ctx))
if (!_mesa_has_OES_EGL_image_external(ctx))
goto invalid_enum_error;
CHECK_EXTENSION(OES_EGL_image_external);
if (!enable_texture(ctx, state, TEXTURE_EXTERNAL_BIT)) {
return;
}
@ -1900,9 +1899,8 @@ _mesa_IsEnabled( GLenum cap )
/* GL_OES_EGL_image_external */
case GL_TEXTURE_EXTERNAL_OES:
if (!_mesa_is_gles(ctx))
if (!_mesa_has_OES_EGL_image_external(ctx))
goto invalid_enum_error;
CHECK_EXTENSION(OES_EGL_image_external);
return is_texture_enabled(ctx, TEXTURE_EXTERNAL_BIT);
/* ARB_texture_multisample */