aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorJohn Zulauf <jzulauf@lunarg.com>2018-02-20 14:33:18 -0700
committerjzulauf-lunarg <32470354+jzulauf-lunarg@users.noreply.github.com>2018-02-21 07:37:25 -0700
commit31df19c3ec4e7ac94363102bb6b8618c7bb79718 (patch)
tree7dd23fffdf01fc25ef4af3d5c59968f34a19d083 /layers/core_validation.cpp
parent7206d0c00d0f553eb9a5d13cc3d239aebde16735 (diff)
downloadusermoji-31df19c3ec4e7ac94363102bb6b8618c7bb79718.tar.xz
layers: Convert 2 barrier checks to VUID notation
Converted two validation checks for image and buffer barriers to the VALIDATION_ERROR_xxxxxxxx / VUID notation and changed unit tests to also specify desired failure in same form. VALIDATION_ERROR_0a00095c VUID-VkImageMemoryBarrier-newLayout-01198 VALIDATION_ERROR_0180094a VUID-VkBufferMemoryBarrier-size-01189 Change-Id: I20387bfec89872825f7311e443105aecacb84000
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 96942990..42e9d3d9 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -7594,8 +7594,9 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB
if (mem_barrier->newLayout == VK_IMAGE_LAYOUT_UNDEFINED || mem_barrier->newLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) {
skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
- HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS",
- "%s: Image Layout cannot be transitioned to UNDEFINED or PREINITIALIZED.", funcName);
+ HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_0a00095c, "DS",
+ "%s: Image Layout cannot be transitioned to UNDEFINED or PREINITIALIZED. %s", funcName,
+ validation_error_map[VALIDATION_ERROR_0a00095c]);
}
if (image_data) {
@@ -7652,11 +7653,12 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB
} else if (mem_barrier->size != VK_WHOLE_SIZE && (mem_barrier->offset + mem_barrier->size > buffer_size)) {
skip |=
log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
- HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS",
+ HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_0180094a, "DS",
"%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " and size 0x%" PRIx64
- " whose sum is greater than total size 0x%" PRIx64 ".",
+ " whose sum is greater than total size 0x%" PRIx64 ". %s",
funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset),
- HandleToUint64(mem_barrier->size), HandleToUint64(buffer_size));
+ HandleToUint64(mem_barrier->size), HandleToUint64(buffer_size),
+ validation_error_map[VALIDATION_ERROR_0180094a]);
}
}
}