mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
radeonsi: return correct eviction stats for NVX_gpu_memory_info
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
f660d1cb21
commit
1c13c71ef8
1 changed files with 7 additions and 2 deletions
|
|
@ -1070,8 +1070,13 @@ static void r600_query_memory_info(struct pipe_screen *screen,
|
|||
|
||||
info->device_memory_evicted =
|
||||
ws->query_value(ws, RADEON_NUM_BYTES_MOVED) / 1024;
|
||||
/* Just return the number of evicted 64KB pages. */
|
||||
info->nr_device_memory_evictions = info->device_memory_evicted / 64;
|
||||
|
||||
if (rscreen->info.drm_major == 3 && rscreen->info.drm_minor >= 4)
|
||||
info->nr_device_memory_evictions =
|
||||
ws->query_value(ws, RADEON_NUM_EVICTIONS);
|
||||
else
|
||||
/* Just return the number of evicted 64KB pages. */
|
||||
info->nr_device_memory_evictions = info->device_memory_evicted / 64;
|
||||
}
|
||||
|
||||
struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue