From 9a7e93f1f6b42ff301dc3031ea0002253e61a6a5 Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Tue, 18 Oct 2022 04:25:01 +0200 Subject: [PATCH] vulkan: drop const for descriptor set drivers should be able to update the reference count member of the vk_descriptor_set_layout struct Reviewed-by: Jason Ekstrand Part-of: --- src/vulkan/runtime/vk_pipeline_layout.c | 2 +- src/vulkan/runtime/vk_pipeline_layout.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/runtime/vk_pipeline_layout.c b/src/vulkan/runtime/vk_pipeline_layout.c index 7498c6c863a..e0f7abe5d04 100644 --- a/src/vulkan/runtime/vk_pipeline_layout.c +++ b/src/vulkan/runtime/vk_pipeline_layout.c @@ -117,7 +117,7 @@ vk_pipeline_layout_destroy(struct vk_device *device, for (uint32_t s = 0; s < layout->set_count; s++) { if (layout->set_layouts[s] != NULL) - vk_descriptor_set_layout_unref(device, (void *)layout->set_layouts[s]); + vk_descriptor_set_layout_unref(device, layout->set_layouts[s]); } vk_object_free(device, NULL, layout); diff --git a/src/vulkan/runtime/vk_pipeline_layout.h b/src/vulkan/runtime/vk_pipeline_layout.h index 5f7f04cf0c5..17fde983795 100644 --- a/src/vulkan/runtime/vk_pipeline_layout.h +++ b/src/vulkan/runtime/vk_pipeline_layout.h @@ -61,7 +61,7 @@ struct vk_pipeline_layout { uint32_t set_count; /** Array of pointers to descriptor set layouts, indexed by set index */ - const struct vk_descriptor_set_layout *set_layouts[VK_MESA_PIPELINE_LAYOUT_MAX_SETS]; + struct vk_descriptor_set_layout *set_layouts[VK_MESA_PIPELINE_LAYOUT_MAX_SETS]; /** Destroy callback *