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

Author: Brian Paul <[email protected]>
Date:   Mon Oct 12 18:40:27 2015 -0600

svga: only count hardware buffer mappings for HUD

Don't count client memory buffer mappings since they're basically free.

Reviewed-by: Charmaine Lee <[email protected]>

---

 src/gallium/drivers/svga/svga_resource_buffer.c |    1 -
 src/gallium/drivers/svga/svga_resource_buffer.h |    3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c 
b/src/gallium/drivers/svga/svga_resource_buffer.c
index 6a8fff4..71f2f4f 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -247,7 +247,6 @@ svga_buffer_transfer_map(struct pipe_context *pipe,
    }
 
    svga->hud.map_buffer_time += (os_time_get() - begin);
-   svga->hud.num_resources_mapped++;
 
    return map;
 }
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h 
b/src/gallium/drivers/svga/svga_resource_buffer.h
index 75e12c3..0591f89 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -253,6 +253,9 @@ svga_buffer_hw_storage_map(struct svga_context *svga,
                            unsigned flags, boolean *retry)
 {
    struct svga_winsys_screen *sws = svga_buffer_winsys_screen(sbuf);
+
+   svga->hud.num_resources_mapped++;
+
    if (sws->have_gb_objects) {
       return svga->swc->surface_map(svga->swc, sbuf->handle, flags, retry);
    } else {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to