diff options
| author | Cort <github@dangerware.org> | 2017-01-17 18:09:09 -0800 |
|---|---|---|
| committer | Cort <cdwfs@users.noreply.github.com> | 2017-02-14 14:22:47 -0800 |
| commit | d459ef9545644111ba7732d81954924fb7d754bc (patch) | |
| tree | a98d3c191136706d9943a3a00983adfc08c562dd /layers | |
| parent | 4453339dec02bc08a8d4104ebeb3c6737fdeffcf (diff) | |
| download | usermoji-d459ef9545644111ba7732d81954924fb7d754bc.tar.xz | |
layers: Add VU 791,803 (bind mem w/existing binding)
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/core_validation.cpp | 14 | ||||
| -rw-r--r-- | layers/vk_validation_error_database.txt | 4 |
2 files changed, 12 insertions, 6 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, diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index e0be081f..1462cfe3 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -779,7 +779,7 @@ VALIDATION_ERROR_00787~^~Y~^~None~^~vkGetImageMemoryRequirements~^~For more info VALIDATION_ERROR_00788~^~Y~^~CreateUnknownObject~^~vkGetImageMemoryRequirements~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetImageMemoryRequirements)~^~implicit VALIDATION_ERROR_00789~^~N~^~Unknown~^~vkGetImageMemoryRequirements~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'pMemoryRequirements must be a pointer to a VkMemoryRequirements structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetImageMemoryRequirements)~^~implicit VALIDATION_ERROR_00790~^~N~^~Unknown~^~vkGetImageMemoryRequirements~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'image must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetImageMemoryRequirements)~^~implicit -VALIDATION_ERROR_00791~^~N~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~ +VALIDATION_ERROR_00791~^~Y~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~ VALIDATION_ERROR_00792~^~Y~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~ VALIDATION_ERROR_00793~^~N~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~ VALIDATION_ERROR_00794~^~Y~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~ @@ -791,7 +791,7 @@ VALIDATION_ERROR_00799~^~Y~^~VertexBufferInvalid~^~vkBindBufferMemory~^~For more VALIDATION_ERROR_00800~^~Y~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~implicit VALIDATION_ERROR_00801~^~N~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'buffer must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~implicit VALIDATION_ERROR_00802~^~N~^~Unknown~^~vkBindBufferMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindBufferMemory)~^~implicit -VALIDATION_ERROR_00803~^~N~^~Unknown~^~vkBindImageMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindImageMemory)~^~ +VALIDATION_ERROR_00803~^~Y~^~Unknown~^~vkBindImageMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindImageMemory)~^~ VALIDATION_ERROR_00804~^~Y~^~Unknown~^~vkBindImageMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindImageMemory)~^~ VALIDATION_ERROR_00805~^~N~^~Unknown~^~vkBindImageMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindImageMemory)~^~ VALIDATION_ERROR_00806~^~Y~^~Unknown~^~vkBindImageMemory~^~For more information refer to Vulkan Spec Section '11.6. Resource Memory Association' which states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkBindImageMemory)~^~ |
