anv: Bump VkDeviceMemory objects limit to 4GB
authorNataraj Deshpande <nataraj.deshpande@intel.com>
Tue, 14 Mar 2023 23:39:34 +0000 (16:39 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 3 Apr 2023 06:18:52 +0000 (06:18 +0000)
commit71fe9dfe07b53115a9e8f8b031a04f6f387937d6
tree82ab8a78fcae5b4cd17e85d05c1d7200a4bc8784
parentb7e5b3e318005eebbf9dbaf73e3139ffb5731230
anv: Bump VkDeviceMemory objects limit to 4GB

Android CTS 13_r4 tests dEQP-VK.memory.allocation.random* fail
with VK_ERROR_OUT_OF_DEVICE_MEMORY on ADL boards with 32GB memory
as memory allocation requests from DEQP are much larger(~2.9GB+)
based on device heap size/8.

Increase the limit to unsigned 32bit max(~4GB) which helps to
fix the dEQP-VK.memory.allocation.random* tests.

v1: Bound allocation by the largest memory heap size (Lionel Landwerlin)

v2: Clean up comments to reflect the code change (Ivan Briano)
    Update the value of MAX_MEMORY_ALLOCATION_SIZE (Lionel Landwerlin)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h