summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen.c')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index c5f8c87927d..7567af77892 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -810,14 +810,23 @@ svga_fence_finish(struct pipe_screen *screen,
uint64_t timeout)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
+ boolean retVal;
- if (!timeout)
- return sws->fence_signalled(sws, fence, 0) == 0;
+ SVGA_STATS_TIME_PUSH(sws, SVGA_STATS_TIME_FENCEFINISH);
- SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n",
- __FUNCTION__, fence);
+ if (!timeout) {
+ retVal = sws->fence_signalled(sws, fence, 0) == 0;
+ }
+ else {
+ SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n",
+ __FUNCTION__, fence);
+
+ retVal = sws->fence_finish(sws, fence, 0) == 0;
+ }
+
+ SVGA_STATS_TIME_POP(sws);
- return sws->fence_finish(sws, fence, 0) == 0;
+ return retVal;
}