From 85b02a2eca004cddf3a8f56dab2a5ee27f8b72c9 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 10 Mar 2016 08:53:58 -0700 Subject: layers: GH96 Fix error messages for bad layout Instead of printing attachements as #s in the error messages, print the layout string. --- layers/draw_state.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'layers') diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 338e1b37..ac36dc92 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -7263,8 +7263,8 @@ VkBool32 ValidateLayouts(const layer_data *my_data, VkDevice device, const VkRen } else { skip |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Layout for input attachment is %d but can only be READ_ONLY_OPTIMAL or GENERAL.", - subpass.pInputAttachments[j].attachment); + "Layout for input attachment is %s but can only be READ_ONLY_OPTIMAL or GENERAL.", + string_VkImageLayout(subpass.pInputAttachments[j].layout)); } } } @@ -7278,8 +7278,8 @@ VkBool32 ValidateLayouts(const layer_data *my_data, VkDevice device, const VkRen } else { skip |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Layout for color attachment is %d but can only be COLOR_ATTACHMENT_OPTIMAL or GENERAL.", - subpass.pColorAttachments[j].attachment); + "Layout for color attachment is %s but can only be COLOR_ATTACHMENT_OPTIMAL or GENERAL.", + string_VkImageLayout(subpass.pColorAttachments[j].layout)); } } } @@ -7294,8 +7294,8 @@ VkBool32 ValidateLayouts(const layer_data *my_data, VkDevice device, const VkRen skip |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Layout for depth attachment is %d but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL or GENERAL.", - subpass.pDepthStencilAttachment->attachment); + "Layout for depth attachment is %s but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL or GENERAL.", + string_VkImageLayout(subpass.pDepthStencilAttachment->layout)); } } } -- cgit v1.2.3