aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-03-25 15:22:33 -0600
committerMark Lobodzinski <mark@lunarg.com>2016-03-29 15:27:59 -0600
commitede167fb7d81f184eca756a642fdf09ceb4d2035 (patch)
treeea905b4f98b92daf3ad7bca743e038e372dbeed3 /layers/core_validation.cpp
parent03dc6579a55465c9ac5b3464ef4ab0630649c5b3 (diff)
downloadusermoji-ede167fb7d81f184eca756a642fdf09ceb4d2035.tar.xz
layers: Improve core_validation image layout error message
Change-Id: I1e22ef9be4b1d8b22765e1150f828904334380eb
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 950dd760..6948facf 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -4880,17 +4880,20 @@ VkBool32 ValidateCmdBufImageLayouts(VkCommandBuffer cmdBuffer) {
if (cb_image_data.second.initialLayout == VK_IMAGE_LAYOUT_UNDEFINED) {
// TODO: Set memory invalid which is in mem_tracker currently
} else if (imageLayout != cb_image_data.second.initialLayout) {
- skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
- VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT,
- "DS", "Cannot submit cmd buffer using image with layout %s when "
- "first use is %s.",
- string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout));
+ skip_call |=
+ log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ reinterpret_cast<uint64_t &>(cmdBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS",
+ "Cannot submit cmd buffer using image (%" PRIx64 ") with layout %s when "
+ "first use is %s.",
+ reinterpret_cast<const uint64_t &>(cb_image_data.first.image), string_VkImageLayout(imageLayout),
+ string_VkImageLayout(cb_image_data.second.initialLayout));
}
SetLayout(dev_data, cb_image_data.first, cb_image_data.second.layout);
}
}
return skip_call;
}
+
// Track which resources are in-flight by atomically incrementing their "in_use" count
VkBool32 validateAndIncrementResources(layer_data *my_data, GLOBAL_CB_NODE *pCB) {
VkBool32 skip_call = VK_FALSE;