summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965/brw_pipe_fb.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-21 01:52:22 +0000
committerKeith Whitwell <keithw@vmware.com>2009-11-21 01:52:22 +0000
commit8bf75f28de161173d1cdaad8c74bcac074e1211e (patch)
tree5a9b3887c2d75612f07b43faa3cd6ed1fd0a273d /src/gallium/drivers/i965/brw_pipe_fb.c
parent95d7aca4b9963820e7ead81830340dbeb563897b (diff)
i965g: get basic texturing working again
Revert to fixed-layout surface binding table -- it's probably the best way to do this. Pass sampler and texture numbers separately even though we're always keeping them the same at present.
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_fb.c')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_fb.c b/src/gallium/drivers/i965/brw_pipe_fb.c
index 1511220447..6b03094f50 100644
--- a/src/gallium/drivers/i965/brw_pipe_fb.c
+++ b/src/gallium/drivers/i965/brw_pipe_fb.c
@@ -31,7 +31,7 @@ static void brw_set_framebuffer_state( struct pipe_context *pipe,
/* Color buffers:
*/
- for (i = 0; i < MAX2(fb->nr_cbufs, brw->curr.fb.nr_cbufs); i++) {
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
if (brw->curr.fb.cbufs[i] != fb->cbufs[i]) {
brw->state.dirty.mesa |= PIPE_NEW_COLOR_BUFFERS;
pipe_surface_reference(&brw->curr.fb.cbufs[i], fb->cbufs[i]);
@@ -39,7 +39,7 @@ static void brw_set_framebuffer_state( struct pipe_context *pipe,
}
if (brw->curr.fb.nr_cbufs != fb->nr_cbufs) {
- brw->curr.fb.nr_cbufs = fb->nr_cbufs;
+ brw->curr.fb.nr_cbufs = MIN2(BRW_MAX_DRAW_BUFFERS, fb->nr_cbufs);
brw->state.dirty.mesa |= PIPE_NEW_NR_CBUFS;
}
}