projects
/
platform
/
upstream
/
Vulkan-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a6c87b
)
layers: Fix bug where logging_callback was not being correctly cleaned up
author
Tobin Ehlis
<tobin@lunarg.com>
Mon, 21 Sep 2015 15:36:47 +0000
(09:36 -0600)
committer
Tobin Ehlis
<tobin@lunarg.com>
Mon, 21 Sep 2015 15:43:16 +0000
(09:43 -0600)
layers/vk_layer_logging.h
patch
|
blob
|
history
diff --git
a/layers/vk_layer_logging.h
b/layers/vk_layer_logging.h
index f65f488723fe77efea62e75b90e334ea2a79af59..bef168ccef7b70e299e47fb26a1e90587749cce2 100644
(file)
--- 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;