[Mesa-dev] [PATCH v2] i965: fix dma_buf import with non-zero offset.
Gwenole Beauchesne
gb.devel at gmail.com
Tue Mar 25 11:03:44 PDT 2014
Pushed to git master after r-b on IRC (#intel-gfx) a few days ago. Thanks.
2014-03-14 18:46 GMT+01:00 Gwenole Beauchesne <gb.devel at gmail.com>:
> Fix eglCreateImage() from a packed dma_buf surface with a non-zero offset
> to pixels data. In particular, this fixes support for planar YUV surfaces
> when they are individually mapped on a per-plane basis, i.e. when the
> OES_EGL_image_external is not used and user application wants to use its
> own shader code for composition, or processing on individual plane (OCL).
>
> v2: fixed check for tile boundary.
>
> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_screen.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index 1e3d58f..5005b5c 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -737,6 +737,13 @@ intel_create_image_from_fds(__DRIscreen *screen,
> image->strides[index] = strides[index];
> }
>
> + if (f->nplanes == 1) {
> + image->offset = image->offsets[0];
> + if (image->region->tiling != I915_TILING_NONE && (image->offset & 0xfff))
> + _mesa_warning(NULL,
> + "intel_create_image_from_fds: offset not on tile boundary");
> + }
> +
> intel_setup_image_from_dimensions(image);
>
> return image;
> --
> 1.7.9.5
>
More information about the mesa-dev
mailing list