vk_platform: Update to upstream vk_platform.h
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 26 Aug 2015 21:09:25 +0000 (15:09 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 27 Aug 2015 21:11:19 +0000 (15:11 -0600)
Gitlab bug #9: https://gitlab.khronos.org/vulkan/LoaderAndTools/issues/9
noted that the SDK's vk_platform.h did not match the upstream vk_platform.h.
This patch makes them identical updates impacted code.

include/vk_platform.h
layers/draw_state.cpp
layers/object_track.h
vk-layer-generate.py

index db9c4f9..969e532 100644 (file)
@@ -40,17 +40,8 @@ extern "C"
 */
 
 #if defined(_WIN32)
-    // Ensure we don't pick up min/max macros from Winddef.h
-    #define NOMINMAX
-
     // On Windows, VKAPI should equate to the __stdcall convention
     #define VKAPI   __stdcall
-
-    // C99:
-#ifndef __cplusplus
-    #undef inline
-    #define inline __inline
-#endif // __cplusplus
 #elif defined(__GNUC__)
     // On other platforms using GCC, VKAPI stays undefined
     #define VKAPI
@@ -76,16 +67,6 @@ extern "C"
     #endif
 #endif // !defined(VK_NO_STDINT_H)
 
-#if (UINTPTR_MAX >= UINT64_MAX)
-    #define VK_UINTPTRLEAST64_MAX UINTPTR_MAX
-
-    typedef uintptr_t VkUintPtrLeast64;
-#else
-    #define VK_UINTPTRLEAST64_MAX UINT64_MAX
-
-    typedef uint64_t  VkUintPtrLeast64;
-#endif
-
 #ifdef __cplusplus
 } // extern "C"
 #endif // __cplusplus
index bbadcaf..a5d150d 100644 (file)
@@ -354,7 +354,7 @@ static VkBool32 validate_status(GLOBAL_CB_NODE* pNode, CBStatusFlags enable_mask
         if ((pNode->status & status_mask) != status_flag) {
             // TODO : How to pass dispatchable objects as srcObject? Here src obj should be cmd buffer
             log_msg(mdd(pNode->cmdBuffer), msg_flags, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, error_code, "DS",
-                    "CB object %#" PRIxLEAST64 ": %s", reinterpret_cast<VkUintPtrLeast64>(pNode->cmdBuffer), fail_msg);
+                    "CB object %#" PRIxLEAST64 ": %s", reinterpret_cast<uint64_t>(pNode->cmdBuffer), fail_msg);
             return VK_FALSE;
         }
     }
@@ -1071,7 +1071,7 @@ static GLOBAL_CB_NODE* getCBNode(VkCmdBuffer cb)
         loader_platform_thread_unlock_mutex(&globalLock);
         // TODO : How to pass cb as srcObj here?
         log_msg(mdd(cb), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_INVALID_CMD_BUFFER, "DS",
-                "Attempt to use CmdBuffer %#" PRIxLEAST64 " that doesn't exist!", reinterpret_cast<VkUintPtrLeast64>(cb));
+                "Attempt to use CmdBuffer %#" PRIxLEAST64 " that doesn't exist!", reinterpret_cast<uint64_t>(cb));
         return NULL;
     }
     loader_platform_thread_unlock_mutex(&globalLock);
@@ -1112,7 +1112,7 @@ static void addCmd(GLOBAL_CB_NODE* pCB, const CMD_TYPE cmd)
     } else {
         // TODO : How to pass cb as srcObj here?
         log_msg(mdd(pCB->cmdBuffer), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_OUT_OF_MEMORY, "DS",
-                "Out of memory while attempting to allocate new CMD_NODE for cmdBuffer %#" PRIxLEAST64, reinterpret_cast<VkUintPtrLeast64>(pCB->cmdBuffer));
+                "Out of memory while attempting to allocate new CMD_NODE for cmdBuffer %#" PRIxLEAST64, reinterpret_cast<uint64_t>(pCB->cmdBuffer));
     }
 }
 static void resetCB(const VkCmdBuffer cb)
@@ -1491,13 +1491,13 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t cmdBufferCo
         pCB->submitCount++; // increment submit count
         if ((pCB->beginInfo.flags & VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT) && (pCB->submitCount > 1)) {
             log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_CMD_BUFFER_SINGLE_SUBMIT_VIOLATION, "DS",
-                    "CB %#" PRIxLEAST64 " was begun w/ VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT set, but has been submitted %#" PRIxLEAST64 " times.", reinterpret_cast<VkUintPtrLeast64>(pCB->cmdBuffer), pCB->submitCount);
+                    "CB %#" PRIxLEAST64 " was begun w/ VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT set, but has been submitted %#" PRIxLEAST64 " times.", reinterpret_cast<uint64_t>(pCB->cmdBuffer), pCB->submitCount);
         }
         if (CB_UPDATE_COMPLETE != pCB->state) {
             // Flag error for using CB w/o vkEndCommandBuffer() called
             // TODO : How to pass cb as srcObj?
             log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_NO_END_CMD_BUFFER, "DS",
-                    "You must call vkEndCommandBuffer() on CB %#" PRIxLEAST64 " before this call to vkQueueSubmit()!", reinterpret_cast<VkUintPtrLeast64>(pCB->cmdBuffer));
+                    "You must call vkEndCommandBuffer() on CB %#" PRIxLEAST64 " before this call to vkQueueSubmit()!", reinterpret_cast<uint64_t>(pCB->cmdBuffer));
             loader_platform_thread_unlock_mutex(&globalLock);
             return VK_ERROR_UNKNOWN;
         }
@@ -2666,7 +2666,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearColorAttachment(
                 // TODO : cmdBuffer should be srcObj
                 log_msg(mdd(cmdBuffer), VK_DBG_REPORT_WARN_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "DS",
                         "vkCmdClearColorAttachment() issued on CB object 0x%" PRIxLEAST64 " prior to any Draw Cmds."
-                        " It is recommended you use RenderPass LOAD_OP_CLEAR on Color Attachments prior to any Draw.", reinterpret_cast<VkUintPtrLeast64>(cmdBuffer));
+                        " It is recommended you use RenderPass LOAD_OP_CLEAR on Color Attachments prior to any Draw.", reinterpret_cast<uint64_t>(cmdBuffer));
             }
             if (!pCB->activeRenderPass) {
                 log_msg(mdd(pCB->cmdBuffer), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NO_ACTIVE_RENDERPASS, "DS",
@@ -2700,7 +2700,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencilAttachment(
                 // TODO : cmdBuffer should be srcObj
                 log_msg(mdd(cmdBuffer), VK_DBG_REPORT_WARN_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "DS",
                         "vkCmdClearDepthStencilAttachment() issued on CB object 0x%" PRIxLEAST64 " prior to any Draw Cmds."
-                        " It is recommended you use RenderPass LOAD_OP_CLEAR on DS Attachment prior to any Draw.", reinterpret_cast<VkUintPtrLeast64>(cmdBuffer));
+                        " It is recommended you use RenderPass LOAD_OP_CLEAR on DS Attachment prior to any Draw.", reinterpret_cast<uint64_t>(cmdBuffer));
             }
             if (!pCB->activeRenderPass) {
                 log_msg(mdd(pCB->cmdBuffer), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NO_ACTIVE_RENDERPASS, "DS",
index c948e52..9228705 100644 (file)
@@ -183,7 +183,7 @@ addQueueInfo(
         g_pQueueInfo          = pQueueInfo;
     }
     else {
-        log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<VkUintPtrLeast64>(queue), 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK",
+        log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<uint64_t>(queue), 0, OBJTRACK_INTERNAL_ERROR, "OBJTRACK",
             "ERROR:  VK_ERROR_OUT_OF_HOST_MEMORY -- could not allocate memory for Queue Information");
     }
 }
@@ -232,10 +232,10 @@ validateQueueFlags(
     }
     if (pQueueInfo != NULL) {
         if ((queueInfo != NULL) && (queueInfo[pQueueInfo->queueNodeIndex].queueFlags & VK_QUEUE_SPARSE_MEMMGR_BIT) == 0) {
-            log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<VkUintPtrLeast64>(queue), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
+            log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<uint64_t>(queue), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
                 "Attempting %s on a non-memory-management capable queue -- VK_QUEUE_SPARSE_MEMMGR_BIT not set", function);
         } else {
-            log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<VkUintPtrLeast64>(queue), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
+            log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, reinterpret_cast<uint64_t>(queue), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
                 "Attempting %s on a possibly non-memory-management capable queue -- VK_QUEUE_SPARSE_MEMMGR_BIT not known", function);
         }
     }
@@ -261,7 +261,7 @@ validate_status(
             char str[1024];
             log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
                 "OBJECT VALIDATION WARNING: %s object 0x%" PRIxLEAST64 ": %s", string_VkObjectType(objType),
-                 reinterpret_cast<VkUintPtrLeast64>(vkObj), fail_msg);
+                 reinterpret_cast<uint64_t>(vkObj), fail_msg);
             return VK_FALSE;
         }
         return VK_TRUE;
