diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 3308ad82c3d..db70878d1df 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -71,6 +71,7 @@ static enum radeon_value_id winsys_id_from_type(unsigned type) case R600_QUERY_NUM_MAPPED_BUFFERS: return RADEON_NUM_MAPPED_BUFFERS; case R600_QUERY_NUM_GFX_IBS: return RADEON_NUM_GFX_IBS; case R600_QUERY_NUM_SDMA_IBS: return RADEON_NUM_SDMA_IBS; + case R600_QUERY_GFX_BO_LIST_SIZE: return RADEON_GFX_BO_LIST_COUNTER; case R600_QUERY_NUM_BYTES_MOVED: return RADEON_NUM_BYTES_MOVED; case R600_QUERY_NUM_EVICTIONS: return RADEON_NUM_EVICTIONS; case R600_QUERY_NUM_VRAM_CPU_PAGE_FAULTS: return RADEON_NUM_VRAM_CPU_PAGE_FAULTS; @@ -173,6 +174,12 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, query->begin_result = rctx->ws->query_value(rctx->ws, ws_id); break; } + case R600_QUERY_GFX_BO_LIST_SIZE: + ws_id = winsys_id_from_type(query->b.type); + query->begin_result = rctx->ws->query_value(rctx->ws, ws_id); + query->begin_time = rctx->ws->query_value(rctx->ws, + RADEON_NUM_GFX_IBS); + break; case R600_QUERY_CS_THREAD_BUSY: ws_id = winsys_id_from_type(query->b.type); query->begin_result = rctx->ws->query_value(rctx->ws, ws_id); @@ -318,6 +325,12 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, query->end_result = rctx->ws->query_value(rctx->ws, ws_id); break; } + case R600_QUERY_GFX_BO_LIST_SIZE: + ws_id = winsys_id_from_type(query->b.type); + query->end_result = rctx->ws->query_value(rctx->ws, ws_id); + query->end_time = rctx->ws->query_value(rctx->ws, + RADEON_NUM_GFX_IBS); + break; case R600_QUERY_CS_THREAD_BUSY: ws_id = winsys_id_from_type(query->b.type); query->end_result = rctx->ws->query_value(rctx->ws, ws_id); @@ -404,6 +417,10 @@ static bool r600_query_sw_get_result(struct r600_common_context *rctx, return result->b; } + case R600_QUERY_GFX_BO_LIST_SIZE: + result->u64 = (query->end_result - query->begin_result) / + (query->end_time - query->begin_time); + return true; case R600_QUERY_CS_THREAD_BUSY: case R600_QUERY_GALLIUM_THREAD_BUSY: result->u64 = (query->end_result - query->begin_result) * 100 / @@ -1861,6 +1878,7 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("num-mapped-buffers", NUM_MAPPED_BUFFERS, UINT64, AVERAGE), X("num-GFX-IBs", NUM_GFX_IBS, UINT64, AVERAGE), X("num-SDMA-IBs", NUM_SDMA_IBS, UINT64, AVERAGE), + X("GFX-BO-list-size", GFX_BO_LIST_SIZE, UINT64, AVERAGE), X("num-bytes-moved", NUM_BYTES_MOVED, BYTES, CUMULATIVE), X("num-evictions", NUM_EVICTIONS, UINT64, CUMULATIVE), X("VRAM-CPU-page-faults", NUM_VRAM_CPU_PAGE_FAULTS, UINT64, CUMULATIVE), diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index 1f97e115906..1bbaa76e584 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -69,6 +69,7 @@ enum { R600_QUERY_NUM_MAPPED_BUFFERS, R600_QUERY_NUM_GFX_IBS, R600_QUERY_NUM_SDMA_IBS, + R600_QUERY_GFX_BO_LIST_SIZE, R600_QUERY_NUM_BYTES_MOVED, R600_QUERY_NUM_EVICTIONS, R600_QUERY_NUM_VRAM_CPU_PAGE_FAULTS, diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index e19fde6e431..247fff04ac5 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -91,6 +91,7 @@ enum radeon_value_id { RADEON_TIMESTAMP, RADEON_NUM_GFX_IBS, RADEON_NUM_SDMA_IBS, + RADEON_GFX_BO_LIST_COUNTER, /* number of BOs submitted in gfx IBs */ RADEON_NUM_BYTES_MOVED, RADEON_NUM_EVICTIONS, RADEON_NUM_VRAM_CPU_PAGE_FAULTS, |