summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-06-29 21:53:06 -0700
committerKenneth Graunke <[email protected]>2016-08-25 19:22:10 -0700
commit1bf9b2a6008552f5fdb8908c24c446fd7261efdd (patch)
tree42a1df93a23368b5b33c4a8b8251c689e5493ce9 /src/mesa/main/enable.c
parentc2b10cabed6468b998a9c4d0ada7953d93311029 (diff)
mesa: Implement GL_KHR_blend_equation_advanced_coherent.
This adds the extension enable (so drivers can advertise it) and the extra boolean state flag, GL_BLEND_ADVANCED_COHERENT_KHR, which can be set to request coherent blending. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[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 1468a459791..d1ab81e50ee 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1017,6 +1017,14 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
ctx->Multisample.SampleMask = state;
break;
+ case GL_BLEND_ADVANCED_COHERENT_KHR:
+ CHECK_EXTENSION(KHR_blend_equation_advanced_coherent, cap);
+ if (ctx->Color.BlendCoherent == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->Color.BlendCoherent = state;
+ break;
+
default:
goto invalid_enum_error;
}
@@ -1619,6 +1627,10 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(ARB_sample_shading);
return ctx->Multisample.SampleShading;
+ case GL_BLEND_ADVANCED_COHERENT_KHR:
+ CHECK_EXTENSION(KHR_blend_equation_advanced_coherent);
+ return ctx->Color.BlendCoherent;
+
default:
goto invalid_enum_error;
}