[Mesa-dev] [PATCH] i965: Set dirty bit for NOS fragment shader change

Ian Romanick idr at freedesktop.org
Mon Dec 22 17:08:11 PST 2014


On 12/22/2014 04:22 PM, Mike Stroyan wrote:
> A fragment program can change because of Non-Orthogonal-State changes.
> brw_update_texture_surfaces needs to run because of changed surface offsets.
> Set BRW_NEW_FRAGMENT_PROGRAM dirty bit in brw_upload_wm_prog to signal that.

Please add

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87619
Cc: "10.3 10.4" mesa-stable at lists.freedesktop.org

to the commit message.

I'll let Ken or Matt comment about the actual patch.

> ---
>  src/mesa/drivers/dri/i965/brw_wm.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
> index e7939f0..c212892 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm.c
> @@ -601,7 +601,14 @@ brw_upload_wm_prog(struct brw_context *brw)
>        (void) success;
>        assert(success);
>     }
> -   brw->wm.base.prog_data = &brw->wm.prog_data->base;
> +   if (brw->wm.base.prog_data != &brw->wm.prog_data->base) {
> +      /* Fragment program can change because of only NOS changes.
> +       * Set dirty bit to signal that change.
> +       * brw_update_texture_surfaces needs to run for changed surface offsets.
> +       */
> +      brw->wm.base.prog_data = &brw->wm.prog_data->base;
> +      brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
> +   }
>  }
>  
>  
> 



More information about the mesa-dev mailing list