summaryrefslogtreecommitdiff
path: root/loader/debug_report.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader/debug_report.c')
-rw-r--r--loader/debug_report.c59
1 files changed, 24 insertions, 35 deletions
diff --git a/loader/debug_report.c b/loader/debug_report.c
index bd46282a..04e55ccf 100644
--- a/loader/debug_report.c
+++ b/loader/debug_report.c
@@ -272,15 +272,12 @@ static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessageEXT(VkInstance
inst->disp->layer_inst_disp.DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
}
-/*
- * This is the instance chain terminator function
- * for CreateDebugReportCallback
- */
-
-VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallback(VkInstance instance,
- const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDebugReportCallbackEXT *pCallback) {
+// This is the instance chain terminator function
+// for CreateDebugReportCallback
+VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallbackEXT(VkInstance instance,
+ const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDebugReportCallbackEXT *pCallback) {
VkDebugReportCallbackEXT *icd_info = NULL;
const struct loader_icd_term *icd_term;
struct loader_instance *inst = (struct loader_instance *)instance;
@@ -309,11 +306,11 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallback(VkInstance i
storage_idx = 0;
for (icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
- if (!icd_term->CreateDebugReportCallbackEXT) {
+ if (!icd_term->dispatch.CreateDebugReportCallbackEXT) {
continue;
}
- res = icd_term->CreateDebugReportCallbackEXT(icd_term->instance, pCreateInfo, pAllocator, &icd_info[storage_idx]);
+ res = icd_term->dispatch.CreateDebugReportCallbackEXT(icd_term->instance, pCreateInfo, pAllocator, &icd_info[storage_idx]);
if (res != VK_SUCCESS) {
goto out;
@@ -356,12 +353,12 @@ out:
if (VK_SUCCESS != res) {
storage_idx = 0;
for (icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
- if (NULL == icd_term->DestroyDebugReportCallbackEXT) {
+ if (NULL == icd_term->dispatch.DestroyDebugReportCallbackEXT) {
continue;
}
if (icd_info && icd_info[storage_idx]) {
- icd_term->DestroyDebugReportCallbackEXT(icd_term->instance, icd_info[storage_idx], pAllocator);
+ icd_term->dispatch.DestroyDebugReportCallbackEXT(icd_term->instance, icd_info[storage_idx], pAllocator);
}
storage_idx++;
}
@@ -390,12 +387,9 @@ out:
return res;
}
-/*
- * This is the instance chain terminator function
- * for DestroyDebugReportCallback
- */
-VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallback(VkInstance instance, VkDebugReportCallbackEXT callback,
- const VkAllocationCallbacks *pAllocator) {
+// This is the instance chain terminator function for DestroyDebugReportCallback
+VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback,
+ const VkAllocationCallbacks *pAllocator) {
uint32_t storage_idx;
VkDebugReportCallbackEXT *icd_info;
const struct loader_icd_term *icd_term;
@@ -404,12 +398,12 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallback(VkInstance inst
icd_info = *(VkDebugReportCallbackEXT **)&callback;
storage_idx = 0;
for (icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
- if (NULL == icd_term->DestroyDebugReportCallbackEXT) {
+ if (NULL == icd_term->dispatch.DestroyDebugReportCallbackEXT) {
continue;
}
if (icd_info[storage_idx]) {
- icd_term->DestroyDebugReportCallbackEXT(icd_term->instance, icd_info[storage_idx], pAllocator);
+ icd_term->dispatch.DestroyDebugReportCallbackEXT(icd_term->instance, icd_info[storage_idx], pAllocator);
}
storage_idx++;
}
@@ -425,29 +419,24 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallback(VkInstance inst
}
}
-/*
- * This is the instance chain terminator function
- * for DebugReportMessage
- */
-VKAPI_ATTR void VKAPI_CALL terminator_DebugReportMessage(VkInstance instance, VkDebugReportFlagsEXT flags,
- VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location,
- int32_t msgCode, const char *pLayerPrefix, const char *pMsg) {
+// This is the instance chain terminator function for DebugReportMessage
+VKAPI_ATTR void VKAPI_CALL terminator_DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags,
+ VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location,
+ int32_t msgCode, const char *pLayerPrefix, const char *pMsg) {
const struct loader_icd_term *icd_term;
struct loader_instance *inst = (struct loader_instance *)instance;
loader_platform_thread_lock_mutex(&loader_lock);
for (icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
- if (icd_term->DebugReportMessageEXT != NULL) {
- icd_term->DebugReportMessageEXT(icd_term->instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
+ if (icd_term->dispatch.DebugReportMessageEXT != NULL) {
+ icd_term->dispatch.DebugReportMessageEXT(icd_term->instance, flags, objType, object, location, msgCode, pLayerPrefix,
+ pMsg);
}
}
- /*
- * Now that all ICDs have seen the message, call the necessary callbacks.
- * Ignoring "bail" return value as there is nothing to bail from at this
- * point.
- */
+ // Now that all ICDs have seen the message, call the necessary callbacks. Ignoring "bail" return value
+ // as there is nothing to bail from at this point.
util_DebugReportMessage(inst, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);