aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/clear.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-31 15:18:29 +0200
committermarha <marha@users.sourceforge.net>2012-08-31 15:18:29 +0200
commit53192e17e55aa9ed3e3721bf4fdcb2b01a595202 (patch)
tree01d81bc7cfb5dc92584f4b7615d2ac1b09fe5411 /mesalib/src/mesa/main/clear.c
parent05d67ae9117e5157fd1a5175dde6d7e48caf4653 (diff)
downloadvcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.gz
vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.bz2
vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.zip
randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver
git update 31 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/main/clear.c')
-rw-r--r--mesalib/src/mesa/main/clear.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/clear.c b/mesalib/src/mesa/main/clear.c
index 7cc204bc5..f07d5333b 100644
--- a/mesalib/src/mesa/main/clear.c
+++ b/mesalib/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 */
}
@@ -510,7 +519,7 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
/* save color */
clearSave = ctx->Color.ClearColor;
/* set color */
- COPY_4V_CAST(ctx->Color.ClearColor.f, value, GLclampf);
+ COPY_4V(ctx->Color.ClearColor.f, value);
/* clear buffer(s) */
ctx->Driver.Clear(ctx, mask);
/* restore color */