From d4ae6e51952a3e8e62bbc909912db014ae33fd66 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 24 Jul 2017 11:35:57 -0600 Subject: layers:Verify image barrier queueFamilyIndices This is VALIDATION_ERROR_1b80093c. For image barrier in renderPass both src & dst queueFamilyIndex members must be VK_QUEUE_FAMILY_IGNORED. --- layers/core_validation.cpp | 9 +++++++++ layers/vk_validation_error_database.txt | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 1fd79b84..5ac804ae 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6181,6 +6181,15 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char funcName, i, img_dst_access_mask, sub_dst_access_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b800930]); } + if (VK_QUEUE_FAMILY_IGNORED != img_barrier.srcQueueFamilyIndex || + VK_QUEUE_FAMILY_IGNORED != img_barrier.dstQueueFamilyIndex) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + rp_handle, __LINE__, VALIDATION_ERROR_1b80093c, "CORE", + "%s: Barrier pImageMemoryBarriers[%d].srcQueueFamilyIndex is %d and " + "pImageMemoryBarriers[%d].dstQueueFamilyIndex is %d but both must be VK_QUEUE_FAMILY_IGNORED. %s", + funcName, i, img_barrier.srcQueueFamilyIndex, i, img_barrier.dstQueueFamilyIndex, + validation_error_map[VALIDATION_ERROR_1b80093c]); + } // TODO : Secondary CBs could have null framebuffer so just skipping that case for now. Need to correctly // handle that case at ExecuteCBs time const auto &fb_state = GetFramebufferState(device_data, cb_state->activeFramebuffer); diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index 373f3ad7..0693cffa 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -2123,7 +2123,7 @@ VALIDATION_ERROR_1b800934~^~Y~^~RenderPassBarrierConflicts~^~vkCmdPipelineBarrie VALIDATION_ERROR_1b800936~^~Y~^~RenderPassBarrierConflicts~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-image-01179~^~core~^~The spec valid usage text states 'If vkCmdPipelineBarrier is called within a render pass instance, the image member of any element of pImageMemoryBarriers must be equal to one of the elements of pAttachments that the current framebuffer was created with, that is also referred to by one of the elements of the pColorAttachments, pResolveAttachments or pDepthStencilAttachment members of the VkSubpassDescription instance that the current subpass was created with' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-image-01179)~^~ VALIDATION_ERROR_1b800938~^~Y~^~RenderPassBarrierConflicts~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-oldLayout-01180~^~core~^~The spec valid usage text states 'If vkCmdPipelineBarrier is called within a render pass instance, the oldLayout and newLayout members of any element of pImageMemoryBarriers must be equal to the layout member of an element of the pColorAttachments, pResolveAttachments or pDepthStencilAttachment members of the VkSubpassDescription instance that the current subpass was created with, that refers to the same image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-oldLayout-01180)~^~ VALIDATION_ERROR_1b80093a~^~Y~^~RenderPassBarrierConflicts~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-oldLayout-01181~^~core~^~The spec valid usage text states 'If vkCmdPipelineBarrier is called within a render pass instance, the oldLayout and newLayout members of an element of pImageMemoryBarriers must be equal' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-oldLayout-01181)~^~ -VALIDATION_ERROR_1b80093c~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182~^~core~^~The spec valid usage text states 'If vkCmdPipelineBarrier is called within a render pass instance, the srcQueueFamilyIndex and dstQueueFamilyIndex members of any element of pImageMemoryBarriers must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182)~^~ +VALIDATION_ERROR_1b80093c~^~Y~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182~^~core~^~The spec valid usage text states 'If vkCmdPipelineBarrier is called within a render pass instance, the srcQueueFamilyIndex and dstQueueFamilyIndex members of any element of pImageMemoryBarriers must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182)~^~ VALIDATION_ERROR_1b80093e~^~Y~^~InvalidBarriers~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-srcStageMask-01183~^~core~^~The spec valid usage text states 'Any pipeline stage included in srcStageMask or dstStageMask must be supported by the capabilities of the queue family specified by the queueFamilyIndex member of the VkCommandPoolCreateInfo structure that was used to create the VkCommandPool that commandBuffer was allocated from, as specified in the table of supported pipeline stages.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcStageMask-01183)~^~ VALIDATION_ERROR_1b800940~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-pMemoryBarriers-01184~^~core~^~The spec valid usage text states 'Any given element of pMemoryBarriers, pBufferMemoryBarriers or pImageMemoryBarriers must not have any access flag included in its srcAccessMask member if that bit is not supported by any of the pipeline stages in srcStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pMemoryBarriers-01184)~^~ VALIDATION_ERROR_1b800942~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-vkCmdPipelineBarrier-pMemoryBarriers-01185~^~core~^~The spec valid usage text states 'Any given element of pMemoryBarriers, pBufferMemoryBarriers or pImageMemoryBarriers must not have any access flag included in its dstAccessMask member if that bit is not supported by any of the pipeline stages in dstStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pMemoryBarriers-01185)~^~ -- cgit v1.2.3