panvk: Override the default GetRender[in]AreaGranularityKHR()

Expose the real optimal render area granularity to users, so they can
optimize their rendering operations accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29443>
This commit is contained in:
Boris Brezillon
2024-05-29 15:54:30 +02:00
parent 8c2b4de386
commit 6fe5129d3d

View File

@@ -217,3 +217,19 @@ panvk_per_arch(destroy_device)(struct panvk_device *device,
pan_kmod_dev_destroy(device->kmod.dev);
vk_free(&device->vk.alloc, device);
}
VKAPI_ATTR void VKAPI_CALL
panvk_per_arch(GetRenderAreaGranularity)(VkDevice device,
VkRenderPass renderPass,
VkExtent2D *pGranularity)
{
*pGranularity = (VkExtent2D){32, 32};
}
VKAPI_ATTR void VKAPI_CALL
panvk_per_arch(GetRenderingAreaGranularityKHR)(
VkDevice _device, const VkRenderingAreaInfoKHR *pRenderingAreaInfo,
VkExtent2D *pGranularity)
{
*pGranularity = (VkExtent2D){32, 32};
}