diff options
author | Erik Faye-Lund <[email protected]> | 2019-02-25 12:06:23 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-05-23 11:35:55 +0200 |
commit | 0dff3eecdaa383f8d8bef7607b6007fd82e003d2 (patch) | |
tree | c4e0f7ce70dfc13ecdac6c7336d48815d2b22b0f /src | |
parent | 147751a856432157726d0462406f89b0f87aa8d9 (diff) |
mesa/main: make the FRAGMENT_PROGRAM checks consistent
IsEnabled(FRAGMENT_PROGRAM) isn't supposed to be allowed, but our
check allowed this anyway. Let's make these checks consistent, and
while we're at it, modernize them a bit.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/enable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 09f33afbc57..f92498b3dc6 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -974,9 +974,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; case GL_FRAGMENT_PROGRAM_ARB: - if (ctx->API != API_OPENGL_COMPAT) + if (!_mesa_has_ARB_fragment_program(ctx)) goto invalid_enum_error; - CHECK_EXTENSION(ARB_fragment_program); if (ctx->FragmentProgram.Enabled == state) return; FLUSH_VERTICES(ctx, _NEW_PROGRAM); @@ -1671,7 +1670,7 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Stencil.TestTwoSide; case GL_FRAGMENT_PROGRAM_ARB: - if (ctx->API != API_OPENGL_COMPAT) + if (!_mesa_has_ARB_fragment_program(ctx)) goto invalid_enum_error; return ctx->FragmentProgram.Enabled; |