aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/multisample.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/multisample.c')
-rw-r--r--mesalib/src/mesa/main/multisample.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/multisample.c b/mesalib/src/mesa/main/multisample.c
index bd97c5096..599cdee74 100644
--- a/mesalib/src/mesa/main/multisample.c
+++ b/mesalib/src/mesa/main/multisample.c
@@ -119,6 +119,24 @@ _mesa_SampleMaski(GLuint index, GLbitfield mask)
ctx->Multisample.SampleMaskValue = mask;
}
+/**
+ * Called via glMinSampleShadingARB
+ */
+void GLAPIENTRY
+_mesa_MinSampleShading(GLclampf value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.ARB_sample_shading || !_mesa_is_desktop_gl(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glMinSampleShading");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, 0);
+
+ ctx->Multisample.MinSampleShadingValue = CLAMP(value, 0.0, 1.0);
+ ctx->NewState |= _NEW_MULTISAMPLE;
+}
/**
* Helper for checking a requested sample count against the limit