Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
[mesa.git] / src / mesa / main / accum.c
index a659e8dbdd8fcab68ea3bac48faeefeed630499e..2345695f3c6fb43bd94be3e50d527c89ba13a345 100644 (file)
@@ -70,13 +70,15 @@ _mesa_Accum( GLenum op, GLfloat value )
       return;
    }
 
-   if (ctx->Visual.accumRedBits == 0) {
+   if (ctx->DrawBuffer->Visual.haveAccumBuffer == 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 */
+      /* See GLX_SGI_make_current_read or WGL_ARB_make_current_read,
+       * or GL_EXT_framebuffer_blit.
+       */
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glAccum(different read/draw buffers)");
       return;
@@ -92,11 +94,7 @@ _mesa_Accum( GLenum op, GLfloat value )
    }
 
    if (ctx->RenderMode == GL_RENDER) {
-      GLint x = ctx->DrawBuffer->_Xmin;
-      GLint y = ctx->DrawBuffer->_Ymin;
-      GLint width =  ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
-      GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
-      ctx->Driver.Accum(ctx, op, value, x, y, width, height);
+      ctx->Driver.Accum(ctx, op, value);
    }
 }