Module: Mesa Branch: main Commit: 054188bff821f490b157dc0a4740d72793b97212 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=054188bff821f490b157dc0a4740d72793b97212
Author: Vitaliy Triang3l Kuzmin <[email protected]> Date: Sat Aug 19 23:33:10 2023 +0300 vulkan: Fix pipeline layout allocation scope The lifetime of Mesa's vk_pipeline_layout may exceed that of the VkPipelineLayout object as other objects on the device may hold references to it. In other places in vk_pipeline_layout and vk_descriptor_set_layout, the device allocation scope is used with this pattern, but there was an inconsistency in vk_pipeline_layout_zalloc, which is fixed by this commit. Reviewed-by: Karmjit Mahil <[email protected]> Signed-off-by: Vitaliy Triang3l Kuzmin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24794> --- src/vulkan/runtime/vk_pipeline_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_pipeline_layout.c b/src/vulkan/runtime/vk_pipeline_layout.c index e0f7abe5d04..df2311ccb8a 100644 --- a/src/vulkan/runtime/vk_pipeline_layout.c +++ b/src/vulkan/runtime/vk_pipeline_layout.c @@ -66,7 +66,7 @@ vk_pipeline_layout_zalloc(struct vk_device *device, size_t size, * their own object. */ struct vk_pipeline_layout *layout = - vk_zalloc(&device->alloc, size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); + vk_zalloc(&device->alloc, size, 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); if (layout == NULL) return NULL;
