draw_state: Add support for DEBUG_REPORT
DrawState can report errors it details via the
DEBUG_REPORT extension. This patch updates
DrawState so that it uses the DEBUG_REPORT
extension if it is enabled.
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 34971f4..4955cf1 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -3037,8 +3037,6 @@
return (void*) vkCmdBeginRenderPass;
if (!strcmp(funcName, "vkCmdEndRenderPass"))
return (void*) vkCmdEndRenderPass;
- if (!strcmp(funcName, "vkDbgCreateMsgCallback"))
- return (void*) vkDbgCreateMsgCallback;
if (!strcmp(funcName, "vkCmdDbgMarkerBegin"))
return (void*) vkCmdDbgMarkerBegin;
if (!strcmp(funcName, "vkCmdDbgMarkerEnd"))
@@ -3061,6 +3059,7 @@
VK_LAYER_EXPORT void * VKAPI vkGetInstanceProcAddr(VkInstance instance, const char* funcName)
{
+ void *fptr;
if (instance == NULL)
return NULL;
@@ -3077,7 +3076,11 @@
return (void *) vkDestroyInstance;
if (!strcmp(funcName, "vkCreateDevice"))
return (void*) vkCreateDevice;
- else
+
+ fptr = msg_callback_get_proc_addr(funcName);
+ if (fptr)
+ return fptr;
+
{
VkLayerInstanceDispatchTable **ppDisp = (VkLayerInstanceDispatchTable **) instance;
VkLayerInstanceDispatchTable* pTable = tableInstanceMap[*ppDisp];