summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 214f84d6f70..b713f5f2c44 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -38,6 +38,7 @@
#include "enums.h"
#include "api_arrayelt.h"
#include "texstate.h"
+#include "drivers/common/meta.h"
@@ -764,8 +765,13 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* GL_ARB_multisample */
case GL_MULTISAMPLE_ARB:
- if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
+ /* Technically speaking, this should not be allowed for OpenGL ES 2.0
+ * or 3.0. However, meta really needs it.
+ */
+ if (!_mesa_meta_in_progress(ctx) && !_mesa_is_desktop_gl(ctx)
+ && ctx->API != API_OPENGLES)
goto invalid_enum_error;
+
if (ctx->Multisample.Enabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);