summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/clear.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-09-20 16:39:30 -0700
committerIan Romanick <ian.d.romanick@intel.com>2012-08-29 15:09:34 -0700
commite58c19a204a028b0c3db7416250387ba98ed0a2d (patch)
tree3766729dd17efdebd46445994230c03064ca4d4f /src/mesa/main/clear.c
parentf0c99d0a6a897189dd4b66f508385eb2ecf3f76f (diff)
downloadexternal_mesa3d-e58c19a204a028b0c3db7416250387ba98ed0a2d.zip
external_mesa3d-e58c19a204a028b0c3db7416250387ba98ed0a2d.tar.gz
external_mesa3d-e58c19a204a028b0c3db7416250387ba98ed0a2d.tar.bz2
mesa/es: Validate glClear mask in Mesa code rather than the ES wrapper
Diffstat (limited to 'src/mesa/main/clear.c')
-rw-r--r--src/mesa/main/clear.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index cfb0600..f07d533 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -167,6 +167,15 @@ _mesa_Clear( GLbitfield mask )
return;
}
+ /* Accumulation buffers were removed in core contexts, and they never
+ * existed in OpenGL ES.
+ */
+ if ((mask & GL_ACCUM_BUFFER_BIT) != 0
+ && (ctx->API == API_OPENGL_CORE || _mesa_is_gles(ctx))) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glClear(GL_ACCUM_BUFFER_BIT)");
+ return;
+ }
+
if (ctx->NewState) {
_mesa_update_state( ctx ); /* update _Xmin, etc */
}