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 6a8fff454e4e248995ebaaf15b473923084b6cdc..71f2f4f277953f163a16ef952280b8450970e2ad 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 75e12c3220ceee2cf9d9d25776f814a9c0dd4f5f..0591f8960b9d720f227b436cdd206873f646c695 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 {