diff options
author | Brian Paul <[email protected]> | 2016-04-15 15:30:34 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-04-25 09:45:16 -0600 |
commit | 464d6080c60e6f97d286b16f5b09fde94ab37cfc (patch) | |
tree | c4febe68f4228829c0d63ef636573cea5abdb4b0 /src/gallium/drivers/svga/svga_pipe_sampler.c | |
parent | b87856d25d1be1953dea30814994fc40cac5e573 (diff) |
svga: separate HUD counters for state objects
Count depth/stencil, blend, sampler, etc. state objects separately
but just report the sum for the HUD. This change lets us use gdb to
see the breakdown of state objects in more detail.
Also, count sampler views too.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_sampler.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_sampler.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 3e778f0a087..f1bb82a905b 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -273,7 +273,7 @@ svga_create_sampler_state(struct pipe_context *pipe, cso->min_lod, cso->view_min_lod, cso->view_max_lod, cso->mipfilter == SVGA3D_TEX_FILTER_NONE ? "SVGA3D_TEX_FILTER_NONE" : "SOMETHING"); - svga->hud.num_state_objects++; + svga->hud.num_sampler_objects++; return cso; } @@ -338,7 +338,7 @@ static void svga_delete_sampler_state(struct pipe_context *pipe, } FREE(sampler); - svga->hud.num_state_objects--; + svga->hud.num_sampler_objects--; } @@ -347,6 +347,7 @@ svga_create_sampler_view(struct pipe_context *pipe, struct pipe_resource *texture, const struct pipe_sampler_view *templ) { + struct svga_context *svga = svga_context(pipe); struct svga_pipe_sampler_view *sv = CALLOC_STRUCT(svga_pipe_sampler_view); if (!sv) { @@ -361,6 +362,8 @@ svga_create_sampler_view(struct pipe_context *pipe, sv->base.context = pipe; sv->id = SVGA3D_INVALID_ID; + svga->hud.num_samplerview_objects++; + return &sv->base; } @@ -400,6 +403,7 @@ svga_sampler_view_destroy(struct pipe_context *pipe, pipe_resource_reference(&sv->base.texture, NULL); FREE(sv); + svga->hud.num_samplerview_objects--; } static void |