diff options
author | Marek Olšák <[email protected]> | 2017-10-08 00:35:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-17 22:03:03 +0200 |
commit | 0aafedbbb28dac46a893eb97d5dec589113f6c00 (patch) | |
tree | 21bcff8f68f70439b34138e7d113d4778217ec0c /src/gallium/winsys/amdgpu | |
parent | 4d944c72b1b5208b66af820ac24820760ec25e70 (diff) |
radeonsi: add GFX-IB-size query to the HUD
It shows the sum of all IBs per frame.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 1 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 8fbe8ae5fd3..8f43e936469 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -1423,6 +1423,7 @@ static int amdgpu_cs_flush(struct radeon_winsys_cs *rcs, while (rcs->current.cdw & 7) radeon_emit(rcs, 0xffff1000); /* type3 nop packet */ } + ws->gfx_ib_size_counter += (rcs->prev_dw + rcs->current.cdw) * 4; break; case RING_UVD: while (rcs->current.cdw & 15) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 5e0c1fd8d8f..a210a270431 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -145,6 +145,8 @@ static uint64_t amdgpu_query_value(struct radeon_winsys *rws, return ws->num_sdma_IBs; case RADEON_GFX_BO_LIST_COUNTER: return ws->gfx_bo_list_counter; + case RADEON_GFX_IB_SIZE_COUNTER: + return ws->gfx_ib_size_counter; case RADEON_NUM_BYTES_MOVED: amdgpu_query_info(ws->dev, AMDGPU_INFO_NUM_BYTES_MOVED, 8, &retval); return retval; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h index de54470ede2..8b62e2dbe34 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h @@ -69,6 +69,7 @@ struct amdgpu_winsys { uint64_t num_sdma_IBs; uint64_t num_mapped_buffers; uint64_t gfx_bo_list_counter; + uint64_t gfx_ib_size_counter; struct radeon_info info; |