aboutsummaryrefslogtreecommitdiff
path: root/layers
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2015-08-26 15:09:25 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-08-27 15:11:19 -0600
commit73f63d6d5ccb522d93bd1b14d1ff1d39646d84fb (patch)
treee6c23da33c34508e0a73841604c92600dbf48ced /layers
parentdc093abf9ba4a3ed01d11b3cc56caccff8c4552b (diff)
downloadusermoji-73f63d6d5ccb522d93bd1b14d1ff1d39646d84fb.tar.xz
vk_platform: Update to upstream vk_platform.h
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.
Diffstat (limited to 'layers')
-rw-r--r--layers/draw_state.cpp14
-rw-r--r--layers/object_track.h20
2 files changed, 17 insertions, 17 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index bbadcaf4..a5d150d5 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -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",
diff --git a/layers/object_track.h b/layers/object_track.h
index c948e523..92287057 100644
--- a/layers/object_track.h
+++ b/layers/object_track.h
@@ -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]++;