From c3ad65e09812788360a97f48a66ede6c8daebe9f Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Fri, 23 Oct 2015 13:38:14 -0600 Subject: bug-14827: Remove DescriptorInfo union The DescriptorInfo union is invalid in C++ --- layers/param_checker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'layers/param_checker.cpp') diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index dc9f8da4..793a4239 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -4783,10 +4783,12 @@ bool PreUpdateDescriptorSets( "vkUpdateDescriptorSets parameter, VkDescriptorType pDescriptorWrites->descriptorType, is an unrecognized enumerator"); return false; } - if(pDescriptorWrites->pDescriptors != nullptr) + /* TODO: Validate other parts of pImageInfo, pBufferInfo, pTexelBufferView? */ + /* TODO: This test should probably only be done if descriptorType is correct type of descriptor */ + if(pDescriptorWrites->pImageInfo != nullptr) { - if(pDescriptorWrites->pDescriptors->imageInfo.imageLayout < VK_IMAGE_LAYOUT_BEGIN_RANGE || - pDescriptorWrites->pDescriptors->imageInfo.imageLayout > VK_IMAGE_LAYOUT_END_RANGE) + if(pDescriptorWrites->pImageInfo->imageLayout < VK_IMAGE_LAYOUT_BEGIN_RANGE || + pDescriptorWrites->pImageInfo->imageLayout > VK_IMAGE_LAYOUT_END_RANGE) { log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK", "vkUpdateDescriptorSets parameter, VkImageLayout pDescriptorWrites->pDescriptors->imageLayout, is an unrecognized enumerator"); -- cgit v1.2.3