X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_accum.c;h=88d107a17dad3e8bb1ff70a41a9e4b62721b9810;hb=9b66305b8d41a470faac8f8de7dfd99330801385;hp=2dd9ca6348b32cdec1d44b34f31bc3d300fc24d0;hpb=bee9964b29b2428ee75e2d1efc0e1d2c2518a417;p=mesa.git diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 2dd9ca6348b..88d107a17da 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -78,7 +78,7 @@ * representing the range[-1, 1]. */ static void -rescale_accum( GLcontext *ctx ) +rescale_accum( struct gl_context *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_renderbuffer *rb @@ -125,16 +125,12 @@ rescale_accum( GLcontext *ctx ) * Clear the accumulation Buffer. */ void -_swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) +_swrast_clear_accum_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); GLuint x, y, width, height; - if (ctx->Visual.accumRedBits == 0) { - /* No accumulation buffer! Not an error. */ - return; - } - + /* No accumulation buffer! Not an error. */ if (!rb || !rb->Data) return; @@ -183,7 +179,7 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) static void -accum_add(GLcontext *ctx, GLfloat value, +accum_add(struct gl_context *ctx, GLfloat value, GLint xpos, GLint ypos, GLint width, GLint height ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -226,7 +222,7 @@ accum_add(GLcontext *ctx, GLfloat value, static void -accum_mult(GLcontext *ctx, GLfloat mult, +accum_mult(struct gl_context *ctx, GLfloat mult, GLint xpos, GLint ypos, GLint width, GLint height ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -269,7 +265,7 @@ accum_mult(GLcontext *ctx, GLfloat mult, static void -accum_accum(GLcontext *ctx, GLfloat value, +accum_accum(struct gl_context *ctx, GLfloat value, GLint xpos, GLint ypos, GLint width, GLint height ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -345,7 +341,7 @@ accum_accum(GLcontext *ctx, GLfloat value, static void -accum_load(GLcontext *ctx, GLfloat value, +accum_load(struct gl_context *ctx, GLfloat value, GLint xpos, GLint ypos, GLint width, GLint height ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -427,7 +423,7 @@ accum_load(GLcontext *ctx, GLfloat value, static void -accum_return(GLcontext *ctx, GLfloat value, +accum_return(struct gl_context *ctx, GLfloat value, GLint xpos, GLint ypos, GLint width, GLint height ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -544,7 +540,7 @@ accum_return(GLcontext *ctx, GLfloat value, * Software fallback for glAccum. */ void -_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value) +_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value) { SWcontext *swrast = SWRAST_CONTEXT(ctx); GLint xpos, ypos, width, height;