aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-12-22 13:40:45 -0700
committerTobin Ehlis <tobine@google.com>2016-12-23 14:39:34 -0700
commitdc0a5f8338a57eb4cd3d1a05cb136647cdd20b3d (patch)
tree7147e5a9d20367f92284d76c3fca2afbfac8d11c
parentdc5ac6eb4d9d184a729f85d63c340cc44e486040 (diff)
downloadusermoji-dc0a5f8338a57eb4cd3d1a05cb136647cdd20b3d.tar.xz
layers:Remove redundant check
Remove valid buffer check from descriptor_sets.cpp that's already handled in object_tracker.
-rw-r--r--layers/descriptor_sets.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 7f14801a..2e319585 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -1287,16 +1287,10 @@ bool cvdescriptorset::DescriptorSet::ValidateBufferUsage(BUFFER_STATE const *buf
// If there's an error, update the error_msg string with details and return false, else return true
bool cvdescriptorset::DescriptorSet::ValidateBufferUpdate(VkDescriptorBufferInfo const *buffer_info, VkDescriptorType type,
UNIQUE_VALIDATION_ERROR_CODE *error_code, std::string *error_msg) const {
- // TODO : Defaulting to 00962 for all cases here. Need to create new error codes for a few cases below.
- *error_code = VALIDATION_ERROR_00962;
// First make sure that buffer is valid
auto buffer_node = getBufferState(device_data_, buffer_info->buffer);
- if (!buffer_node) {
- std::stringstream error_str;
- error_str << "Invalid VkBuffer: " << buffer_info->buffer;
- *error_msg = error_str.str();
- return false;
- }
+ // Any invalid buffer should already be caught by object_tracker
+ assert(buffer_node);
if (ValidateMemoryIsBoundToBuffer(device_data_, buffer_node, "vkUpdateDescriptorSets()", VALIDATION_ERROR_02525)) {
*error_code = VALIDATION_ERROR_02525;
*error_msg = "No memory bound to buffer.";