diff options
author | Brian Paul <[email protected]> | 2006-10-18 18:35:09 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-18 18:35:09 +0000 |
commit | ccb64bbb2a32761efa076ebafa7ccdaf2d412b0e (patch) | |
tree | 8106d379716805f2eca690bb3e4d5e8a04c00a23 /src/mesa/swrast/s_accum.c | |
parent | 4e4c0bbef7a795d73685794e3329ea81654924b5 (diff) |
Don't pass x/y/width/height to ctx->Driver.Accum().
Compute the region after we've locked (and possibly updated the buffer's size).
Same thing is needed for ctx->Driver.Clear().
Diffstat (limited to 'src/mesa/swrast/s_accum.c')
-rw-r--r-- | src/mesa/swrast/s_accum.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 0b8ad007623..69e9404c55c 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -541,12 +541,10 @@ accum_return(GLcontext *ctx, GLfloat value, * Software fallback for glAccum. */ void -_swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, - GLint xpos, GLint ypos, - GLint width, GLint height ) - +_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value) { SWcontext *swrast = SWRAST_CONTEXT(ctx); + GLint xpos, ypos, width, height; if (SWRAST_CONTEXT(ctx)->NewState) _swrast_validate_derived( ctx ); @@ -558,6 +556,14 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, RENDER_START(swrast, ctx); + /* Compute region after calling RENDER_START so that we know the + * drawbuffer's size/bounds are up to date. + */ + xpos = ctx->DrawBuffer->_Xmin; + ypos = ctx->DrawBuffer->_Ymin; + width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; + height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; + switch (op) { case GL_ADD: if (value != 0.0F) { |