From: Lucas Stach Date: Thu, 22 Jun 2017 14:07:46 +0000 (+0200) Subject: etnaviv: increment correct seqno for external resources X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=836d22a2fb99a60e71fd2ccef6bc2d0df696d811;p=mesa.git etnaviv: increment correct seqno for external resources 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. Signed-off-by: Lucas Stach Reviewed-by: Wladimir J. van der Laan Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 8e39461ec67..e094737344b 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -305,7 +305,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