radv: track memory heaps usage if overallocation is explicitly disallowed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 28 Apr 2020 11:10:56 +0000 (13:10 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Apr 2020 21:03:26 +0000 (21:03 +0000)
commit5832f2b8a34fc5ca50fa0cf590539f2b8c3322f6
tree6c0fa38eaa70cdf29d5fe721af73ef97fd5ba365
parent32035cca3fcc1bb49cc75751d8ba324175afb14a
radv: track memory heaps usage if overallocation is explicitly disallowed

By default, RADV supports overallocation by the sense that it doesn't
reject an allocation if the target heap is full.

With VK_AMD_overallocation_behaviour, apps can disable overallocation
and the driver should account for all allocations explicitly made by
the application, and reject if the heap is full.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4785>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_private.h