summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2018-04-27 11:35:00 -0600
committerBrian Paul <[email protected]>2018-04-30 21:13:53 -0600
commit4580617509d1ba48a7806227533a07e1c495ca81 (patch)
tree99d00ab799e56500ba754fa02bb50464731945ce /src/mesa/main/enable.c
parent31ab0427a767c6c8377c00203e87bf0a03ac3247 (diff)
mesa: add support for nvidia conservative rasterization extensions
Although the specs are written against compatibility GL 4.3 and allows core profile and GLES2+, it is exposed for GL 1.0+ and GLES1 and GLES2+. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 7625a4c9577..84f036071a2 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -482,6 +482,16 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
ctx->DriverFlags.NewIntelConservativeRasterization;
ctx->IntelConservativeRasterization = state;
break;
+ case GL_CONSERVATIVE_RASTERIZATION_NV:
+ if (!_mesa_has_NV_conservative_raster(ctx))
+ goto invalid_enum_error;
+ if (ctx->ConservativeRasterization == state)
+ return;
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |=
+ ctx->DriverFlags.NewNvConservativeRasterization;
+ ctx->ConservativeRasterization = state;
+ break;
case GL_COLOR_LOGIC_OP:
if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
goto invalid_enum_error;
@@ -1750,6 +1760,10 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(INTEL_conservative_rasterization);
return ctx->IntelConservativeRasterization;
+ case GL_CONSERVATIVE_RASTERIZATION_NV:
+ CHECK_EXTENSION(NV_conservative_raster);
+ return ctx->ConservativeRasterization;
+
case GL_TILE_RASTER_ORDER_FIXED_MESA:
CHECK_EXTENSION(MESA_tile_raster_order);
return ctx->TileRasterOrderFixed;