svga: collect stats for time spent in svga_context_finish()
[mesa.git] / src / gallium / drivers / svga / svga_context.c
index 21ce508905262e6d1e73b09d6388a23420a0cef8..436961b1ecd591c8690625e2503cd532fd308c31 100644 (file)
@@ -386,9 +386,13 @@ svga_context_finish(struct svga_context *svga)
    struct pipe_screen *screen = svga->pipe.screen;
    struct pipe_fence_handle *fence = NULL;
 
+   SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CONTEXTFINISH);
+
    svga_context_flush(svga, &fence);
    screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
    screen->fence_reference(screen, &fence, NULL);
+
+   SVGA_STATS_TIME_POP(svga_sws(svga));
 }