diff options
author | Paul Berry <[email protected]> | 2012-08-08 11:56:33 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:36 -0700 |
commit | d638da23d2ec2e9c52655b1ea138249e7f8bcccb (patch) | |
tree | 7b211b191fe6615fa1cf85e6ba022067ef23e1ff /src/mesa/main/enable.c | |
parent | 8e7b6a69e9cb00345e0c08966036b305cbda46c9 (diff) |
meta: Don't stray outside the confines of the API specified in the context
Signed-off-by: Paul Berry <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 8 |
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); |