From: Eric Anholt Date: Sat, 4 Dec 2010 02:20:42 +0000 (-0800) Subject: i965: Update gen6 SF state on fragment program change too. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f23039f0014eafec8b9d3fa06ce5fcba655a39b;p=mesa.git 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. --- 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,