From 6a476470d16423d571778b603e53d953a6cc6d92 Mon Sep 17 00:00:00 2001 From: Michael Lentine Date: Fri, 10 Feb 2017 14:57:15 -0600 Subject: layers: Change mem map error to warning Currently the spec allows memory to be mapped regardless of format. However, because the memory cannot be used by the device in a predicable way unless the format is PREINITIALIZED or GENERAL we still need a warning here. Change-Id: Ie50b21c0840d97409e40d7f9187f34b9552050f2 --- layers/buffer_validation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'layers/buffer_validation.cpp') diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 1966faf5..49b7a05e 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -2017,10 +2017,10 @@ bool ValidateMapImageLayouts(core_validation::layer_data *device_data, VkDevice if (FindLayouts(device_data, VkImage(image_handle), layouts)) { for (auto layout : layouts) { if (layout != VK_IMAGE_LAYOUT_PREINITIALIZED && layout != VK_IMAGE_LAYOUT_GENERAL) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Cannot map an image with layout %s. Only " - "GENERAL or PREINITIALIZED are supported.", + "Mapping an image with layout %s can result in undefined behavior if this memory is " + "used by the device. Only GENERAL or PREINITIALIZED should be used.", string_VkImageLayout(layout)); } } -- cgit v1.2.3