From cca3d1d9a9b72117e7cec68da2cf6266ed2e97c1 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 26 Mar 2021 14:04:16 -0400 Subject: [PATCH] lavapipe: remove lvp_descriptor_update_template::descriptor_set_layout this wasn't used and caused crashes when running with validation enabled due to violating spec: This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/lvp_descriptor_set.c | 2 -- src/gallium/frontends/lavapipe/lvp_private.h | 1 - 2 files changed, 3 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_descriptor_set.c b/src/gallium/frontends/lavapipe/lvp_descriptor_set.c index 7daf88f3877..7704e505625 100644 --- a/src/gallium/frontends/lavapipe/lvp_descriptor_set.c +++ b/src/gallium/frontends/lavapipe/lvp_descriptor_set.c @@ -543,7 +543,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDescriptorUpdateTemplate(VkDevice _devi VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) { LVP_FROM_HANDLE(lvp_device, device, _device); - LVP_FROM_HANDLE(lvp_descriptor_set_layout, set_layout, pCreateInfo->descriptorSetLayout); const uint32_t entry_count = pCreateInfo->descriptorUpdateEntryCount; const size_t size = sizeof(struct lvp_descriptor_update_template) + sizeof(VkDescriptorUpdateTemplateEntry) * entry_count; @@ -558,7 +557,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDescriptorUpdateTemplate(VkDevice _devi VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); templ->type = pCreateInfo->templateType; - templ->descriptor_set_layout = set_layout; templ->bind_point = pCreateInfo->pipelineBindPoint; templ->set = pCreateInfo->set; /* This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR */ diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h index 713679a68b6..58784273406 100644 --- a/src/gallium/frontends/lavapipe/lvp_private.h +++ b/src/gallium/frontends/lavapipe/lvp_private.h @@ -443,7 +443,6 @@ struct lvp_descriptor_update_template { uint32_t entry_count; uint32_t set; VkDescriptorUpdateTemplateType type; - struct lvp_descriptor_set_layout *descriptor_set_layout; VkPipelineBindPoint bind_point; struct lvp_pipeline_layout *pipeline_layout; VkDescriptorUpdateTemplateEntry entry[0];