Don't complain about unused vertex buffers being VK_NULL_HANDLE
authorChris Forbes <chrisforbes@google.com>
Wed, 24 Jan 2018 18:53:21 +0000 (10:53 -0800)
committerChris Forbes <chrisf@ijw.co.nz>
Fri, 26 Jan 2018 17:54:45 +0000 (09:54 -0800)
layers/core_validation.cpp

index 6423454..b747add 100644 (file)
@@ -2510,7 +2510,7 @@ static bool validateResources(layer_data *dev_data, GLOBAL_CB_NODE *cb_node) {
     for (auto drawDataElement : cb_node->drawData) {
         for (auto buffer : drawDataElement.buffers) {
             auto buffer_state = GetBufferState(dev_data, buffer);
-            if (!buffer_state) {
+            if (buffer != VK_NULL_HANDLE && !buffer_state) {
                 skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT,
                                 HandleToUint64(buffer), __LINE__, DRAWSTATE_INVALID_BUFFER, "DS",
                                 "Cannot submit cmd buffer using deleted buffer 0x%" PRIx64 ".", HandleToUint64(buffer));