diff options
| author | Tony Barbour <tony@LunarG.com> | 2015-04-21 09:18:02 -0600 |
|---|---|---|
| committer | Tony Barbour <tony@LunarG.com> | 2015-04-21 10:36:59 -0600 |
| commit | 14da561900aeb0ad061f4edaaa0f406f99958e80 (patch) | |
| tree | f1e6dcf712dd6d630027d80b3de1cbead5c66145 | |
| parent | f57e73d2d642b0b21925428ed649a203e8b60bfd (diff) | |
| download | usermoji-14da561900aeb0ad061f4edaaa0f406f99958e80.tar.xz | |
layers: Using objects instead of pointers - rename pObj
| -rw-r--r-- | layers/object_track.h | 2 | ||||
| -rwxr-xr-x | vk-layer-generate.py | 106 |
2 files changed, 54 insertions, 54 deletions
diff --git a/layers/object_track.h b/layers/object_track.h index 88996cce..c9c90059 100644 --- a/layers/object_track.h +++ b/layers/object_track.h @@ -174,7 +174,7 @@ static const char* string_VK_OBJECT_TYPE(VK_OBJECT_TYPE type) { } typedef struct _OBJTRACK_NODE { - VkObject pObj; + VkObject vkObj; VK_OBJECT_TYPE objType; uint64_t numUses; OBJECT_STATUS status; diff --git a/vk-layer-generate.py b/vk-layer-generate.py index e8f86f0b..a9204629 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -898,7 +898,7 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' objNode* pTrav = pGlobalHead;') header_txt.append(' printf("=====GLOBAL OBJECT LIST (%lu total objs):\\n", numTotalObjs);') header_txt.append(' while (pTrav) {') - header_txt.append(' printf(" ObjNode (%p) w/ %s obj 0x%" PRId64 " has pNextGlobal %p\\n", (void*)pTrav, string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.pObj, (void*)pTrav->pNextGlobal);') + header_txt.append(' printf(" ObjNode (%p) w/ %s obj 0x%" PRId64 " has pNextGlobal %p\\n", (void*)pTrav, string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.vkObj, (void*)pTrav->pNextGlobal);') header_txt.append(' pTrav = pTrav->pNextGlobal;') header_txt.append(' }') header_txt.append(' for (uint32_t i = 0; i < VkNumObjectType; i++) {') @@ -906,18 +906,18 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' if (pTrav) {') header_txt.append(' printf("=====%s OBJECT LIST (%lu objs):\\n", string_VK_OBJECT_TYPE(pTrav->obj.objType), numObjs[i]);') header_txt.append(' while (pTrav) {') - header_txt.append(' printf(" ObjNode (%p) w/ %s obj 0x%" PRId64 " has pNextObj %p\\n", (void*)pTrav, string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.pObj, (void*)pTrav->pNextObj);') + header_txt.append(' printf(" ObjNode (%p) w/ %s obj 0x%" PRId64 " has pNextObj %p\\n", (void*)pTrav, string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.vkObj, (void*)pTrav->pNextObj);') header_txt.append(' pTrav = pTrav->pNextObj;') header_txt.append(' }') header_txt.append(' }') header_txt.append(' }') header_txt.append('}') - header_txt.append('static void ll_insert_obj(VkObject pObj, VK_OBJECT_TYPE objType) {') + header_txt.append('static void ll_insert_obj(VkObject vkObj, VK_OBJECT_TYPE objType) {') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJ[%llu] : CREATE %s object 0x%" PRId64, object_track_index++, string_VK_OBJECT_TYPE(objType), pObj);') - header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJ[%llu] : CREATE %s object 0x%" PRId64, object_track_index++, string_VK_OBJECT_TYPE(objType), vkObj);') + header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') header_txt.append(' objNode* pNewObjNode = (objNode*)malloc(sizeof(objNode));') - header_txt.append(' pNewObjNode->obj.pObj = pObj;') + header_txt.append(' pNewObjNode->obj.vkObj = vkObj;') header_txt.append(' pNewObjNode->obj.objType = objType;') header_txt.append(' pNewObjNode->obj.status = OBJSTATUS_NONE;') header_txt.append(' pNewObjNode->obj.numUses = 0;') @@ -933,34 +933,34 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' //sprintf(str, "OBJ_STAT : %lu total objs & %lu %s objs.", numTotalObjs, numObjs[objType], string_VK_OBJECT_TYPE(objType));') header_txt.append(' if (0) ll_print_lists();') header_txt.append('}') - header_txt.append('static void ll_increment_use_count(VkObject pObj, VK_OBJECT_TYPE objType) {') + header_txt.append('static void ll_increment_use_count(VkObject vkObj, VK_OBJECT_TYPE objType) {') header_txt.append(' objNode *pTrav = pObjectHead[objType];') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' pTrav->obj.numUses++;') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJ[%llu] : USING %s object 0x%" PRId64 " (%lu total uses)", object_track_index++, string_VK_OBJECT_TYPE(objType), pObj, pTrav->obj.numUses);') - header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJ[%llu] : USING %s object 0x%" PRId64 " (%lu total uses)", object_track_index++, string_VK_OBJECT_TYPE(objType), vkObj, pTrav->obj.numUses);') + header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') header_txt.append(' return;') header_txt.append(' }') header_txt.append(' pTrav = pTrav->pNextObj;') header_txt.append(' }') header_txt.append(' // If we do not find obj, insert it and then increment count') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to increment count for obj 0x%" PRId64 ", will add to list as %s type and increment count", pObj, string_VK_OBJECT_TYPE(objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_WARNING, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to increment count for obj 0x%" PRId64 ", will add to list as %s type and increment count", vkObj, string_VK_OBJECT_TYPE(objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_WARNING, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') header_txt.append('') - header_txt.append(' ll_insert_obj(pObj, objType);') - header_txt.append(' ll_increment_use_count(pObj, objType);') + header_txt.append(' ll_insert_obj(vkObj, objType);') + header_txt.append(' ll_increment_use_count(vkObj, objType);') header_txt.append('}') header_txt.append('// We usually do not know Obj type when we destroy it so have to fetch') header_txt.append('// Type from global list w/ ll_destroy_obj()') header_txt.append('// and then do the full removal from both lists w/ ll_remove_obj_type()') - header_txt.append('static void ll_remove_obj_type(VkObject pObj, VK_OBJECT_TYPE objType) {') + header_txt.append('static void ll_remove_obj_type(VkObject vkObj, VK_OBJECT_TYPE objType) {') header_txt.append(' objNode *pTrav = pObjectHead[objType];') header_txt.append(' objNode *pPrev = pObjectHead[objType];') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' pPrev->pNextObj = pTrav->pNextObj;') header_txt.append(' // update HEAD of Obj list as needed') header_txt.append(' if (pObjectHead[objType] == pTrav)') @@ -968,25 +968,25 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' assert(numObjs[objType] > 0);') header_txt.append(' numObjs[objType]--;') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJ[%llu] : DESTROY %s object 0x%" PRId64, object_track_index++, string_VK_OBJECT_TYPE(objType), pObj);') - header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJ[%llu] : DESTROY %s object 0x%" PRId64, object_track_index++, string_VK_OBJECT_TYPE(objType), vkObj);') + header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') header_txt.append(' return;') header_txt.append(' }') header_txt.append(' pPrev = pTrav;') header_txt.append(' pTrav = pTrav->pNextObj;') header_txt.append(' }') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJ INTERNAL ERROR : Obj 0x%" PRId64 " was in global list but not in %s list", pObj, string_VK_OBJECT_TYPE(objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJ INTERNAL ERROR : Obj 0x%" PRId64 " was in global list but not in %s list", vkObj, string_VK_OBJECT_TYPE(objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK", str);') header_txt.append('}') header_txt.append('// Parse global list to find obj type, then remove obj from obj type list, finally') header_txt.append('// remove obj from global list') - header_txt.append('static void ll_destroy_obj(VkObject pObj) {') + header_txt.append('static void ll_destroy_obj(VkObject vkObj) {') header_txt.append(' objNode *pTrav = pGlobalHead;') header_txt.append(' objNode *pPrev = pGlobalHead;') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') - header_txt.append(' ll_remove_obj_type(pObj, pTrav->obj.objType);') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') + header_txt.append(' ll_remove_obj_type(vkObj, pTrav->obj.objType);') header_txt.append(' pPrev->pNextGlobal = pTrav->pNextGlobal;') header_txt.append(' // update HEAD of global list if needed') header_txt.append(' if (pGlobalHead == pTrav)') @@ -994,8 +994,8 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' assert(numTotalObjs > 0);') header_txt.append(' numTotalObjs--;') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJ_STAT Removed %s obj 0x%" PRId64 " that was used %lu times (%lu total objs remain & %lu %s objs).", string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.pObj, pTrav->obj.numUses, numTotalObjs, numObjs[pTrav->obj.objType], string_VK_OBJECT_TYPE(pTrav->obj.objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJ_STAT Removed %s obj 0x%" PRId64 " that was used %lu times (%lu total objs remain & %lu %s objs).", string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.vkObj, pTrav->obj.numUses, numTotalObjs, numObjs[pTrav->obj.objType], string_VK_OBJECT_TYPE(pTrav->obj.objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_NONE, "OBJTRACK", str);') header_txt.append(' free(pTrav);') header_txt.append(' return;') header_txt.append(' }') @@ -1003,15 +1003,15 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' pTrav = pTrav->pNextGlobal;') header_txt.append(' }') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to remove obj 0x%" PRId64 ". Was it created? Has it already been destroyed?", pObj);') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_DESTROY_OBJECT_FAILED, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to remove obj 0x%" PRId64 ". Was it created? Has it already been destroyed?", vkObj);') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_DESTROY_OBJECT_FAILED, "OBJTRACK", str);') header_txt.append('}') header_txt.append('// Set selected flag state for an object node') - header_txt.append('static void set_status(VkObject pObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_flag) {') - header_txt.append(' if (pObj != VK_NULL_HANDLE) {') + header_txt.append('static void set_status(VkObject vkObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_flag) {') + header_txt.append(' if (vkObj != VK_NULL_HANDLE) {') header_txt.append(' objNode *pTrav = pObjectHead[objType];') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' pTrav->obj.status |= status_flag;') header_txt.append(' return;') header_txt.append(' }') @@ -1019,17 +1019,17 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' }') header_txt.append(' // If we do not find it print an error') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to set status for non-existent object 0x%" PRId64 " of %s type", pObj, string_VK_OBJECT_TYPE(objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to set status for non-existent object 0x%" PRId64 " of %s type", vkObj, string_VK_OBJECT_TYPE(objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') header_txt.append(' }'); header_txt.append('}') header_txt.append('') header_txt.append('// Track selected state for an object node') - header_txt.append('static void track_object_status(VkObject pObj, VkStateBindPoint stateBindPoint) {') + header_txt.append('static void track_object_status(VkObject vkObj, VkStateBindPoint stateBindPoint) {') header_txt.append(' objNode *pTrav = pObjectHead[VkObjectTypeCmdBuffer];') header_txt.append('') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' if (stateBindPoint == VK_STATE_BIND_POINT_VIEWPORT) {') header_txt.append(' pTrav->obj.status |= OBJSTATUS_VIEWPORT_BOUND;') header_txt.append(' } else if (stateBindPoint == VK_STATE_BIND_POINT_RASTER) {') @@ -1045,15 +1045,15 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' }') header_txt.append(' // If we do not find it print an error') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to track status for non-existent Command Buffer object 0x%" PRId64, pObj);') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to track status for non-existent Command Buffer object 0x%" PRId64, vkObj);') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') header_txt.append('}') header_txt.append('') header_txt.append('// Reset selected flag state for an object node') - header_txt.append('static void reset_status(VkObject pObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_flag) {') + header_txt.append('static void reset_status(VkObject vkObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_flag) {') header_txt.append(' objNode *pTrav = pObjectHead[objType];') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' pTrav->obj.status &= ~status_flag;') header_txt.append(' return;') header_txt.append(' }') @@ -1061,19 +1061,19 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' }') header_txt.append(' // If we do not find it print an error') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to reset status for non-existent object 0x%" PRId64 " of %s type", pObj, string_VK_OBJECT_TYPE(objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to reset status for non-existent object 0x%" PRId64 " of %s type", vkObj, string_VK_OBJECT_TYPE(objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') header_txt.append('}') header_txt.append('') header_txt.append('// Check object status for selected flag state') - header_txt.append('static bool32_t validate_status(VkObject pObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_mask, OBJECT_STATUS status_flag, VK_DBG_MSG_TYPE error_level, OBJECT_TRACK_ERROR error_code, char* fail_msg) {') + header_txt.append('static bool32_t validate_status(VkObject vkObj, VK_OBJECT_TYPE objType, OBJECT_STATUS status_mask, OBJECT_STATUS status_flag, VK_DBG_MSG_TYPE error_level, OBJECT_TRACK_ERROR error_code, char* fail_msg) {') header_txt.append(' objNode *pTrav = pObjectHead[objType];') header_txt.append(' while (pTrav) {') - header_txt.append(' if (pTrav->obj.pObj == pObj) {') + header_txt.append(' if (pTrav->obj.vkObj == vkObj) {') header_txt.append(' if ((pTrav->obj.status & status_mask) != status_flag) {') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "OBJECT VALIDATION WARNING: %s object 0x%" PRId64 ": %s", string_VK_OBJECT_TYPE(objType), pObj, fail_msg);') - header_txt.append(' layerCbMsg(error_level, VK_VALIDATION_LEVEL_0, pObj, 0, error_code, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "OBJECT VALIDATION WARNING: %s object 0x%" PRId64 ": %s", string_VK_OBJECT_TYPE(objType), vkObj, fail_msg);') + header_txt.append(' layerCbMsg(error_level, VK_VALIDATION_LEVEL_0, vkObj, 0, error_code, "OBJTRACK", str);') header_txt.append(' return VK_FALSE;') header_txt.append(' }') header_txt.append(' return VK_TRUE;') @@ -1084,17 +1084,17 @@ class ObjectTrackerSubcommand(Subcommand): header_txt.append(' objType != VkObjectTypeSwapChainMemoryWSI) {') header_txt.append(' // If we do not find it print an error') header_txt.append(' char str[1024];') - header_txt.append(' sprintf(str, "Unable to obtain status for non-existent object 0x%" PRId64 " of %s type", pObj, string_VK_OBJECT_TYPE(objType));') - header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, pObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') + header_txt.append(' sprintf(str, "Unable to obtain status for non-existent object 0x%" PRId64 " of %s type", vkObj, string_VK_OBJECT_TYPE(objType));') + header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);') header_txt.append(' }') header_txt.append(' return VK_FALSE;') header_txt.append('}') header_txt.append('') - header_txt.append('static void validate_draw_state_flags(VkObject pObj) {') - header_txt.append(' validate_status(pObj, VkObjectTypeCmdBuffer, OBJSTATUS_VIEWPORT_BOUND, OBJSTATUS_VIEWPORT_BOUND, VK_DBG_MSG_ERROR, OBJTRACK_VIEWPORT_NOT_BOUND, "Viewport object not bound to this command buffer");') - header_txt.append(' validate_status(pObj, VkObjectTypeCmdBuffer, OBJSTATUS_RASTER_BOUND, OBJSTATUS_RASTER_BOUND, VK_DBG_MSG_ERROR, OBJTRACK_RASTER_NOT_BOUND, "Raster object not bound to this command buffer");') - header_txt.append(' validate_status(pObj, VkObjectTypeCmdBuffer, OBJSTATUS_COLOR_BLEND_BOUND, OBJSTATUS_COLOR_BLEND_BOUND, VK_DBG_MSG_UNKNOWN, OBJTRACK_COLOR_BLEND_NOT_BOUND, "Color-blend object not bound to this command buffer");') - header_txt.append(' validate_status(pObj, VkObjectTypeCmdBuffer, OBJSTATUS_DEPTH_STENCIL_BOUND, OBJSTATUS_DEPTH_STENCIL_BOUND, VK_DBG_MSG_UNKNOWN, OBJTRACK_DEPTH_STENCIL_NOT_BOUND, "Depth-stencil object not bound to this command buffer");') + header_txt.append('static void validate_draw_state_flags(VkObject vkObj) {') + header_txt.append(' validate_status(vkObj, VkObjectTypeCmdBuffer, OBJSTATUS_VIEWPORT_BOUND, OBJSTATUS_VIEWPORT_BOUND, VK_DBG_MSG_ERROR, OBJTRACK_VIEWPORT_NOT_BOUND, "Viewport object not bound to this command buffer");') + header_txt.append(' validate_status(vkObj, VkObjectTypeCmdBuffer, OBJSTATUS_RASTER_BOUND, OBJSTATUS_RASTER_BOUND, VK_DBG_MSG_ERROR, OBJTRACK_RASTER_NOT_BOUND, "Raster object not bound to this command buffer");') + header_txt.append(' validate_status(vkObj, VkObjectTypeCmdBuffer, OBJSTATUS_COLOR_BLEND_BOUND, OBJSTATUS_COLOR_BLEND_BOUND, VK_DBG_MSG_UNKNOWN, OBJTRACK_COLOR_BLEND_NOT_BOUND, "Color-blend object not bound to this command buffer");') + header_txt.append(' validate_status(vkObj, VkObjectTypeCmdBuffer, OBJSTATUS_DEPTH_STENCIL_BOUND, OBJSTATUS_DEPTH_STENCIL_BOUND, VK_DBG_MSG_UNKNOWN, OBJTRACK_DEPTH_STENCIL_NOT_BOUND, "Depth-stencil object not bound to this command buffer");') header_txt.append('}') header_txt.append('') header_txt.append('static void setGpuQueueInfoState(void *pData) {') @@ -1172,13 +1172,13 @@ class ObjectTrackerSubcommand(Subcommand): destroy_line += ' pTrav->obj.objType == VkObjectTypeSwapChainMemoryWSI) {\n' destroy_line += ' objNode *pDel = pTrav;\n' destroy_line += ' pTrav = pTrav->pNextGlobal;\n' - destroy_line += ' ll_destroy_obj((pDel->obj.pObj));\n' + destroy_line += ' ll_destroy_obj((pDel->obj.vkObj));\n' destroy_line += ' } else if ((pTrav->obj.objType == VkObjectTypePhysicalDevice) || (pTrav->obj.objType == VkObjectTypeQueue)) {\n' destroy_line += ' // Cannot destroy physical device so ignore\n' destroy_line += ' pTrav = pTrav->pNextGlobal;\n' destroy_line += ' } else {\n' destroy_line += ' char str[1024];\n' - destroy_line += ' sprintf(str, "OBJ ERROR : %s object 0x%" PRId64 " has not been destroyed (was used %lu times).", string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.pObj, pTrav->obj.numUses);\n' + destroy_line += ' sprintf(str, "OBJ ERROR : %s object 0x%" PRId64 " has not been destroyed (was used %lu times).", string_VK_OBJECT_TYPE(pTrav->obj.objType), pTrav->obj.vkObj, pTrav->obj.numUses);\n' destroy_line += ' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, device, 0, OBJTRACK_OBJECT_LEAK, "OBJTRACK", str);\n' destroy_line += ' pTrav = pTrav->pNextGlobal;\n' destroy_line += ' }\n' |
