diff options
author | Samuel Pitoiset <[email protected]> | 2017-01-25 16:56:46 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-01-26 19:40:52 +0100 |
commit | eca96ea308dfba41c6bce9c90c79ad8d393e6bbc (patch) | |
tree | c53e1864044eb61df7e62b357ed9b9fd3456157f /src/gallium/winsys/amdgpu | |
parent | 9f087e1c7cc869fcb9839282194560d289b7df59 (diff) |
gallium/radeon: add VRAM-vis-usage HUD query
This new query returns the current visible usage of VRAM accessed
by the CPU. It will return 0 on radeon because it's unimplemented.
Signed-off-by: Samuel Pitoiset <[email protected]>
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index ea4d25476fc..c3dfda53f09 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -451,6 +451,10 @@ static uint64_t amdgpu_query_value(struct radeon_winsys *rws, case RADEON_VRAM_USAGE: amdgpu_query_heap_info(ws->dev, AMDGPU_GEM_DOMAIN_VRAM, 0, &heap); return heap.heap_usage; + case RADEON_VRAM_VIS_USAGE: + amdgpu_query_heap_info(ws->dev, AMDGPU_GEM_DOMAIN_VRAM, + AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, &heap); + return heap.heap_usage; case RADEON_GTT_USAGE: amdgpu_query_heap_info(ws->dev, AMDGPU_GEM_DOMAIN_GTT, 0, &heap); return heap.heap_usage; |