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 <erik.faye-lund@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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);
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;