aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-02-25 13:14:50 +0100
committerErik Faye-Lund <[email protected]>2019-05-29 10:54:09 +0200
commita33ff7876fa5e9c7b564791734bf47534225df13 (patch)
tree3fba870bedaa808de28075f5edd47dd0657a3b41 /src/mesa/main/enable.c
parentbf91d6ae4ae0c50aa77246a8d065d4e490615ef1 (diff)
mesa/main: correct extension-checks for MESA_tile_raster_order
This extension isn't enabled for GLES 1.x, so we shouldn't allow the state there. Let's use the extension-helpers instead of CHECK_EXTENSION for this. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 9a59b775da4..1b0f7417aff 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1064,7 +1064,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_TILE_RASTER_ORDER_FIXED_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
if (ctx->TileRasterOrderFixed != state) {
FLUSH_VERTICES(ctx, 0);
ctx->NewDriverState |= ctx->DriverFlags.NewTileRasterOrder;
@@ -1073,7 +1074,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_TILE_RASTER_ORDER_INCREASING_X_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
if (ctx->TileRasterOrderIncreasingX != state) {
FLUSH_VERTICES(ctx, 0);
ctx->NewDriverState |= ctx->DriverFlags.NewTileRasterOrder;
@@ -1082,7 +1084,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_TILE_RASTER_ORDER_INCREASING_Y_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
if (ctx->TileRasterOrderIncreasingY != state) {
FLUSH_VERTICES(ctx, 0);
ctx->NewDriverState |= ctx->DriverFlags.NewTileRasterOrder;
@@ -1779,15 +1782,18 @@ _mesa_IsEnabled( GLenum cap )
return ctx->ConservativeRasterization;
case GL_TILE_RASTER_ORDER_FIXED_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
return ctx->TileRasterOrderFixed;
case GL_TILE_RASTER_ORDER_INCREASING_X_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
return ctx->TileRasterOrderIncreasingX;
case GL_TILE_RASTER_ORDER_INCREASING_Y_MESA:
- CHECK_EXTENSION(MESA_tile_raster_order);
+ if (!_mesa_has_MESA_tile_raster_order(ctx))
+ goto invalid_enum_error;
return ctx->TileRasterOrderIncreasingY;
default: