[Mesa-dev] [PATCH v4 2/7] st/dri: ask the driver to update its internal copies on reimport
Marek Olšák
maraeo at gmail.com
Sat Jan 14 13:50:34 UTC 2017
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
On Dec 6, 2016 5:17 PM, "Philipp Zabel" <p.zabel at pengutronix.de> wrote:
> For imported buffers that can't be used directly as a source to the
> texture samplers, the pipe driver might need to create an internal
> copy, for example in a different tiling layout. When buffers are
> reimported they may contain new image data, so the driver internal
> copies need to be recreated.
>
> Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
> ---
> src/gallium/state_trackers/dri/dri2.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c
> b/src/gallium/state_trackers/dri/dri2.c
> index 9ec069b..a216e83 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -1168,6 +1168,10 @@ dri2_from_planar(__DRIimage *image, int plane, void
> *loaderPrivate)
> if (img == NULL)
> return NULL;
>
> + if (img->texture->screen->resource_changed)
> + img->texture->screen->resource_changed(img->texture->screen,
> + img->texture);
> +
> /* set this to 0 for sub images. */
> img->dri_components = 0;
> return img;
> --
> 2.10.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170114/cf16d221/attachment-0001.html>
More information about the mesa-dev
mailing list