From 226c7ae2a86dfeb0f29ea736b77b4427c02f0482 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Feb 2021 12:15:05 +1000 Subject: [PATCH] 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 Part-of: --- src/gallium/frontends/lavapipe/lvp_cmd_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c index 291a7e5..ae5349c 100644 --- a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c +++ b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c @@ -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 { -- 2.7.4