diff options
author | Brian Paul <[email protected]> | 2016-03-04 09:14:34 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-07 09:33:15 -0700 |
commit | 7e8cf3454624213f27b01f43ea6317d3bb51bb90 (patch) | |
tree | f4279298d60f4e610b13861169e012ec70056eda /src/gallium/drivers/svga/svga_context.c | |
parent | 903afc370fb925ce637c90d694ef1e4052a1a80f (diff) |
svga: add new flush-time HUD query
To measure the time spent flushing the command buffer.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 32917cd6cf9..da4281490ae 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -31,6 +31,7 @@ #include "util/u_memory.h" #include "util/u_bitmask.h" #include "util/u_upload_mgr.h" +#include "os/os_time.h" #include "svga_context.h" #include "svga_screen.h" @@ -299,6 +300,7 @@ void svga_context_flush( struct svga_context *svga, { struct svga_screen *svgascreen = svga_screen(svga->pipe.screen); struct pipe_fence_handle *fence = NULL; + uint64_t t0; svga->curr.nr_fbs = 0; @@ -312,7 +314,9 @@ void svga_context_flush( struct svga_context *svga, /* Flush pending commands to hardware: */ + t0 = os_time_get(); svga->swc->flush(svga->swc, &fence); + svga->hud.flush_time += (os_time_get() - t0); svga->hud.num_flushes++; |