[Mesa-dev] [PATCH 05/11] etnaviv: increment correct seqno for external resources
Wladimir J. van der Laan
laanwj at gmail.com
Wed Jun 28 14:00:09 UTC 2017
On Fri, Jun 23, 2017 at 05:50:22PM +0200, Lucas Stach wrote:
> If we import a dma-buf with a sampler/pixel pipe incompatible modifier,
> the imported buffer will end up in an external resource view. As
> resource_changed signals the change of the imported resource, we need
> to update the external view seqno, instead of the base resource seqno.
Reviewed-by: Wladimir J. van der Laan <laanwj at gmail.com>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index 5cd20fafba49..43f63f8908a0 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -311,7 +311,10 @@ etna_resource_changed(struct pipe_screen *pscreen, struct pipe_resource *prsc)
> {
> struct etna_resource *res = etna_resource(prsc);
>
> - res->seqno++;
> + if (res->external)
> + etna_resource(res->external)->seqno++;
> + else
> + res->seqno++;
> }
>
> static void
> --
> 2.11.0
>
> _______________________________________________
> etnaviv mailing list
> etnaviv at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv
More information about the mesa-dev
mailing list