There's no point adding our own pointer when the base vk_xxx object
already provides a way to get back to the parent. Replace those
fields by _get_xxx() helpers.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
Fix GetPhysicalDeviceProperties2 to report accurate information, and
add comment explaining the reasoning behind the new limits.
While at it, stop using the MAX_xxx definitions since some of them
will be per-gen, and this file is not.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
While at it, add error messages to the existing error paths.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
vk_framebuffer provides exactly the same thing, so let the core
implement the VkFramebuffer entry points for us.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
The vk runtime provides a default implementation, drop the stubs we
had.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
Make sure the object name reflects the fact this object is related
to vkCmdEvent not vkEvent.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
The texture descriptor is stored in a CPU-only template that gets copied
to the descriptor set. No need to reserve space in the texture payload
BO.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
Doesn't make a difference in practice, because we are allocating with
zalloc, but let's explicitly call util_dynarray_init() for correctness.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
SCOPE_COMMAND means the allocation last only for the vkXxx call. Both
batches and clear values live longer than that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
No panvk_device_set_lost() users yet, and if we start reporting
device-lost events, we will use vk_device_set_lost() directly.
Replace the only call to panvk_device_is_lost() by a vk_device_is_lost()
call.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
VkDeviceMemory objects passed to BindImageMemory2() are not allowed to
bu VK_NULL_HANDLE, so let's drop the if (mem) test and assert()
instead.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
We recently stopped enforcing clang-format in CI, but we still want to
be able to use it on new changes without pulling unrelated formatting
changes. Let's run it one more time to fix the existing formatting
issues.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
Destroy the decode context when all private BOs attached to the device
have been destroyed, otherwise we a have use-after-free situation when
panvk_priv_bo_destroy() calls pandecode_inject_mmap().
Fixes: 211aa20194 ("panvk: Move away from panfrost_{bo,device}")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
X is needed for the incoming nine tests.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>