diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 5ad5ee4..c2afbdc 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2569,12 +2569,24 @@
     {
         option_str = getLayerOption("DrawStateLogFilename");
         log_output = getLayerLogOutput(option_str, "DrawState");
-        layer_create_msg_callback(my_data->report_data, report_flags, log_callback, (void *) log_output, &callback);
+        VkDebugReportCallbackCreateInfoLUNARG dbgInfo;
+        memset(&dbgInfo, 0, sizeof(dbgInfo));
+        dbgInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_LUNARG;
+        dbgInfo.pfnCallback = log_callback;
+        dbgInfo.pUserData = log_output;
+        dbgInfo.flags = report_flags;
+        layer_create_msg_callback(my_data->report_data, &dbgInfo, pAllocator, &callback);
         my_data->logging_callback.push_back(callback);
     }
 
     if (debug_action & VK_DBG_LAYER_ACTION_DEBUG_OUTPUT) {
-        layer_create_msg_callback(my_data->report_data, report_flags, win32_debug_output_msg, NULL, &callback);
+        VkDebugReportCallbackCreateInfoLUNARG dbgInfo;
+        memset(&dbgInfo, 0, sizeof(dbgInfo));
+        dbgInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_LUNARG;
+        dbgInfo.pfnCallback = win32_debug_output_msg;
+        dbgInfo.pUserData = log_output;
+        dbgInfo.flags = report_flags;
+        layer_create_msg_callback(my_data->report_data, &dbgInfo, pAllocator, &callback);
         my_data->logging_callback.push_back(callback);
     }
 
@@ -2617,7 +2629,7 @@
     // Clean up logging callback, if any
     while (my_data->logging_callback.size() > 0) {
         VkDebugReportCallbackLUNARG callback = my_data->logging_callback.back();
-        layer_destroy_msg_callback(my_data->report_data, callback);
+        layer_destroy_msg_callback(my_data->report_data, callback, pAllocator);
         my_data->logging_callback.pop_back();
     }
 
@@ -5409,29 +5421,30 @@
     return VK_ERROR_VALIDATION_FAILED;
 }
 
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDbgCreateMsgCallback(
-    VkInstance                          instance,
-    VkFlags                             msgFlags,
-    const PFN_vkDbgMsgCallback          pfnMsgCallback,
-    void*                               pUserData,
-    VkDebugReportCallbackLUNARG*                   pMsgCallback)
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackLUNARG(
+        VkInstance                                  instance,
+        VkDebugReportCallbackCreateInfoLUNARG*      pCreateInfo,
+        const VkAllocationCallbacks*                pAllocator,
+        VkDebugReportCallbackLUNARG*                pMsgCallback)
 {
     layer_data* my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
-    VkResult res = my_data->instance_dispatch_table->DbgCreateMsgCallback(instance, msgFlags, pfnMsgCallback, pUserData, pMsgCallback);
+    VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table;
+    VkResult res = pTable->CreateDebugReportCallbackLUNARG(instance, pCreateInfo, pAllocator, pMsgCallback);
     if (VK_SUCCESS == res) {
-        res = layer_create_msg_callback(my_data->report_data, msgFlags, pfnMsgCallback, pUserData, pMsgCallback);
+        res = layer_create_msg_callback(my_data->report_data, pCreateInfo, pAllocator, pMsgCallback);
     }
     return res;
 }
 
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDbgDestroyMsgCallback(
-    VkInstance                          instance,
-    VkDebugReportCallbackLUNARG                    msgCallback)
+VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackLUNARG(
+        VkInstance                                  instance,
+        VkDebugReportCallbackLUNARG                 msgCallback,
+        const VkAllocationCallbacks*                pAllocator)
 {
     layer_data* my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
-    VkResult res = my_data->instance_dispatch_table->DbgDestroyMsgCallback(instance, msgCallback);
-    layer_destroy_msg_callback(my_data->report_data, msgCallback);
-    return res;
+    VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table;
+    pTable->DestroyDebugReportCallbackLUNARG(instance, msgCallback, pAllocator);
+    layer_destroy_msg_callback(my_data->report_data, msgCallback, pAllocator);
 }
 
 VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDbgMarkerBegin(VkCommandBuffer commandBuffer, const char* pMarker)
