diff options
author | Charmaine Lee <[email protected]> | 2016-11-08 11:54:56 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-06-30 08:24:27 -0600 |
commit | 203d88460c46ea9b92c42129a3c6d33c7a2e8a0c (patch) | |
tree | 73eb132fd8d69187e14c0d1be771d1648be8905d /src/gallium/drivers/svga | |
parent | dbb5d2a790d38d99ae26136014c1c5ebd03c5811 (diff) |
svga: add mksstats for context creation
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 940ce19a1f5..8640da95e82 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -130,6 +130,8 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags) struct svga_context *svga = NULL; enum pipe_error ret; + SVGA_STATS_TIME_PUSH(svgascreen->sws, SVGA_STATS_TIME_CREATECONTEXT); + svga = CALLOC_STRUCT(svga_context); if (!svga) goto cleanup; @@ -298,7 +300,7 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags) svga->pred.query_id = SVGA3D_INVALID_ID; svga->disable_rasterizer = FALSE; - return &svga->pipe; + goto done; cleanup: svga_destroy_swtnl(svga); @@ -325,7 +327,10 @@ cleanup: util_bitmask_destroy(svga->stream_output_id_bm); util_bitmask_destroy(svga->query_id_bm); FREE(svga); - return NULL; + +done: + SVGA_STATS_TIME_POP(svgascreen->sws); + return svga ? &svga->pipe:NULL; } |