diff options
author | Brian Paul <[email protected]> | 2016-08-02 14:27:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-08-16 08:24:53 -0600 |
commit | f934117bbb9d58f0f5d9cfb4397fec9c6371ed64 (patch) | |
tree | bd4a5be0cbfbf7ff58cd26e3bd7db271a8ea1771 /src/gallium/drivers/svga/svga_resource_texture.c | |
parent | dcf2126f90a1daf226417bde71a62ccf0305adea (diff) |
svga: don't call os_get_time() when not needed by Gallium HUD
The calls to os_get_time() were showing up higher than expected in
profiles.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_texture.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 230221a3867..30dc4d9a082 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -29,7 +29,6 @@ #include "pipe/p_state.h" #include "pipe/p_defines.h" #include "os/os_thread.h" -#include "os/os_time.h" #include "util/u_format.h" #include "util/u_inlines.h" #include "util/u_math.h" @@ -336,7 +335,7 @@ svga_texture_transfer_map(struct pipe_context *pipe, !svga_have_gb_dma(svga); unsigned d; void *returnVal; - int64_t begin = os_time_get(); + int64_t begin = svga_get_time(svga); /* We can't map texture storage directly unless we have GB objects */ if (usage & PIPE_TRANSFER_MAP_DIRECTLY) { @@ -579,7 +578,7 @@ svga_texture_transfer_map(struct pipe_context *pipe, returnVal = (void *) (map + offset); } - svga->hud.map_buffer_time += (os_time_get() - begin); + svga->hud.map_buffer_time += (svga_get_time(svga) - begin); svga->hud.num_resources_mapped++; return returnVal; |