diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-11-06 12:51:26 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-11-06 12:51:26 +0000 |
commit | 3e14a482daf5e69331efac69711534a8b66118e4 (patch) | |
tree | dd9214ea66e5213a6b557468fb8c65102572656e | |
parent | 1e3910a878e63d7859b205a30e23535d1da67d45 (diff) | |
download | external_mesa3d-3e14a482daf5e69331efac69711534a8b66118e4.zip external_mesa3d-3e14a482daf5e69331efac69711534a8b66118e4.tar.gz external_mesa3d-3e14a482daf5e69331efac69711534a8b66118e4.tar.bz2 |
i965g: propogate nr_cbufs into wm prog key
-rw-r--r-- | src/gallium/drivers/i965/brw_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_pipe_fb.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_wm.c | 5 |
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 05fc9d4..f53b92d 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 d9b70f4..f65f45f 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 7f2cb15..8589aa2 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), |