[Mesa-dev] [PATCH 13/23] i965: Resolve color buffer also in lossless compression case

Ben Widawsky ben at bwidawsk.net
Wed Feb 10 01:32:06 UTC 2016


On Mon, Feb 08, 2016 at 06:51:33PM +0200, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 6f46385..6ec02d8 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -2038,8 +2038,10 @@ intel_miptree_resolve_color(struct brw_context *brw,
>     case INTEL_FAST_CLEAR_STATE_UNRESOLVED:
>     case INTEL_FAST_CLEAR_STATE_CLEAR:
>        /* Fast color clear resolves only make sense for non-MSAA buffers. */
> -      if (mt->msaa_layout == INTEL_MSAA_LAYOUT_NONE)
> +      if (mt->msaa_layout == INTEL_MSAA_LAYOUT_NONE ||
> +          mt->msaa_layout == INTEL_MSAA_LAYOUT_CSS) {
>           brw_meta_resolve_color(brw, mt);
> +      }
>        break;
>     }
>  }

Ah, now I see why it helps to have a different type than CMS. Although, if you
made the msaa_layout type be CMS, it still works, I think:
case INTEL_FAST_CLEAR_STATE_CLEAR:
   if (mt->num_samples < 2)
      brw_meta_resolve_color(brw, mt);

I think that works?

This is just for you to consider. I can live with whatever you think is best.


More information about the mesa-dev mailing list