blob: ebb1ae29a5b07621959caa971dc203a732433fdd [file] [log] [blame]
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001/*
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06002 *
Courtney Goeltzenleuchterfcbe16f2015-10-29 13:50:34 -06003 * Copyright (C) 2015 Valve Corporation
Courtney Goeltzenleuchterf821dad2015-12-02 14:53:22 -07004 * Copyright (C) 2015 Google Inc.
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06005 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *
Courtney Goeltzenleuchter05559522015-10-30 11:14:30 -060024 * Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
25 *
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060026 */
27
Courtney Goeltzenleuchter7f5aafc2015-07-05 11:28:29 -060028#define _GNU_SOURCE
Courtney Goeltzenleuchter7dcc6a72015-06-11 16:01:11 -060029#include <stdio.h>
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060030#include <string.h>
31#include <stdlib.h>
Courtney Goeltzenleuchter7dcc6a72015-06-11 16:01:11 -060032#include <inttypes.h>
Tony Barbour1d825c72015-06-18 16:29:32 -060033#ifndef WIN32
Courtney Goeltzenleuchter03663d02015-07-22 11:01:53 -060034#include <signal.h>
35#else
Tony Barbour1d825c72015-06-18 16:29:32 -060036#endif
Jon Ashburn480a50a2015-08-28 14:58:46 -070037#include "vk_loader_platform.h"
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060038#include "debug_report.h"
David Pinedo9316d3b2015-11-06 12:54:48 -070039#include "vulkan/vk_layer.h"
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060040
Chia-I Wu9ab61502015-11-06 06:42:02 +080041typedef void (VKAPI_PTR *PFN_stringCallback)(char *message);
Courtney Goeltzenleuchter7dcc6a72015-06-11 16:01:11 -060042
Jon Ashburn5c042ea2015-08-04 11:14:18 -060043static const VkExtensionProperties debug_report_extension_info = {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070044 .extensionName = VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
45 .specVersion = VK_EXT_DEBUG_REPORT_REVISION,
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060046};
47
48void debug_report_add_instance_extensions(
Jon Ashburne39a4f82015-08-28 13:38:21 -060049 const struct loader_instance *inst,
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060050 struct loader_extension_list *ext_list)
51{
Jon Ashburne39a4f82015-08-28 13:38:21 -060052 loader_add_to_ext_list(inst, ext_list, 1, &debug_report_extension_info);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060053}
54
55void debug_report_create_instance(
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -060056 struct loader_instance *ptr_instance,
57 const VkInstanceCreateInfo *pCreateInfo)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060058{
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -060059 ptr_instance->debug_report_enabled = false;
60
Chia-I Wud50a7d72015-10-26 20:48:51 +080061 for (uint32_t i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070062 if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == 0) {
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -060063 ptr_instance->debug_report_enabled = true;
64 return;
65 }
66 }
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060067}
68
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -070069VkResult util_CreateDebugReportCallback(
70 struct loader_instance *inst,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070071 VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -070072 const VkAllocationCallbacks *pAllocator,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070073 VkDebugReportCallbackEXT callback)
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -070074{
75 VkLayerDbgFunctionNode *pNewDbgFuncNode;
76 if (pAllocator != NULL) {
77 pNewDbgFuncNode = (VkLayerDbgFunctionNode *) pAllocator->pfnAllocation(pAllocator->pUserData, sizeof(VkLayerDbgFunctionNode), sizeof(uint32_t), VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
78 } else {
79 pNewDbgFuncNode = (VkLayerDbgFunctionNode *) loader_heap_alloc(inst, sizeof(VkLayerDbgFunctionNode), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
80 }
81 if (!pNewDbgFuncNode)
82 return VK_ERROR_OUT_OF_HOST_MEMORY;
83
84 pNewDbgFuncNode->msgCallback = callback;
85 pNewDbgFuncNode->pfnMsgCallback = pCreateInfo->pfnCallback;
86 pNewDbgFuncNode->msgFlags = pCreateInfo->flags;
87 pNewDbgFuncNode->pUserData = pCreateInfo->pUserData;
88 pNewDbgFuncNode->pNext = inst->DbgFunctionHead;
89 inst->DbgFunctionHead = pNewDbgFuncNode;
90
91 return VK_SUCCESS;
92}
93
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -070094static VKAPI_ATTR VkResult VKAPI_CALL debug_report_CreateDebugReportCallback(
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060095 VkInstance instance,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070096 VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -070097 VkAllocationCallbacks *pAllocator,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -070098 VkDebugReportCallbackEXT* pCallback)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -060099{
Jon Ashburne0e64572015-09-30 12:56:42 -0600100 struct loader_instance *inst = loader_get_instance(instance);
Jon Ashburn6301a0f2015-05-29 13:15:39 -0600101 loader_platform_thread_lock_mutex(&loader_lock);
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700102 VkResult result = inst->disp->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600103 if (result == VK_SUCCESS) {
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700104 result = util_CreateDebugReportCallback(inst, pCreateInfo, pAllocator, *pCallback);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600105 }
Jon Ashburn6301a0f2015-05-29 13:15:39 -0600106 loader_platform_thread_unlock_mutex(&loader_lock);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600107 return result;
108}
109
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700110// Utility function to handle reporting
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700111VkBool32 util_DebugReportMessage(
112 const struct loader_instance* inst,
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700113 VkFlags msgFlags,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700114 VkDebugReportObjectTypeEXT objectType,
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700115 uint64_t srcObject,
116 size_t location,
117 int32_t msgCode,
118 const char* pLayerPrefix,
119 const char* pMsg)
120{
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700121 VkBool32 bail = false;
122 VkLayerDbgFunctionNode *pTrav = inst->DbgFunctionHead;
123 while (pTrav) {
124 if (pTrav->msgFlags & msgFlags) {
125 if (pTrav->pfnMsgCallback(msgFlags,
126 objectType, srcObject,
127 location,
128 msgCode,
129 pLayerPrefix,
130 pMsg,
131 (void *) pTrav->pUserData)) {
132 bail = true;
133 }
134 }
135 pTrav = pTrav->pNext;
136 }
137
138 return bail;
139}
140
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700141void util_DestroyDebugReportCallback(
142 struct loader_instance *inst,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700143 VkDebugReportCallbackEXT callback,
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700144 const VkAllocationCallbacks *pAllocator)
145{
146 VkLayerDbgFunctionNode *pTrav = inst->DbgFunctionHead;
147 VkLayerDbgFunctionNode *pPrev = pTrav;
148
149 while (pTrav) {
150 if (pTrav->msgCallback == callback) {
151 pPrev->pNext = pTrav->pNext;
152 if (inst->DbgFunctionHead == pTrav)
153 inst->DbgFunctionHead = pTrav->pNext;
154 if (pAllocator != NULL) {
155 pAllocator->pfnFree(pAllocator->pUserData, pTrav);
156 } else {
157 loader_heap_free(inst, pTrav);
158 }
159 break;
160 }
161 pPrev = pTrav;
162 pTrav = pTrav->pNext;
163 }
164}
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700165
Courtney Goeltzenleuchter5ffb1d92015-11-30 15:22:41 -0700166static VKAPI_ATTR void VKAPI_CALL debug_report_DestroyDebugReportCallback(
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600167 VkInstance instance,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700168 VkDebugReportCallbackEXT callback,
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700169 VkAllocationCallbacks *pAllocator)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600170{
Jon Ashburne0e64572015-09-30 12:56:42 -0600171 struct loader_instance *inst = loader_get_instance(instance);
Jon Ashburn6301a0f2015-05-29 13:15:39 -0600172 loader_platform_thread_lock_mutex(&loader_lock);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600173
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700174 inst->disp->DestroyDebugReportCallbackEXT(instance, callback, pAllocator);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600175
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700176 util_DestroyDebugReportCallback(inst, callback, pAllocator);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600177
Jon Ashburn6301a0f2015-05-29 13:15:39 -0600178 loader_platform_thread_unlock_mutex(&loader_lock);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600179}
180
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700181static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessage(
182 VkInstance instance,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700183 VkDebugReportFlagsEXT flags,
184 VkDebugReportObjectTypeEXT objType,
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700185 uint64_t object,
186 size_t location,
187 int32_t msgCode,
188 const char* pLayerPrefix,
189 const char* pMsg)
190{
191 struct loader_instance *inst = loader_get_instance(instance);
192
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700193 inst->disp->DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700194
195}
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600196
197/*
198 * This is the instance chain terminator function
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700199 * for CreateDebugReportCallback
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600200 */
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600201
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700202VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback(
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700203 VkInstance instance,
204 const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
205 const VkAllocationCallbacks *pAllocator,
206 VkDebugReportCallbackEXT *pCallback)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600207{
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700208 VkDebugReportCallbackEXT *icd_info;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600209 const struct loader_icd *icd;
Jon Ashburnd3c5d272015-12-16 15:22:10 -0700210 struct loader_instance *inst = (struct loader_instance *) instance;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600211 VkResult res;
212 uint32_t storage_idx;
213
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700214 icd_info = calloc(sizeof(VkDebugReportCallbackEXT), inst->total_icd_count);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600215 if (!icd_info) {
216 return VK_ERROR_OUT_OF_HOST_MEMORY;
217 }
218
219 storage_idx = 0;
220 for (icd = inst->icds; icd; icd = icd->next) {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700221 if (!icd->CreateDebugReportCallbackEXT) {
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600222 continue;
223 }
224
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700225 res = icd->CreateDebugReportCallbackEXT(
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700226 icd->instance,
227 pCreateInfo,
228 pAllocator,
229 &icd_info[storage_idx]);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600230
231 if (res != VK_SUCCESS) {
232 break;
233 }
234 storage_idx++;
235 }
236
237 /* roll back on errors */
238 if (icd) {
239 storage_idx = 0;
240 for (icd = inst->icds; icd; icd = icd->next) {
Chia-I Wue2fc5522015-10-26 20:04:44 +0800241 if (icd_info[storage_idx]) {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700242 icd->DestroyDebugReportCallbackEXT(
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600243 icd->instance,
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700244 icd_info[storage_idx],
245 pAllocator);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600246 }
247 storage_idx++;
248 }
249
250 return res;
251 }
252
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700253 *(VkDebugReportCallbackEXT **)pCallback = icd_info;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600254
255 return VK_SUCCESS;
256}
257
258/*
259 * This is the instance chain terminator function
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700260 * for DestroyDebugReportCallback
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600261 */
Courtney Goeltzenleuchter5ffb1d92015-11-30 15:22:41 -0700262VKAPI_ATTR void loader_DestroyDebugReportCallback(VkInstance instance,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700263 VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600264{
265 uint32_t storage_idx;
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700266 VkDebugReportCallbackEXT *icd_info;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600267 const struct loader_icd *icd;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600268
Jon Ashburnd3c5d272015-12-16 15:22:10 -0700269 struct loader_instance *inst = (struct loader_instance *) instance;
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700270 icd_info = *(VkDebugReportCallbackEXT **) &callback;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600271 storage_idx = 0;
272 for (icd = inst->icds; icd; icd = icd->next) {
Chia-I Wue2fc5522015-10-26 20:04:44 +0800273 if (icd_info[storage_idx]) {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700274 icd->DestroyDebugReportCallbackEXT(
Courtney Goeltzenleuchter7d0023c2015-06-08 15:09:22 -0600275 icd->instance,
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700276 icd_info[storage_idx],
277 pAllocator);
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600278 }
279 storage_idx++;
280 }
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600281}
282
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700283
284/*
285 * This is the instance chain terminator function
286 * for DebugReportMessage
287 */
288VKAPI_ATTR void VKAPI_CALL loader_DebugReportMessage(
289 VkInstance instance,
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700290 VkDebugReportFlagsEXT flags,
291 VkDebugReportObjectTypeEXT objType,
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700292 uint64_t object,
293 size_t location,
294 int32_t msgCode,
295 const char* pLayerPrefix,
296 const char* pMsg)
297{
298 const struct loader_icd *icd;
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700299
300
Jon Ashburnd3c5d272015-12-16 15:22:10 -0700301 struct loader_instance *inst = (struct loader_instance *) instance;
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700302
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700303 loader_platform_thread_lock_mutex(&loader_lock);
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700304 for (icd = inst->icds; icd; icd = icd->next) {
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700305 if (icd->DebugReportMessageEXT != NULL) {
306 icd->DebugReportMessageEXT(icd->instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700307 }
308 }
309
310 /*
311 * Now that all ICDs have seen the message, call the necessary callbacks.
312 * Ignoring "bail" return value as there is nothing to bail from at this point.
313 */
Courtney Goeltzenleuchter82887272015-12-02 15:29:33 -0700314
315 util_DebugReportMessage(inst, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
316
317 loader_platform_thread_unlock_mutex(&loader_lock);
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700318}
319
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600320bool debug_report_instance_gpa(
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600321 struct loader_instance *ptr_instance,
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600322 const char* name,
323 void **addr)
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600324{
Jon Ashburn8a39efc2015-11-06 11:02:40 -0700325 // debug_report is currently advertised to be supported by the loader,
326 // so always return the entry points if name matches and it's enabled
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600327 *addr = NULL;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600328
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700329 if (!strcmp("vkCreateDebugReportCallbackEXT", name)) {
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700330 *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_CreateDebugReportCallback : NULL;
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600331 return true;
332 }
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700333 if (!strcmp("vkDestroyDebugReportCallbackEXT", name)) {
Courtney Goeltzenleuchter05854bf2015-11-30 12:13:14 -0700334 *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_DestroyDebugReportCallback : NULL;
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600335 return true;
336 }
Courtney Goeltzenleuchter7415d5a2015-12-09 15:48:16 -0700337 if (!strcmp("vkDebugReportMessageEXT", name)) {
Courtney Goeltzenleuchter822e8d72015-11-30 15:28:25 -0700338 *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_DebugReportMessage : NULL;
339 return true;
340 }
Jon Ashburnf7a48db2015-10-01 12:03:17 -0600341 return false;
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600342}