Am 07.02.2018 um 23:25 schrieb Dave Airlie:
> From: Dave Airlie <airl...@redhat.com>
> 
> Fixes: 2d5b5d267e (r600: work out target mask at framebuffer bind.)
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104989
> 
> Signed-off-by: Dave Airlie <airl...@redhat.com>

Looks alright to me.
It's quite easy to miss changes to family-specific code (if those parts
are separate) indeed...
Reviewed-by: Roland Scheidegger <srol...@vmware.com>

> ---
>  src/gallium/drivers/r600/r600_state.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/r600/r600_state.c 
> b/src/gallium/drivers/r600/r600_state.c
> index 5cf99c18b6..7f6da1a3ed 100644
> --- a/src/gallium/drivers/r600/r600_state.c
> +++ b/src/gallium/drivers/r600/r600_state.c
> @@ -1088,6 +1088,7 @@ static void r600_set_framebuffer_state(struct 
> pipe_context *ctx,
>       struct r600_surface *surf;
>       struct r600_texture *rtex;
>       unsigned i;
> +     uint32_t target_mask = 0;
>  
>       /* Flush TC when changing the framebuffer state, because the only
>        * client not using TC that can change textures is the framebuffer.
> @@ -1128,6 +1129,8 @@ static void r600_set_framebuffer_state(struct 
> pipe_context *ctx,
>               rtex = (struct r600_texture*)surf->base.texture;
>               r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
>  
> +             target_mask |= (0xf << (i * 4));
> +
>               if (!surf->color_initialized || force_cmask_fmask) {
>                       r600_init_color_surface(rctx, surf, force_cmask_fmask);
>                       if (force_cmask_fmask) {
> @@ -1187,7 +1190,9 @@ static void r600_set_framebuffer_state(struct 
> pipe_context *ctx,
>               r600_mark_atom_dirty(rctx, &rctx->db_misc_state.atom);
>       }
>  
> -     if (rctx->cb_misc_state.nr_cbufs != state->nr_cbufs) {
> +     if (rctx->cb_misc_state.nr_cbufs != state->nr_cbufs ||
> +         rctx->cb_misc_state.bound_cbufs_target_mask != target_mask) {
> +             rctx->cb_misc_state.bound_cbufs_target_mask = target_mask;
>               rctx->cb_misc_state.nr_cbufs = state->nr_cbufs;
>               r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
>       }
> 

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to