virgl: Return total video memory if available

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9009>
This commit is contained in:
Rohan Garg 2021-02-12 12:49:28 +01:00 committed by Rohan Garg
parent e778aceaae
commit 6dfdde149e
1 changed files with 2 additions and 0 deletions

View File

@ -318,6 +318,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_UMA:
case PIPE_CAP_VIDEO_MEMORY:
if (vscreen->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_VIDEO_MEMORY)
return vscreen->caps.caps.v2.max_video_memory;
return 0;
case PIPE_CAP_NATIVE_FENCE_FD:
return vscreen->vws->supports_fences;