aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-09-21 09:36:47 -0600
committerTobin Ehlis <tobin@lunarg.com>2015-09-21 09:43:16 -0600
commit3bbc9d950dff9879eea04a28757b93df6832e831 (patch)
tree27865f880a2ba6bf304bf9d10ac65f1178822ebb
parent0a6c87bc0612740025fc28e3a29f62b35e37430c (diff)
downloadusermoji-3bbc9d950dff9879eea04a28757b93df6832e831.tar.xz
layers: Fix bug where logging_callback was not being correctly cleaned up
-rw-r--r--layers/vk_layer_logging.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h
index f65f4887..bef168cc 100644
--- a/layers/vk_layer_logging.h
+++ b/layers/vk_layer_logging.h
@@ -157,6 +157,9 @@ static inline VkResult layer_create_msg_callback(
if (!pNewDbgFuncNode)
return VK_ERROR_OUT_OF_HOST_MEMORY;
+ // Handle of 0 is logging_callback so use allocated Node address as unique handle
+ if (!(*pMsgCallback))
+ *pMsgCallback = (uint64_t) pNewDbgFuncNode;
pNewDbgFuncNode->msgCallback = *pMsgCallback;
pNewDbgFuncNode->pfnMsgCallback = pfnMsgCallback;
pNewDbgFuncNode->msgFlags = msgFlags;