summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorAlex Smith <[email protected]>2017-03-13 13:28:19 +0000
committerBas Nieuwenhuizen <[email protected]>2017-03-13 23:42:36 +0100
commitc19607d59df0edbccc253d299c65aa8d30c54d86 (patch)
tree5cfe169cd0169debae9b0bd5f91925426e1d785d /src/amd/vulkan
parentcdbe4990cda2d0b40f86047dbb65851c22632750 (diff)
radv: Reinitialise loaderMagic when allocating a cached command buffer
This must be set to ICD_LOADER_MAGIC by vkAllocateCommandBuffers, which was being done when allocating a new buffer but not when reusing an existing one in the cache. This would hit an assertion and crash in debug builds of the Vulkan loader. Fixes: 682248db451f ("radv: Cache command buffers in command pool.") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 10c51427679..17be0a1dd31 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1662,6 +1662,7 @@ VkResult radv_AllocateCommandBuffers(
list_addtail(&cmd_buffer->pool_link, &pool->cmd_buffers);
radv_reset_cmd_buffer(cmd_buffer);
+ cmd_buffer->_loader_data.loaderMagic = ICD_LOADER_MAGIC;
cmd_buffer->level = pAllocateInfo->level;
pCommandBuffers[i] = radv_cmd_buffer_to_handle(cmd_buffer);