aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-07-20 17:56:48 -0600
committerTobin Ehlis <tobine@google.com>2017-07-24 15:28:18 -0600
commit803a865bda8fdf77c9364f75789f0d4f25f3b5e1 (patch)
treec1190386e6520668079c4cc51047670a94eb4435 /layers/core_validation.cpp
parentc9ab1cb8d6eded40456129fc760974337304852a (diff)
downloadusermoji-803a865bda8fdf77c9364f75789f0d4f25f3b5e1.tar.xz
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.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp12
1 files changed, 12 insertions, 0 deletions
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) {