summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2021-11-17 20:32:44 +0100
committerMarge Bot <emma+marge@anholt.net>2021-11-19 13:52:36 +0000
commitddbc84d5a00198e08e25748c239485664477e2e1 (patch)
tree50bddf9864f9a06be7573fbe5149f1e039d60ec2 /src
parent2436cafffe49d3ff59d62f263164327b0c12a625 (diff)
downloadmesa-ddbc84d5a00198e08e25748c239485664477e2e1.tar.gz
radv: ignore the descriptor set layout when creating descriptor template
From the Vulkan spec: "This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET." This fixes an assertion about the base object type when running Yuzu with Vulkan validation layers enabled. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13846>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_descriptor_set.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c
index 39878b75153..452819166e7 100644
--- a/src/amd/vulkan/radv_descriptor_set.c
+++ b/src/amd/vulkan/radv_descriptor_set.c
@@ -1317,10 +1317,10 @@ radv_CreateDescriptorUpdateTemplate(VkDevice _device,
VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate)
{
RADV_FROM_HANDLE(radv_device, device, _device);
- RADV_FROM_HANDLE(radv_descriptor_set_layout, set_layout, pCreateInfo->descriptorSetLayout);
const uint32_t entry_count = pCreateInfo->descriptorUpdateEntryCount;
const size_t size = sizeof(struct radv_descriptor_update_template) +
sizeof(struct radv_descriptor_update_template_entry) * entry_count;
+ struct radv_descriptor_set_layout *set_layout = NULL;
struct radv_descriptor_update_template *templ;
uint32_t i;
@@ -1342,6 +1342,9 @@ radv_CreateDescriptorUpdateTemplate(VkDevice _device,
set_layout = pipeline_layout->set[pCreateInfo->set].layout;
templ->bind_point = pCreateInfo->pipelineBindPoint;
+ } else {
+ assert(pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET);
+ set_layout = radv_descriptor_set_layout_from_handle(pCreateInfo->descriptorSetLayout);
}
for (i = 0; i < entry_count; i++) {