summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-02-25 11:52:59 +0100
committerErik Faye-Lund <[email protected]>2020-04-01 12:57:57 +0200
commit23570066bfdeebb54953f2c3ac6c7dc73e368f38 (patch)
tree01911e48d19a72c3eea10bc55d1ead2c8e301251 /src/mesa
parent70b6972140e74037109b7f8c57d442c8316d09dc (diff)
mesa/main: clean-up extension-checks for point-sprites
This is the only user of the CHECK_EXTENSION2 macro, so let's remove that while we're at it. Signed-off-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/enable.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index f41f6185796..e4b6b76cbda 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -280,11 +280,6 @@ _mesa_DisableClientStateiEXT( GLenum cap, GLuint index )
goto invalid_enum_error; \
}
-#define CHECK_EXTENSION2(EXT1, EXT2) \
- if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
- goto invalid_enum_error; \
- }
-
/**
* Return pointer to current texture unit for setting/getting coordinate
* state.
@@ -1020,9 +1015,11 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* GL_NV_point_sprite */
case GL_POINT_SPRITE_NV:
- if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
+ if (!(ctx->API == API_OPENGL_COMPAT &&
+ (_mesa_has_ARB_point_sprite(ctx) ||
+ _mesa_has_NV_point_sprite(ctx))) &&
+ !_mesa_has_OES_point_sprite(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION2(NV_point_sprite, ARB_point_sprite);
if (ctx->Point.PointSprite == state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
@@ -1806,9 +1803,11 @@ _mesa_IsEnabled( GLenum cap )
/* GL_NV_point_sprite */
case GL_POINT_SPRITE_NV:
- if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
+ if (!(ctx->API == API_OPENGL_COMPAT &&
+ (_mesa_has_ARB_point_sprite(ctx) ||
+ _mesa_has_NV_point_sprite(ctx))) &&
+ !_mesa_has_OES_point_sprite(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION2(NV_point_sprite, ARB_point_sprite)
return ctx->Point.PointSprite;
case GL_VERTEX_PROGRAM_ARB: