diff options
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_context.h | 2 | ||||
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_quad.c | 2 | ||||
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_blend.c | 6 | ||||
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_bufloop.c | 4 | ||||
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_colormask.c | 3 | ||||
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_output.c | 3 | 
6 files changed, 11 insertions, 9 deletions
| diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h index d4763a98c6..b97cdc52c6 100644 --- a/src/mesa/pipe/softpipe/sp_context.h +++ b/src/mesa/pipe/softpipe/sp_context.h @@ -154,7 +154,7 @@ struct softpipe_context {     struct draw_stage *setup;     struct draw_stage *vbuf; -   struct pipe_surface *cbuf;      /**< current color buffer (one of cbufs) */ +   uint current_cbuf;      /**< current color buffer being written to */     struct softpipe_tile_cache *cbuf_cache[PIPE_MAX_COLOR_BUFS];     struct softpipe_tile_cache *zbuf_cache; diff --git a/src/mesa/pipe/softpipe/sp_quad.c b/src/mesa/pipe/softpipe/sp_quad.c index e0327c4cf9..6330465a8b 100644 --- a/src/mesa/pipe/softpipe/sp_quad.c +++ b/src/mesa/pipe/softpipe/sp_quad.c @@ -77,7 +77,7 @@ sp_build_quad_pipeline(struct softpipe_context *sp)     if (sp->framebuffer.num_cbufs == 1) {        /* the usual case: write to exactly one colorbuf */ -      sp->cbuf = sp->framebuffer.cbufs[0]; +      sp->current_cbuf = 0;     }     else {        /* insert bufloop stage */ diff --git a/src/mesa/pipe/softpipe/sp_quad_blend.c b/src/mesa/pipe/softpipe/sp_quad_blend.c index 696e252af1..76a0873fc5 100644 --- a/src/mesa/pipe/softpipe/sp_quad_blend.c +++ b/src/mesa/pipe/softpipe/sp_quad_blend.c @@ -107,7 +107,8 @@ logicop_quad(struct quad_stage *qs, struct quad_header *quad)     uint *dst4 = (uint *) dst;     uint *res4 = (uint *) res;     struct softpipe_cached_tile * -      tile = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0], +      tile = sp_get_cached_tile(softpipe, +                                softpipe->cbuf_cache[softpipe->current_cbuf],                                  quad->x0, quad->y0);     uint i, j; @@ -224,7 +225,8 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)     static const float one[4] = { 1, 1, 1, 1 };     float source[4][QUAD_SIZE], dest[4][QUAD_SIZE];     struct softpipe_cached_tile *tile -      = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0], +      = sp_get_cached_tile(softpipe, +                           softpipe->cbuf_cache[softpipe->current_cbuf],                             quad->x0, quad->y0);     uint i, j; diff --git a/src/mesa/pipe/softpipe/sp_quad_bufloop.c b/src/mesa/pipe/softpipe/sp_quad_bufloop.c index aac70e2b04..e704b4043c 100644 --- a/src/mesa/pipe/softpipe/sp_quad_bufloop.c +++ b/src/mesa/pipe/softpipe/sp_quad_bufloop.c @@ -30,7 +30,7 @@ cbuf_loop_quad(struct quad_stage *qs, struct quad_header *quad)     for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {        /* set current cbuffer */ -      softpipe->cbuf = softpipe->framebuffer.cbufs[i]; +      softpipe->current_cbuf = i;        /* pass blended quad to next stage */        qs->next->run(qs->next, quad); @@ -38,8 +38,6 @@ cbuf_loop_quad(struct quad_stage *qs, struct quad_header *quad)        /* restore quad's colors for next buffer */        memcpy(quad->outputs.color, tmp, sizeof(tmp));     } - -   softpipe->cbuf = NULL; /* prevent accidental use */  } diff --git a/src/mesa/pipe/softpipe/sp_quad_colormask.c b/src/mesa/pipe/softpipe/sp_quad_colormask.c index c585aa3edd..f5e0a32d1b 100644 --- a/src/mesa/pipe/softpipe/sp_quad_colormask.c +++ b/src/mesa/pipe/softpipe/sp_quad_colormask.c @@ -50,7 +50,8 @@ colormask_quad(struct quad_stage *qs, struct quad_header *quad)     float dest[4][QUAD_SIZE];     struct softpipe_cached_tile *tile        = sp_get_cached_tile(softpipe, -                           softpipe->cbuf_cache[0], quad->x0, quad->y0); +                           softpipe->cbuf_cache[softpipe->current_cbuf], +                           quad->x0, quad->y0);     uint i, j;     /* get/swizzle dest colors */ diff --git a/src/mesa/pipe/softpipe/sp_quad_output.c b/src/mesa/pipe/softpipe/sp_quad_output.c index cebfec18f7..f04a550e3d 100644 --- a/src/mesa/pipe/softpipe/sp_quad_output.c +++ b/src/mesa/pipe/softpipe/sp_quad_output.c @@ -43,7 +43,8 @@ output_quad(struct quad_stage *qs, struct quad_header *quad)  {     struct softpipe_context *softpipe = qs->softpipe;     struct softpipe_cached_tile *tile -      = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0], +      = sp_get_cached_tile(softpipe, +                           softpipe->cbuf_cache[softpipe->current_cbuf],                             quad->x0, quad->y0);     /* in-tile pos: */     const int itx = quad->x0 % TILE_SIZE; | 