@@ -270,7 +270,7 @@ validate_status(
         // If we do not find it print an error
         log_msg(mdd(dispatchable_object), msg_flags, (VkObjectType) 0, vkObj, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",
             "Unable to obtain status for non-existent object 0x%" PRIxLEAST64 " of %s type",
-            reinterpret_cast<VkUintPtrLeast64>(vkObj), string_VkObjectType(objType));
+            reinterpret_cast<uint64_t>(vkObj), string_VkObjectType(objType));
         return VK_FALSE;
     }
 }
@@ -376,21 +376,21 @@ static void validate_object(VkQueue dispatchable_object, VkSemaphore object)
 static void validate_object(VkDevice dispatchable_object, VkCmdBuffer object)
 {
     if (VkCmdBufferMap.find(object) == VkCmdBufferMap.end()) {
-        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",
-            "Invalid VkCmdBuffer Object %p",reinterpret_cast<VkUintPtrLeast64>(object));
+        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",
+            "Invalid VkCmdBuffer Object %p",reinterpret_cast<uint64_t>(object));
     }
 }
 
 static void create_obj(VkDevice dispatchable_object, VkCmdBuffer vkObj, VkDbgObjectType objType)
 {
-    log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, objType, reinterpret_cast<VkUintPtrLeast64>(vkObj), 0, OBJTRACK_NONE, "OBJTRACK",
+    log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, objType, reinterpret_cast<uint64_t>(vkObj), 0, OBJTRACK_NONE, "OBJTRACK",
         "OBJ[%llu] : CREATE %s object 0x%" PRIxLEAST64 , object_track_index++, string_VkDbgObjectType(objType),
-        reinterpret_cast<VkUintPtrLeast64>(vkObj));
+        reinterpret_cast<uint64_t>(vkObj));
 
     OBJTRACK_NODE* pNewObjNode = new OBJTRACK_NODE;
     pNewObjNode->objType = objType;
     pNewObjNode->status  = OBJSTATUS_NONE;
-    pNewObjNode->vkObj  = reinterpret_cast<VkUintPtrLeast64>(vkObj);
+    pNewObjNode->vkObj  = reinterpret_cast<uint64_t>(vkObj);
     VkCmdBufferMap[vkObj] = pNewObjNode;
     uint32_t objIndex = objTypeToIndex(objType);
     numObjs[objIndex]++;
index 9de5c10..a0ad30d 100755 (executable)
@@ -1137,9 +1137,9 @@ class ObjectTrackerSubcommand(Subcommand):
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
                 procs_txt.append('static void create_obj(%s dispatchable_object, %s vkObj, VkDbgObjectType objType)' % (o, o))
                 procs_txt.append('{')
-                procs_txt.append('    log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, objType, reinterpret_cast<VkUintPtrLeast64>(vkObj), 0, OBJTRACK_NONE, "OBJTRACK",')
+                procs_txt.append('    log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, objType, reinterpret_cast<uint64_t>(vkObj), 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('        "OBJ[%llu] : CREATE %s object 0x%" PRIxLEAST64 , object_track_index++, string_VkDbgObjectType(objType),')
-                procs_txt.append('        reinterpret_cast<VkUintPtrLeast64>(vkObj));')
+                procs_txt.append('        reinterpret_cast<uint64_t>(vkObj));')
             else:
                 procs_txt.append('static void create_obj(VkDevice dispatchable_object, %s vkObj, VkDbgObjectType objType)' % (o))
                 procs_txt.append('{')
@@ -1151,7 +1151,7 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('    pNewObjNode->objType = objType;')
             procs_txt.append('    pNewObjNode->status  = OBJSTATUS_NONE;')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('    pNewObjNode->vkObj  = reinterpret_cast<VkUintPtrLeast64>(vkObj);')
+                procs_txt.append('    pNewObjNode->vkObj  = reinterpret_cast<uint64_t>(vkObj);')
                 procs_txt.append('    %sMap[vkObj] = pNewObjNode;' % (o))
             else:
                 procs_txt.append('    pNewObjNode->vkObj  = vkObj.handle;')
@@ -1169,8 +1169,8 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('{')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
                 procs_txt.append('    if (%sMap.find(object) == %sMap.end()) {' % (o, o))
-                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",')
-                procs_txt.append('            "Invalid %s Object %%p",reinterpret_cast<VkUintPtrLeast64>(object));' % o)
+                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",')
+                procs_txt.append('            "Invalid %s Object %%p",reinterpret_cast<uint64_t>(object));' % o)
             else:
                 procs_txt.append('    if (%sMap.find((void*)object.handle) == %sMap.end()) {' % (o, o))
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",')
@@ -1197,9 +1197,9 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('        assert(numObjs[objIndex] > 0);')
             procs_txt.append('        numObjs[objIndex]--;')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, pNode->objType, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
+                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, pNode->objType, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('           "OBJ_STAT Destroy %s obj 0x%" PRIxLEAST64 " (%lu total objs remain & %lu %s objs).",')
-                procs_txt.append('            string_VkDbgObjectType(pNode->objType), reinterpret_cast<VkUintPtrLeast64>(object), numTotalObjs, numObjs[objIndex],')
+                procs_txt.append('            string_VkDbgObjectType(pNode->objType), reinterpret_cast<uint64_t>(object), numTotalObjs, numObjs[objIndex],')
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, pNode->objType, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('           "OBJ_STAT Destroy %s obj 0x%" PRIxLEAST64 " (%lu total objs remain & %lu %s objs).",')
@@ -1209,9 +1209,9 @@ class ObjectTrackerSubcommand(Subcommand):
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
                 procs_txt.append('        %sMap.erase(object);' % (o))
                 procs_txt.append('    } else {')
-                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
+                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('            "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?",')
-                procs_txt.append('           reinterpret_cast<VkUintPtrLeast64>(object));')
+                procs_txt.append('           reinterpret_cast<uint64_t>(object));')
                 procs_txt.append('    }')
             else:
                 procs_txt.append('        %sMap.erase((void*)object.handle);' % (o))
@@ -1241,9 +1241,9 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('        else {')
             procs_txt.append('            // If we do not find it print an error')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
+                procs_txt.append('            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('                "Unable to set status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('                reinterpret_cast<VkUintPtrLeast64>(object), string_VkDbgObjectType(objType));')
+                procs_txt.append('                reinterpret_cast<uint64_t>(object), string_VkDbgObjectType(objType));')
             else:
                 procs_txt.append('            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('                "Unable to set status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
@@ -1273,9 +1273,9 @@ class ObjectTrackerSubcommand(Subcommand):
                 procs_txt.append('        OBJTRACK_NODE* pNode = %sMap[(void*)object.handle];' % (o))
             procs_txt.append('        if ((pNode->status & status_mask) != status_flag) {')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('            log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
+                procs_txt.append('            log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('                "OBJECT VALIDATION WARNING: %s object 0x%" PRIxLEAST64 ": %s", string_VkDbgObjectType(objType),')
-                procs_txt.append('                 reinterpret_cast<VkUintPtrLeast64>(object), fail_msg);')
+                procs_txt.append('                 reinterpret_cast<uint64_t>(object), fail_msg);')
             else:
                 procs_txt.append('            log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('                "OBJECT VALIDATION WARNING: %s object 0x%" PRIxLEAST64 ": %s", string_VkDbgObjectType(objType),')
@@ -1287,9 +1287,9 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('    else {')
             procs_txt.append('        // If we do not find it print an error')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('        log_msg(mdd(dispatchable_object), msg_flags, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
+                procs_txt.append('        log_msg(mdd(dispatchable_object), msg_flags, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to obtain status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('            reinterpret_cast<VkUintPtrLeast64>(object), string_VkDbgObjectType(objType));')
+                procs_txt.append('            reinterpret_cast<uint64_t>(object), string_VkDbgObjectType(objType));')
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), msg_flags, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to obtain status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
@@ -1315,9 +1315,9 @@ class ObjectTrackerSubcommand(Subcommand):
             procs_txt.append('    else {')
             procs_txt.append('        // If we do not find it print an error')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
-                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, objType, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
+                procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, objType, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to reset status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('            reinterpret_cast<VkUintPtrLeast64>(object), string_VkDbgObjectType(objType));')
+                procs_txt.append('            reinterpret_cast<uint64_t>(object), string_VkDbgObjectType(objType));')
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, objType, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to reset status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
@@ -1615,7 +1615,7 @@ class ThreadingSubcommand(Subcommand):
         obj_type = self.thread_check_object_types[ty]
         if ty in self.thread_check_dispatchable_objects:
             key = "object"
-            msg_object = "reinterpret_cast<VkUintPtrLeast64>(object)"
+            msg_object = "reinterpret_cast<uint64_t>(object)"
         else:
             key = "object.handle"
             msg_object = "object.handle"