Commit Graph

6 Commits

Author SHA1 Message Date
Alyssa Rosenzweig c7bf3b69eb panvk: Clang-format
We're going to enforce clang-format in CI, so get with the program! This doesn't
change a *ton* all considered, because panvk was already aiming for the style we
have in the panfrost clang-format file.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Boris Brezillon 8acc8f6a0e panvk: Fix allocation of BOs bigger than the slab size
We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
2021-10-04 12:17:07 +00:00
Boris Brezillon 55e3d0e256 panvk: Fix a BO leak in panvk_pool_alloc_backing()
When picking a BO from a BO pool, we need to add it to the memory pool
otherwise it gets lost when the memory pool is reset/destroyed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
2021-09-10 11:41:54 +02:00
Boris Brezillon cb5415396d panvk: Reset panvk_pool->transient_bo in panvk_pool_reset()
Fixes a use-after-free issue.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
2021-09-10 11:41:46 +02:00
Boris Brezillon d629debaca panvk: Support returning BOs allocated by panvk_pool to a 'free BO' pool
So all CommandBuffers in a given CommandPool can reuse BOs for their
memory pools.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Tomeu Vizoso d33a3fad64 panfrost: Fork pan_pool for Gallium and Vulkan
This commit adds the actual implementations, allowing to diverge while
still sharing code that depends on pool functionality.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00