summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2016-11-30 14:47:41 +0000
committerLionel Landwerlin <[email protected]>2016-12-07 11:02:16 +0000
commit039d836d6ea5621ede88ff3504be841a6dd865c6 (patch)
treeb3a34fad43bb1cb7b85b5641ce02fbcc6673a772 /src/mesa/main/enable.c
parent0ff74a8990d9fe37365beb35ed8abacfbf3ed567 (diff)
mesa: add support for GL_INTEL_conservative_rasterization
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index d1ab81e50ee..c9f10abb383 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -439,6 +439,14 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.IndexLogicOpEnabled = state;
break;
+ case GL_CONSERVATIVE_RASTERIZATION_INTEL:
+ if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
+ goto invalid_enum_error;
+ if (ctx->IntelConservativeRasterization == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ ctx->IntelConservativeRasterization = state;
+ break;
case GL_COLOR_LOGIC_OP:
if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
goto invalid_enum_error;
@@ -1631,6 +1639,10 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(KHR_blend_equation_advanced_coherent);
return ctx->Color.BlendCoherent;
+ case GL_CONSERVATIVE_RASTERIZATION_INTEL:
+ CHECK_EXTENSION(INTEL_conservative_rasterization);
+ return ctx->IntelConservativeRasterization;
+
default:
goto invalid_enum_error;
}