From 53192e17e55aa9ed3e3721bf4fdcb2b01a595202 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 31 Aug 2012 15:18:29 +0200 Subject: randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver git update 31 Aug 2012 --- mesalib/src/mesa/main/clear.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mesalib/src/mesa/main/clear.c') 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 */ -- cgit v1.2.3