aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/amdgpu
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-29 19:20:06 +0200
committerMarek Olšák <[email protected]>2017-07-04 15:40:37 +0200
commit5b373629fc4ba348e1ebab48304d940ebbf94d45 (patch)
tree72ec3a6667212970b6a4b9227d7cc829f9f01d99 /src/gallium/winsys/amdgpu
parent7d7bcd65d6019dfb63f31138a426fe2a043016db (diff)
radeonsi: add a HUD query for getting an average GFX BO list size
Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c3
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c2
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index c88be069d06..1b3ca6546b8 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1225,6 +1225,9 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
cs->flags[i] = (util_last_bit64(buffer->u.real.priority_usage) - 1) / 4;
}
+ if (acs->ring_type == RING_GFX)
+ ws->gfx_bo_list_counter += cs->num_real_buffers;
+
r = amdgpu_bo_list_create(ws->dev, cs->num_real_buffers,
cs->handles, cs->flags,
&cs->request.resources);
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index c4d52166fb7..2148c496d7d 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -140,6 +140,8 @@ static uint64_t amdgpu_query_value(struct radeon_winsys *rws,
return ws->num_gfx_IBs;
case RADEON_NUM_SDMA_IBS:
return ws->num_sdma_IBs;
+ case RADEON_GFX_BO_LIST_COUNTER:
+ return ws->gfx_bo_list_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 896a463ee6f..f011b8eeedf 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
@@ -65,6 +65,7 @@ struct amdgpu_winsys {
uint64_t num_gfx_IBs;
uint64_t num_sdma_IBs;
uint64_t num_mapped_buffers;
+ uint64_t gfx_bo_list_counter;
struct radeon_info info;