summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_quad.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-07-12 14:13:48 -0600
committerBrian <[email protected]>2007-07-12 14:13:48 -0600
commita48d767cf2ec82d0c0f893a22d22e8593901b206 (patch)
tree732104c0465295a05709e4caf786b722b393769e /src/mesa/pipe/softpipe/sp_quad.c
parente8ceb5a2eb174f5444eaf5f52925fa161ea7d0a9 (diff)
Add a quad 'bufloop' stage to handle glDrawBuffer(GL_FRONT_AND_BACK).
This removes the notion of multiple color buffers from all other stages. Will need a bit more work when shaders with multiple render targets arrive.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_quad.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad.c b/src/mesa/pipe/softpipe/sp_quad.c
index 419a720de9a..5f34f5f1b34 100644
--- a/src/mesa/pipe/softpipe/sp_quad.c
+++ b/src/mesa/pipe/softpipe/sp_quad.c
@@ -21,6 +21,16 @@ sp_build_quad_pipeline(struct softpipe_context *sp)
sp->quad.first = sp->quad.blend;
}
+ if (sp->framebuffer.num_cbufs == 1) {
+ /* the usual case: write to exactly one colorbuf */
+ sp->cbuf = sp->framebuffer.cbufs[0];
+ }
+ else {
+ /* insert bufloop stage */
+ sp->quad.bufloop->next = sp->quad.first;
+ sp->quad.first = sp->quad.bufloop;
+ }
+
if ( sp->stencil.front_enabled
|| sp->stencil.front_enabled) {
sp->quad.stencil_test->next = sp->quad.first;