From 803a865bda8fdf77c9364f75789f0d4f25f3b5e1 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 20 Jul 2017 17:56:48 -0600 Subject: layers:Check image barrier layout vs attachment This is VALIDATION_ERROR_1b800938. Make sure that the attachment references by current subpass description has a layout that matches image barrier layout. --- layers/core_validation.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 544123fd..ba761dc8 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6311,6 +6311,18 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch "%s and %s. %s", funcName, HandleToUint64(img_barrier.image), string_VkImageLayout(img_barrier.oldLayout), string_VkImageLayout(img_barrier.newLayout), validation_error_map[VALIDATION_ERROR_1b80093a]); + } else { + if (sub_image_found && sub_image_layout != img_barrier.oldLayout) { + 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_1b800938, "CORE", + "%s: Barrier pImageMemoryBarriers[%d].image (0x%" PRIx64 + ") is referenced by the VkSubpassDescription for active subpass (%d) of current renderPass (0x%" PRIx64 + ") as having layout %s, but image barrier has layout %s. %s", + funcName, i, HandleToUint64(img_bar_image), active_subpass, rp_handle, + string_VkImageLayout(img_barrier.oldLayout), string_VkImageLayout(sub_image_layout), + validation_error_map[VALIDATION_ERROR_1b800938]); + } } } if (sub_dep.dependencyFlags != dependency_flags) { -- cgit v1.2.3