aboutsummaryrefslogtreecommitdiff
path: root/layers/buffer_validation.cpp
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2017-02-10 14:57:15 -0600
committerMark Lobodzinski <mark@lunarg.com>2017-02-13 08:53:42 -0700
commit6a476470d16423d571778b603e53d953a6cc6d92 (patch)
tree5a9e8d63f65a6d2faaa1361e6876b6b567d4a630 /layers/buffer_validation.cpp
parentf6f11f18351395e24b53043b766b4802f526e252 (diff)
downloadusermoji-6a476470d16423d571778b603e53d953a6cc6d92.tar.xz
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
Diffstat (limited to 'layers/buffer_validation.cpp')
-rw-r--r--layers/buffer_validation.cpp6
1 files changed, 3 insertions, 3 deletions
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));
}
}