svga: fix breakage in create_backed_surface_view()
authorBrian Paul <brianp@vmware.com>
Sun, 9 Jul 2017 19:45:28 +0000 (12:45 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Jul 2017 17:11:26 +0000 (11:11 -0600)
This fixes a regression in some piglit tests since commit 5e5d5f1a2eb.
I think I mis-resolved the merge conflict when cherry-picking that
commit to master.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_surface.c

index 1f50b9cd0571d54960ece9e7855437ba4958f4a7..d7c9850e68e46a1f0d09bf5858868a9242da15f7 100644 (file)
@@ -446,6 +446,8 @@ create_backed_surface_view(struct svga_context *svga, struct svga_surface *s)
          goto done;
 
       s->backed = svga_surface(backed_view);
+
+      SVGA_STATS_TIME_POP(svga_sws(svga));
    }
    else if (s->backed->age < tex->age) {
       /*
@@ -474,12 +476,9 @@ create_backed_surface_view(struct svga_context *svga, struct svga_surface *s)
                                         bs->key.numMipLevels,
                                         bs->key.numFaces * bs->key.arraySize,
                                         zslice, s->base.u.tex.level, layer);
-
-      svga_mark_surface_dirty(&s->backed->base);
-
-      SVGA_STATS_TIME_POP(svga_sws(svga));
    }
 
+   svga_mark_surface_dirty(&s->backed->base);
    s->backed->age = tex->age;
 
 done: