From efe6909ca386d196f8ade68e68c57b72ba7d1a07 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Mon, 6 Jul 2015 22:30:28 -0600 Subject: layers: Remove object tracker extensions --- layers/object_track.h | 77 --------------------------------------------------- 1 file changed, 77 deletions(-) (limited to 'layers') diff --git a/layers/object_track.h b/layers/object_track.h index d9cd0875..8dcffcf0 100644 --- a/layers/object_track.h +++ b/layers/object_track.h @@ -818,80 +818,3 @@ explicit_FreeMemory( return result; } - - -// ObjectTracker Extensions - -uint64_t -objTrackGetObjectsCount( - VkDevice device) -{ - return numTotalObjs; -} - -VkResult -objTrackGetObjects( - VkDevice device, - uint64_t objCount, - OBJTRACK_NODE *pObjNodeArray) -{ - // This bool flags if we're pulling all objs or just a single class of objs - // Check the count first thing - uint64_t maxObjCount = numTotalObjs; - if (objCount > maxObjCount) { - log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkObjectType) 0, device, 0, OBJTRACK_OBJCOUNT_MAX_EXCEEDED, "OBJTRACK", - "OBJ ERROR : Received objTrackGetObjects() request for %lu objs, but there are only %lu total objs", objCount, maxObjCount); - return VK_ERROR_INVALID_VALUE; - } - auto it = objMap.begin(); - for (uint64_t i = 0; i < objCount; i++) { - if (objMap.end() == it) { - log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkObjectType) 0, device, 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK", - "OBJ INTERNAL ERROR : Ran out of objs! Should have %lu, but only copied %lu and not the requested %lu.", maxObjCount, i, objCount); - return VK_ERROR_UNKNOWN; - } - memcpy(&pObjNodeArray[i], it->second, sizeof(OBJTRACK_NODE)); - ++it; - } - return VK_SUCCESS; -} - -uint64_t -objTrackGetObjectsOfTypeCount( - VkDevice device, - VkObjectType type) -{ - return numObjs[type]; -} - -VkResult -objTrackGetObjectsOfType( - VkDevice device, - VkObjectType type, - uint64_t objCount, - OBJTRACK_NODE *pObjNodeArray) -{ - // Check the count first thing - uint64_t maxObjCount = numObjs[type]; - if (objCount > maxObjCount) { - log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkObjectType) 0, device, 0, OBJTRACK_OBJCOUNT_MAX_EXCEEDED, "OBJTRACK", - "OBJ ERROR : Received objTrackGetObjects() request for %lu objs, but there are only %lu objs of type %s", - objCount, maxObjCount, string_VkObjectType(type)); - return VK_ERROR_INVALID_VALUE; - } - auto it = objMap.begin(); - for (uint64_t i = 0; i < objCount; i++) { - // Get next object of correct type - while ((objMap.end() != it) && (it->second->objType != type)) - ++it; - if (objMap.end() == it) { - log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkObjectType) 0, device, 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK", - "OBJ INTERNAL ERROR : Ran out of %s objs! Should have %lu, but only copied %lu and not the requested %lu.", - string_VkObjectType(type), maxObjCount, i, objCount); - return VK_ERROR_UNKNOWN; - } - memcpy(&pObjNodeArray[i], it->second, sizeof(OBJTRACK_NODE)); - } - return VK_SUCCESS; -} - -- cgit v1.2.3