From: Erik Faye-Lund Date: Mon, 25 Feb 2019 12:14:50 +0000 (+0100) Subject: mesa/main: correct extension-checks for MESA_tile_raster_order X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a33ff7876fa5e9c7b564791734bf47534225df13;p=mesa.git 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 Reviewed-by: Ian Romanick --- 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: