summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/i965/brw_context.h1
-rw-r--r--src/gallium/drivers/i965/brw_pipe_fb.c5
-rw-r--r--src/gallium/drivers/i965/brw_wm.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h
index 05fc9d45b56..f53b92d4f53 100644
--- a/src/gallium/drivers/i965/brw_context.h
+++ b/src/gallium/drivers/i965/brw_context.h
@@ -209,6 +209,7 @@ struct brw_sampler {
#define PIPE_NEW_QUERY 0x80000
#define PIPE_NEW_SCISSOR 0x100000
#define PIPE_NEW_BOUND_TEXTURES 0x200000
+#define PIPE_NEW_NR_CBUFS 0x400000
diff --git a/src/gallium/drivers/i965/brw_pipe_fb.c b/src/gallium/drivers/i965/brw_pipe_fb.c
index d9b70f4eefd..f65f45fb844 100644
--- a/src/gallium/drivers/i965/brw_pipe_fb.c
+++ b/src/gallium/drivers/i965/brw_pipe_fb.c
@@ -38,7 +38,10 @@ static void brw_set_framebuffer_state( struct pipe_context *pipe,
}
}
- brw->curr.fb.nr_cbufs = fb->nr_cbufs;
+ if (brw->curr.fb.nr_cbufs != fb->nr_cbufs) {
+ brw->curr.fb.nr_cbufs = fb->nr_cbufs;
+ brw->state.dirty.mesa |= PIPE_NEW_NR_CBUFS;
+ }
}
diff --git a/src/gallium/drivers/i965/brw_wm.c b/src/gallium/drivers/i965/brw_wm.c
index 7f2cb152563..8589aa22a88 100644
--- a/src/gallium/drivers/i965/brw_wm.c
+++ b/src/gallium/drivers/i965/brw_wm.c
@@ -259,6 +259,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
/* CACHE_NEW_VS_PROG */
key->vp_nr_outputs = brw->vs.prog_data->nr_outputs;
+ key->nr_cbufs = brw->curr.fb.nr_cbufs;
+
+ key->nr_inputs = brw->curr.fragment_shader->info.num_inputs;
+
/* The unique fragment program ID */
key->program_string_id = brw->curr.fragment_shader->id;
}
@@ -294,6 +298,7 @@ const struct brw_tracked_state brw_wm_prog = {
.mesa = (PIPE_NEW_FRAGMENT_SHADER |
PIPE_NEW_DEPTH_STENCIL_ALPHA |
PIPE_NEW_RAST |
+ PIPE_NEW_NR_CBUFS |
PIPE_NEW_BOUND_TEXTURES),
.brw = (BRW_NEW_WM_INPUT_DIMENSIONS |
BRW_NEW_REDUCED_PRIMITIVE),