[Mesa-dev] [PATCH 2/2] i965: Only set planar_format if it's actually one

Jason Ekstrand jason at jlekstrand.net
Tue Sep 19 19:10:12 UTC 2017


On Tue, Sep 19, 2017 at 6:40 AM, Daniel Stone <daniels at collabora.com> wrote:

> From: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
>
> The planar_format image property was always set even for
> non-planar formats. This was breaking CCS support as
> intel_from_planar is now making sure we can't have both
> a modifier and an planar format.
>

Could you provide a bit more detail here?  We did have issues at one point
but I fixed them a while ago.  That said, I think this patch is probably
correct and a good idea.  Also, how much testing of this patch have you
done?


> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
> Reviewed-by: Daniel Stone <daniels at collabora.com>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
> b/src/mesa/drivers/dri/i965/intel_screen.c
> index bc2bba00b6..8382e571e3 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -915,7 +915,8 @@ intel_create_image_from_names(__DRIscreen *dri_screen,
>     if (image == NULL)
>        return NULL;
>
> -    image->planar_format = f;
> +    if (f->nplanes > 1)
> +        image->planar_format = f;
>      for (i = 0; i < f->nplanes; i++) {
>          index = f->planes[i].buffer_index;
>          image->offsets[index] = offsets[index];
> @@ -963,7 +964,8 @@ intel_create_image_from_fds_common(__DRIscreen
> *dri_screen,
>     image->height = height;
>     image->pitch = strides[0];
>
> -   image->planar_format = f;
> +   if (f->nplanes > 1)
> +      image->planar_format = f;
>
>     image->bo = brw_bo_gem_create_from_prime(screen->bufmgr, fds[0]);
>     if (image->bo == NULL) {
> --
> 2.14.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170919/50ac6333/attachment.html>


More information about the mesa-dev mailing list