diff options
author | Charmaine Lee <[email protected]> | 2016-08-19 08:49:17 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-08-26 06:19:51 -0600 |
commit | 2e1cfcc431471c68ba79c9323716bed7da79c909 (patch) | |
tree | 79fbbe6fb5da05d1f6596eb4944bc94ab832ff6f /src/gallium/drivers/svga/svga_state.c | |
parent | 479199180871432030d3eebc2822bd7cb3dc6fd6 (diff) |
svga: add guest statistic gathering interface
With this patch, guest statistic gathering interface is added to
svga winsys interface that can be used to gather svga driver
statistic. The winsys module can then share the statistic info with
the VMX host via the mksstats interface.
The statistic enums used in the svga driver are defined in
svga_stats_count and svga_stats_time in svga_winsys.h
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_state.c b/src/gallium/drivers/svga/svga_state.c index 4479a271262..777321ead1d 100644 --- a/src/gallium/drivers/svga/svga_state.c +++ b/src/gallium/drivers/svga/svga_state.c @@ -202,6 +202,8 @@ svga_update_state(struct svga_context *svga, unsigned max_level) enum pipe_error ret = PIPE_OK; unsigned i; + SVGA_STATS_TIME_PUSH(screen->sws, SVGA_STATS_TIME_UPDATESTATE); + /* Check for updates to bound textures. This can't be done in an * atom as there is no flag which could provoke this test, and we * cannot create one. @@ -219,7 +221,7 @@ svga_update_state(struct svga_context *svga, unsigned max_level) state_levels[i], &svga->dirty ); if (ret != PIPE_OK) - return ret; + goto done; svga->state.dirty[i] = 0; } @@ -232,7 +234,9 @@ svga_update_state(struct svga_context *svga, unsigned max_level) svga->hud.num_validations++; - return PIPE_OK; +done: + SVGA_STATS_TIME_POP(screen->sws); + return ret; } |