mesa/main: make the CONSERVATIVE_RASTERIZATION_NV checks consistent
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 25 Feb 2019 12:28:39 +0000 (13:28 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 29 May 2019 08:54:09 +0000 (10:54 +0200)
This just makes the logic of the checks for this enum the same for
gl{Enable,Disable} and for glIsEnabled. They are already functionally
the same, so this is just a minor code-cleanup.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/enable.c

index ce64e037906fc35e4d6f0e95698e9325561d0cdf..9a59b775da4afc7ee66d25a8804214e0a596f87a 100644 (file)
@@ -1774,7 +1774,8 @@ _mesa_IsEnabled( GLenum cap )
          return ctx->IntelConservativeRasterization;
 
       case GL_CONSERVATIVE_RASTERIZATION_NV:
-         CHECK_EXTENSION(NV_conservative_raster);
+         if (!_mesa_has_NV_conservative_raster(ctx))
+            goto invalid_enum_error;
          return ctx->ConservativeRasterization;
 
       case GL_TILE_RASTER_ORDER_FIXED_MESA: