mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
panvk: clear big_bos on cmd pool reset with release bit
Clear big bos cache if the the user calls vkResetCommandPool with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT. Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36713>
This commit is contained in:
parent
0e88dd575f
commit
0e339c7a64
1 changed files with 16 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include "panvk_cmd_pool.h"
|
||||
#include "panvk_device.h"
|
||||
#include "panvk_entrypoints.h"
|
||||
#include "vk_common_entrypoints.h"
|
||||
|
||||
#include "vk_alloc.h"
|
||||
#include "vk_log.h"
|
||||
|
|
@ -73,3 +74,18 @@ panvk_DestroyCommandPool(VkDevice _device, VkCommandPool commandPool,
|
|||
|
||||
vk_free2(&device->vk.alloc, pAllocator, pool);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
panvk_ResetCommandPool(VkDevice _device, VkCommandPool commandPool,
|
||||
VkCommandPoolResetFlags flags)
|
||||
{
|
||||
VK_FROM_HANDLE(panvk_cmd_pool, pool, commandPool);
|
||||
|
||||
const bool release_resources =
|
||||
(flags & VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT) != 0;
|
||||
if (release_resources) {
|
||||
panvk_bo_pool_cleanup(&pool->tls_big_bo_pool);
|
||||
}
|
||||
|
||||
return vk_common_ResetCommandPool(_device, commandPool, flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue