From 1e69501fc7592eedd390be246c0f06485ee67cec Mon Sep 17 00:00:00 2001 From: Michael Lentine Date: Wed, 2 Mar 2016 14:35:44 -0600 Subject: [PATCH] layers: Allow use of QUEUE_FAMILY_IGNORED for BufferMemoryBarriers This fixed a bug in drawstate that produced invalid error messages running apps that used FAMILY_IGNORED. --- layers/draw_state.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 95e14038..3f3f483e 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -6523,10 +6523,12 @@ VkBool32 ValidateBarriers(const char* funcName, continue; // Validate buffer barrier queue family indices - if ((mem_barrier->srcQueueFamilyIndex >= - dev_data->physDevProperties.queue_family_properties.size()) || - (mem_barrier->dstQueueFamilyIndex >= - dev_data->physDevProperties.queue_family_properties.size())) { + if ((mem_barrier->srcQueueFamilyIndex != VK_QUEUE_FAMILY_IGNORED && + mem_barrier->srcQueueFamilyIndex >= + dev_data->physDevProperties.queue_family_properties.size()) || + (mem_barrier->dstQueueFamilyIndex != VK_QUEUE_FAMILY_IGNORED && + mem_barrier->dstQueueFamilyIndex >= + dev_data->physDevProperties.queue_family_properties.size())) { skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, -- 2.34.1