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;
}
}
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);
} 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)
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;
}
// 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",
// 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",
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");
}
}
}
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);
}
}
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;
// 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;
}
}
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]++;
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('{')
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;')
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",')
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).",')
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))
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",')
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),')
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",')
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",')
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"