From d53d70bebece8ef4914a5f524244ea2bb8af0371 Mon Sep 17 00:00:00 2001 From: Jeremy Gebben Date: Tue, 21 Jan 2025 12:48:38 -0700 Subject: [PATCH] object_tracker: Add debug output for testing --- layers/object_tracker/object_tracker_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layers/object_tracker/object_tracker_utils.cpp b/layers/object_tracker/object_tracker_utils.cpp index 5bba1512f6d..c99bd0f7a66 100644 --- a/layers/object_tracker/object_tracker_utils.cpp +++ b/layers/object_tracker/object_tracker_utils.cpp @@ -141,6 +141,11 @@ void Tracker::DestroyObjectSilently(uint64_t object, VulkanObjectType object_typ assert(num_total_objects > 0); num_total_objects--; + if (num_objects[item->second->object_type] <= 0) { + LogError("UNASSIGNED-ObjectTracker-Destroy", handle, loc, + "bad object count when destroying %s Object 0x%" PRIxLEAST64, + string_VulkanObjectType(object_type), object); + } assert(num_objects[item->second->object_type] > 0); num_objects[item->second->object_type]--;