[Mesa-dev] [PATCH 1/3] i965: Fix incorrect dirty bit in gen6_prepare_wm_push_constants.

Eric Anholt eric at anholt.net
Wed Oct 19 09:47:51 PDT 2011


On Tue, 18 Oct 2011 17:05:28 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> We definitely want CACHE_NEW_WM_PROG, not CACHE_NEW_VS_PROG.
> 
> NOTE: This is a candidate for the 7.11 branch.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

This series is Reviewed-by: Eric Anholt <eric at anholt.net>

> ---
>  src/mesa/drivers/dri/i965/gen6_wm_state.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
> index 00fadb9..370516d 100644
> --- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
> +++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
> @@ -49,7 +49,7 @@ gen6_prepare_wm_push_constants(struct brw_context *brw)
>     /* XXX: Should this happen somewhere before to get our state flag set? */
>     _mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
>  
> -   /* CACHE_NEW_VS_PROG */
> +   /* CACHE_NEW_WM_PROG */
>     if (brw->wm.prog_data->nr_params != 0) {
>        float *constants;
>        unsigned int i;
> @@ -85,7 +85,7 @@ const struct brw_tracked_state gen6_wm_constants = {
>        .mesa  = _NEW_PROGRAM_CONSTANTS,
>        .brw   = (BRW_NEW_BATCH |
>  		BRW_NEW_FRAGMENT_PROGRAM),
> -      .cache = CACHE_NEW_VS_PROG,
> +      .cache = CACHE_NEW_WM_PROG,
>     },
>     .prepare = gen6_prepare_wm_push_constants,
>  };

I think this first bug could have resulted in real problems if, for
example, proj_attrib_mask but nothing else fragment program related
changed between draw calls (since we'd end up with different computation
in the shader, and thus different sets of live uniform components to be
uploaded).  Texture swizzles might do it, too.  I'm having trouble
coming up with a likely behavior in a non-testcase app to trigger it,
but I don't want to think about the issue any more, so cherry-picking
seems like a good idea. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111019/9b7d478c/attachment.pgp>


More information about the mesa-dev mailing list