aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorCort <github@dangerware.org>2017-01-17 18:09:09 -0800
committerCort <cdwfs@users.noreply.github.com>2017-02-14 14:22:47 -0800
commitd459ef9545644111ba7732d81954924fb7d754bc (patch)
treea98d3c191136706d9943a3a00983adfc08c562dd /layers/core_validation.cpp
parent4453339dec02bc08a8d4104ebeb3c6737fdeffcf (diff)
downloadusermoji-d459ef9545644111ba7732d81954924fb7d754bc.tar.xz
layers: Add VU 791,803 (bind mem w/existing binding)
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index fcf7773e..319c7974 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -759,13 +759,19 @@ static bool SetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint64_t han
if (mem_info) {
DEVICE_MEM_INFO *prev_binding = GetMemObjInfo(dev_data, mem_binding->binding.mem);
if (prev_binding) {
- // TODO: VALIDATION_ERROR_00791 and VALIDATION_ERROR_00803
+ UNIQUE_VALIDATION_ERROR_CODE error_code = VALIDATION_ERROR_00803;
+ if (strcmp(apiName, "vkBindBufferMemory") == 0) {
+ error_code = VALIDATION_ERROR_00791;
+ } else {
+ assert(strcmp(apiName, "vkBindImageMemory") == 0);
+ }
skip_call |=
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT,
- reinterpret_cast<uint64_t &>(mem), __LINE__, MEMTRACK_REBIND_OBJECT, "MEM",
+ reinterpret_cast<uint64_t &>(mem), __LINE__, error_code, "MEM",
"In %s, attempting to bind memory (0x%" PRIxLEAST64 ") to object (0x%" PRIxLEAST64
- ") which has already been bound to mem object 0x%" PRIxLEAST64,
- apiName, reinterpret_cast<uint64_t &>(mem), handle, reinterpret_cast<uint64_t &>(prev_binding->mem));
+ ") which has already been bound to mem object 0x%" PRIxLEAST64 ". %s",
+ apiName, reinterpret_cast<uint64_t &>(mem), handle, reinterpret_cast<uint64_t &>(prev_binding->mem),
+ validation_error_map[error_code]);
} else if (mem_binding->binding.mem == MEMORY_UNBOUND) {
skip_call |=
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT,