[Mesa-dev] [PATCH 26/34] i965: Pretend that CCS modified images are two planes

Daniel Stone daniel at fooishbar.org
Thu Mar 23 14:02:13 UTC 2017


Hi Ben,

On 24 January 2017 at 06:21, Ben Widawsky <ben at bwidawsk.net> wrote:
> @@ -1018,9 +1018,18 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
>      int width, height, offset, stride, dri_format, index;
>      struct intel_image_format *f;
>      __DRIimage *image;
> -
> -    if (parent == NULL || parent->planar_format == NULL)
> -        return NULL;
> +    bool is_aux = parent->aux_offset && plane == 1;
> +
> +    if (parent == NULL || parent->planar_format == NULL) {
> +       if (is_aux) {
> +          offset = parent->aux_offset;
> +          stride = ALIGN(parent->pitch / 32, 128);
> +          height = ALIGN(DIV_ROUND_UP(parent->height, 16), 32);
> +          dri_format = parent->dri_format;
> +          goto done;

The non-goto version in modifiersv9 now throws a warning for 'width'
being uninitialised. I assume this should just be ALIGN(parent->width
/ 32, 32), or ... ?

Cheers,
Daniel


More information about the mesa-dev mailing list