summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-12-03 18:20:42 -0800
committerEric Anholt <[email protected]>2010-12-04 16:26:55 -0800
commit8f23039f0014eafec8b9d3fa06ce5fcba655a39b (patch)
tree491afe01c65ba1c9d5d483bc86f16d0c624e13e7
parent65570d048234bfc13c5f1545e0454263fb2b5038 (diff)
i965: Update gen6 SF state on fragment program change too.
SF state depends on what inputs there are to the fragment program, not just the outputs of the VS.
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 06ac5d49a0f..476bf531c64 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -67,6 +67,7 @@ upload_sf_state(struct brw_context *brw)
struct gl_context *ctx = &intel->ctx;
/* CACHE_NEW_VS_PROG */
uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
+ /* BRW_NEW_FRAGMENT_PROGRAM */
uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
uint32_t dw1, dw2, dw3, dw4, dw16;
int i;
@@ -247,7 +248,8 @@ const struct brw_tracked_state gen6_sf_state = {
_NEW_BUFFERS |
_NEW_POINT |
_NEW_TRANSFORM),
- .brw = BRW_NEW_CONTEXT,
+ .brw = (BRW_NEW_CONTEXT |
+ BRW_NEW_FRAGMENT_PROGRAM),
.cache = CACHE_NEW_VS_PROG
},
.emit = upload_sf_state,