layers: Replace INVALID_EVENT check with OBJECT_INUSE
authorTobin Ehlis <tobine@google.com>
Mon, 18 Jul 2016 20:26:18 +0000 (14:26 -0600)
committerTobin Ehlis <tobine@google.com>
Tue, 19 Jul 2016 19:38:59 +0000 (13:38 -0600)
If an event being destroyed is in use, the correct error enum to use
is DRAWSTATE_OBJECT_INUSE.

layers/core_validation.cpp

index 58e0ee5..9d76eee 100644 (file)
@@ -5070,7 +5070,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const Vk
         if (event_node->in_use.load()) {
             skip_call |= log_msg(
                 dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT,
-                reinterpret_cast<uint64_t &>(event), __LINE__, DRAWSTATE_INVALID_EVENT, "DS",
+                reinterpret_cast<uint64_t &>(event), __LINE__, DRAWSTATE_OBJECT_INUSE, "DS",
                 "Cannot delete event 0x%" PRIx64 " which is in use by a command buffer.", reinterpret_cast<uint64_t &>(event));
         }
         // Any bound cmd buffers are now invalid