aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorJohn Zulauf <jzulauf@lunarg.com>2018-02-20 12:19:28 -0700
committerjzulauf-lunarg <32470354+jzulauf-lunarg@users.noreply.github.com>2018-02-21 07:37:25 -0700
commit7206d0c00d0f553eb9a5d13cc3d239aebde16735 (patch)
tree057fd49b1bf606c32199d53f6dfa94ce907fc94a /layers/core_validation.cpp
parentb1991fd9137e960c06bc2f691e850015032bf13a (diff)
downloadusermoji-7206d0c00d0f553eb9a5d13cc3d239aebde16735.tar.xz
layers: Fix and convert buffer barrier size check
Change buffer barrier size check to compare against the created size of the buffer, not the memory requirements size, and add VUID info to validation. Update test to reflect validation changes. Change-Id: Ib61d6bcd0df449bacd063ece44426ba6196b62e6
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 7216d8e1..96942990 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -7641,14 +7641,14 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB
// TODO: Update this when VUID is defined
skip |= ValidateMemoryIsBoundToBuffer(device_data, buffer_state, funcName, VALIDATION_ERROR_UNDEFINED);
- auto buffer_size = buffer_state->requirements.size;
+ auto buffer_size = buffer_state->createInfo.size;
if (mem_barrier->offset >= 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",
- "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " which is not less than total size 0x%" PRIx64 ".",
- funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset),
- HandleToUint64(buffer_size));
+ HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_01800946, "DS",
+ "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " which is not less than total size 0x%" PRIx64 ". %s",
+ funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), HandleToUint64(buffer_size),
+ validation_error_map[VALIDATION_ERROR_01800946]);
} 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,