Mesa (master): svga: fix breakage in create_backed_surface_view()

Brian Paul brianp at kemper.freedesktop.org
Mon Jul 10 17:14:26 UTC 2017


Module: Mesa
Branch: master
Commit: f8f71cb6f394b8b655e760a6acec8ccff1a89cfc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8f71cb6f394b8b655e760a6acec8ccff1a89cfc

Author: Brian Paul <brianp at vmware.com>
Date:   Sun Jul  9 12:45:28 2017 -0700

svga: fix breakage in create_backed_surface_view()

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 at vmware.com>

---

 src/gallium/drivers/svga/svga_surface.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 1f50b9cd05..d7c9850e68 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -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:




More information about the mesa-commit mailing list