mesa/main: clean up extension-check for GL_VERTEX_PROGRAM_TWO_SIDE
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 25 Feb 2019 11:44:55 +0000 (12:44 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 1 Apr 2020 10:57:57 +0000 (12:57 +0200)
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>

src/mesa/main/enable.c

index 2fddd1cb4fa9b339c0c2165ea82fe51b3b3aa245..ad743ba7b981251f474476451272000483f3c524 100644 (file)
@@ -1048,9 +1048,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
          ctx->VertexProgram.PointSizeEnabled = state;
          break;
       case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
-         if (ctx->API != API_OPENGL_COMPAT)
+         if (!_mesa_has_ARB_vertex_program(ctx))
             goto invalid_enum_error;
-         CHECK_EXTENSION(ARB_vertex_program);
          if (ctx->VertexProgram.TwoSideEnabled == state)
             return;
          FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -1822,9 +1821,8 @@ _mesa_IsEnabled( GLenum cap )
          CHECK_EXTENSION(ARB_vertex_program);
          return ctx->VertexProgram.PointSizeEnabled;
       case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
-         if (ctx->API != API_OPENGL_COMPAT)
+         if (!_mesa_has_ARB_vertex_program(ctx))
             goto invalid_enum_error;
-         CHECK_EXTENSION(ARB_vertex_program);
          return ctx->VertexProgram.TwoSideEnabled;
 
       /* GL_NV_texture_rectangle */