svga: only count hardware buffer mappings for HUD
authorBrian Paul <brianp@vmware.com>
Tue, 13 Oct 2015 00:40:27 +0000 (18:40 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 16 Oct 2015 17:44:00 +0000 (11:44 -0600)
Don't count client memory buffer mappings since they're basically free.

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

index 6a8fff4..71f2f4f 100644 (file)
@@ -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;
 }
index 75e12c3..0591f89 100644 (file)
@@ -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 {