diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-02-15 11:15:47 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-02-15 11:15:47 +0000 |
commit | 6ac2c1cc0cd1253ba2014d459010032127f185ec (patch) | |
tree | 6348de9de19e7394800a983c8c614566d22b870b /src/mesa/pipe/softpipe/sp_quad_bufloop.c | |
parent | c04a7f8929d674971a472ffa4d3a31200c22aa5a (diff) | |
parent | 6d3831b11d9f5aaba61cc2fb8ade61437ad7c335 (diff) |
Merge commit 'origin/gallium-0.1' into gallium-0.1
Conflicts:
src/gallium/drivers/softpipe/sp_quad_fs.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_fs.c
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_bufloop.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_bufloop.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_bufloop.c b/src/mesa/pipe/softpipe/sp_quad_bufloop.c deleted file mode 100644 index 2ae4e22a7d..0000000000 --- a/src/mesa/pipe/softpipe/sp_quad_bufloop.c +++ /dev/null @@ -1,72 +0,0 @@ - -#include "pipe/p_util.h" -#include "sp_context.h" -#include "sp_headers.h" -#include "sp_surface.h" -#include "sp_quad.h" - - -/** - * Loop over colorbuffers, passing quad to next stage each time. - */ -static void -cbuf_loop_quad(struct quad_stage *qs, struct quad_header *quad) -{ - struct softpipe_context *softpipe = qs->softpipe; - float tmp[4][QUAD_SIZE]; - unsigned i; - - assert(sizeof(quad->outputs.color) == sizeof(tmp)); - assert(softpipe->framebuffer.num_cbufs <= PIPE_MAX_COLOR_BUFS); - - /* make copy of original colors since they can get modified - * by blending and masking. - * XXX we won't have to do this if the fragment program actually emits - * N separate colors and we're drawing to N color buffers (MRT). - * But if we emitted one color and glDrawBuffer(GL_FRONT_AND_BACK) is - * in effect, we need to save/restore colors like this. - */ - memcpy(tmp, quad->outputs.color, sizeof(tmp)); - - for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) { - /* set current cbuffer */ - softpipe->current_cbuf = i; - - /* pass blended quad to next stage */ - qs->next->run(qs->next, quad); - - /* restore quad's colors for next buffer */ - memcpy(quad->outputs.color, tmp, sizeof(tmp)); - } -} - - -static void cbuf_loop_begin(struct quad_stage *qs) -{ - qs->next->begin(qs->next); -} - - -static void cbuf_loop_destroy(struct quad_stage *qs) -{ - FREE( qs ); -} - - -/** - * Create the colorbuffer loop stage. - * This is used to implement multiple render targets and GL_FRONT_AND_BACK - * rendering. - */ -struct quad_stage *sp_quad_bufloop_stage( struct softpipe_context *softpipe ) -{ - struct quad_stage *stage = CALLOC_STRUCT(quad_stage); - - stage->softpipe = softpipe; - stage->begin = cbuf_loop_begin; - stage->run = cbuf_loop_quad; - stage->destroy = cbuf_loop_destroy; - - return stage; -} - |