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-09-04 14:23:28 +0200
commitd7fc06ac528d54e0e1416cb8aa89b6fd072400a5 (patch)
tree74cccede044412bba5723a132f1385aa9259f04b /mesalib/src/mesa/main/clear.c
parent9dec848b23cf905ded387820f2893425cc00d545 (diff)
downloadvcxsrv-d7fc06ac528d54e0e1416cb8aa89b6fd072400a5.tar.gz
vcxsrv-d7fc06ac528d54e0e1416cb8aa89b6fd072400a5.tar.bz2
vcxsrv-d7fc06ac528d54e0e1416cb8aa89b6fd072400a5.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 */