mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 20:00:20 +01:00
tweak glAccum error checking
This commit is contained in:
parent
78b3b667b5
commit
dbd0fa920e
1 changed files with 5 additions and 5 deletions
|
|
@ -58,11 +58,6 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
GLuint xpos, ypos, width, height;
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->Visual.accumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glAccum");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case GL_ADD:
|
||||
case GL_MULT:
|
||||
|
|
@ -76,6 +71,11 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Visual.accumRedBits == 0) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glAccum(no accum buffer)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->DrawBuffer != ctx->ReadBuffer) {
|
||||
/* See GLX_SGI_make_current_read or WGL_ARB_make_current_read */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue