From dd6b35c99ee6e4cb1be60799fd653ced2c73940e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 25 Feb 2019 13:01:58 +0100 Subject: [PATCH] mesa/main: clean up extension-check for GL_RASTERIZER_DISCARD Signed-off-by: Erik Faye-Lund Part-of: --- src/mesa/main/enable.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index b462b2b72bf..790df6b38d5 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1156,9 +1156,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; case GL_RASTERIZER_DISCARD: - if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) + if (!(_mesa_has_EXT_transform_feedback(ctx) || _mesa_is_gles3(ctx))) goto invalid_enum_error; - CHECK_EXTENSION(EXT_transform_feedback); if (ctx->RasterDiscard != state) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard; @@ -1870,9 +1869,8 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Texture.CubeMapSeamless; case GL_RASTERIZER_DISCARD: - if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) + if (!(_mesa_has_EXT_transform_feedback(ctx) || _mesa_is_gles3(ctx))) goto invalid_enum_error; - CHECK_EXTENSION(EXT_transform_feedback); return ctx->RasterDiscard; /* GL_NV_primitive_restart */ -- 2.30.2