mesa/main: clean up extension-check for GL_RASTERIZER_DISCARD
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:
parent
0006dfbaed
commit
dd6b35c99e
|
@ -1156,9 +1156,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_RASTERIZER_DISCARD:
|
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;
|
goto invalid_enum_error;
|
||||||
CHECK_EXTENSION(EXT_transform_feedback);
|
|
||||||
if (ctx->RasterDiscard != state) {
|
if (ctx->RasterDiscard != state) {
|
||||||
FLUSH_VERTICES(ctx, 0);
|
FLUSH_VERTICES(ctx, 0);
|
||||||
ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard;
|
ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard;
|
||||||
|
@ -1870,9 +1869,8 @@ _mesa_IsEnabled( GLenum cap )
|
||||||
return ctx->Texture.CubeMapSeamless;
|
return ctx->Texture.CubeMapSeamless;
|
||||||
|
|
||||||
case GL_RASTERIZER_DISCARD:
|
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;
|
goto invalid_enum_error;
|
||||||
CHECK_EXTENSION(EXT_transform_feedback);
|
|
||||||
return ctx->RasterDiscard;
|
return ctx->RasterDiscard;
|
||||||
|
|
||||||
/* GL_NV_primitive_restart */
|
/* GL_NV_primitive_restart */
|
||||||
|
|
Loading…
Reference in New Issue