From 8f23039f0014eafec8b9d3fa06ce5fcba655a39b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 3 Dec 2010 18:20:42 -0800 Subject: [PATCH] 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. --- src/mesa/drivers/dri/i965/gen6_sf_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.30.2