etnaviv: increment the resource seqno in resource_changed
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 10 May 2017 16:01:08 +0000 (18:01 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 16 May 2017 19:07:56 +0000 (21:07 +0200)
Just increment the resource seqno instead of setting the texture
seqno to be lower by one than the resource seqno.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_resource.c

index 103b53c1c3106359f385a2fb3025e6fcda5170ad..1341e1ea2314d5ab2d9568da114effa1a0c0d787 100644 (file)
@@ -286,11 +286,7 @@ etna_resource_changed(struct pipe_screen *pscreen, struct pipe_resource *prsc)
 {
    struct etna_resource *res = etna_resource(prsc);
 
-   /* Make sure texture is older than the imported renderable buffer,
-    * so etna_update_sampler_source will copy the pixel data again.
-    */
-   if (res->texture)
-      etna_resource(res->texture)->seqno = res->seqno - 1;
+   res->seqno++;
 }
 
 static void