[Mesa-dev] [PATCH 02/22] intel/isl: Only create a CCS buffer if the image supports rendering

Jason Ekstrand jason at jlekstrand.net
Tue May 2 21:52:19 UTC 2017


This isn't entirely precise because you could create an E5B9G9R9 image and
then only render to it using a R8G8B8A8_UNORM view and fast-clear with it.
That said, neither API lets you do that and it's kind-of pointless for just
one format.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <nanleychery at gmail.com>
wrote:

> This prevents assertion failures when initializing the clear value
> buffer on images with the E5B9G9R9 format.
>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/intel/isl/isl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index ce5b35c47c..ff3e2fb86d 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -1573,7 +1573,7 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
>     if (ISL_DEV_GEN(dev) <= 8 && surf->dim != ISL_SURF_DIM_2D)
>        return false;
>
> -   if (isl_format_is_compressed(surf->format))
> +   if (!isl_format_supports_rendering(dev->info, surf->format))
>        return false;
>
>     /* TODO: More conditions where it can fail. */
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170502/762b1513/attachment.html>


More information about the mesa-dev mailing list