anv: Fix VK_EXT_memory_budget to consider VRAM if available
authorSagar Ghuge <sagar.ghuge@intel.com>
Wed, 18 Aug 2021 01:23:11 +0000 (18:23 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Aug 2021 17:13:00 +0000 (17:13 +0000)
commit57bfd7122f711db4db9100254432e27e877fad09
tree704f0f8179ffb6cdd0399b5b7e3a9b1fdda8aee4
parent758662759dcf31c64fd62d5b3d280e2c7791ce63
anv: Fix VK_EXT_memory_budget to consider VRAM if available

Instead of calling the OS query, re-run anv_update_meminfo to get the
latest from either the kernel memory info API or the OS as appropriate.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5173
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Co-authored-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12433>
src/intel/vulkan/anv_device.c