diff options
author | Marek Olšák <[email protected]> | 2016-08-05 01:38:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-10 01:11:10 +0200 |
commit | 33a9b4e8a11f263e5ec43a461279ef00220dcd92 (patch) | |
tree | eccfd251a264bc2673efc3c5543a30e1a293b749 /src/gallium/drivers/radeon | |
parent | 645d395d9af74573ed09223720e799073d34b647 (diff) |
gallium/radeon: add HUD queries for mapped VRAM/GTT
mainly for monitoring visible VRAM congestion
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index f6a65a6c22c..87352032ad7 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -51,6 +51,8 @@ static enum radeon_value_id winsys_id_from_type(unsigned type) switch (type) { case R600_QUERY_REQUESTED_VRAM: return RADEON_REQUESTED_VRAM_MEMORY; case R600_QUERY_REQUESTED_GTT: return RADEON_REQUESTED_GTT_MEMORY; + case R600_QUERY_MAPPED_VRAM: return RADEON_MAPPED_VRAM; + case R600_QUERY_MAPPED_GTT: return RADEON_MAPPED_GTT; case R600_QUERY_BUFFER_WAIT_TIME: return RADEON_BUFFER_WAIT_TIME_NS; case R600_QUERY_NUM_CS_FLUSHES: return RADEON_NUM_CS_FLUSHES; case R600_QUERY_NUM_BYTES_MOVED: return RADEON_NUM_BYTES_MOVED; @@ -89,6 +91,8 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, break; case R600_QUERY_REQUESTED_VRAM: case R600_QUERY_REQUESTED_GTT: + case R600_QUERY_MAPPED_VRAM: + case R600_QUERY_MAPPED_GTT: case R600_QUERY_VRAM_USAGE: case R600_QUERY_GTT_USAGE: case R600_QUERY_GPU_TEMPERATURE: @@ -154,6 +158,8 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, break; case R600_QUERY_REQUESTED_VRAM: case R600_QUERY_REQUESTED_GTT: + case R600_QUERY_MAPPED_VRAM: + case R600_QUERY_MAPPED_GTT: case R600_QUERY_VRAM_USAGE: case R600_QUERY_GTT_USAGE: case R600_QUERY_GPU_TEMPERATURE: @@ -1175,6 +1181,8 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("dma-calls", DMA_CALLS, UINT64, AVERAGE), X("requested-VRAM", REQUESTED_VRAM, BYTES, AVERAGE), X("requested-GTT", REQUESTED_GTT, BYTES, AVERAGE), + X("mapped-VRAM", MAPPED_VRAM, BYTES, AVERAGE), + X("mapped-GTT", MAPPED_GTT, BYTES, AVERAGE), X("buffer-wait-time", BUFFER_WAIT_TIME, MICROSECONDS, CUMULATIVE), X("num-cs-flushes", NUM_CS_FLUSHES, UINT64, AVERAGE), X("num-bytes-moved", NUM_BYTES_MOVED, BYTES, CUMULATIVE), @@ -1237,10 +1245,12 @@ static int r600_get_driver_query_info(struct pipe_screen *screen, switch (info->query_type) { case R600_QUERY_REQUESTED_VRAM: case R600_QUERY_VRAM_USAGE: + case R600_QUERY_MAPPED_VRAM: info->max_value.u64 = rscreen->info.vram_size; break; case R600_QUERY_REQUESTED_GTT: case R600_QUERY_GTT_USAGE: + case R600_QUERY_MAPPED_GTT: info->max_value.u64 = rscreen->info.gart_size; break; case R600_QUERY_GPU_TEMPERATURE: diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index f3c03f59262..7aa684c4dad 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -48,6 +48,8 @@ enum { R600_QUERY_DMA_CALLS, R600_QUERY_REQUESTED_VRAM, R600_QUERY_REQUESTED_GTT, + R600_QUERY_MAPPED_VRAM, + R600_QUERY_MAPPED_GTT, R600_QUERY_BUFFER_WAIT_TIME, R600_QUERY_NUM_CS_FLUSHES, R600_QUERY_NUM_BYTES_MOVED, |