lavapipe: reset object base on recycled command buffers

The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.

When recycling command buffers, reset the object base.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145>
This commit is contained in:
Dave Airlie
2021-02-19 12:15:05 +10:00
parent 7b1568b7a3
commit 226c7ae2a8

View File

@@ -95,6 +95,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_AllocateCommandBuffers(
result = lvp_reset_cmd_buffer(cmd_buffer);
cmd_buffer->level = pAllocateInfo->level;
vk_object_base_reset(&cmd_buffer->base);
pCommandBuffers[i] = lvp_cmd_buffer_to_handle(cmd_buffer);
} else {