aboutsummaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtneygo@google.com>2015-11-25 13:50:00 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-15 09:10:28 -0700
commit66b605ea9d091dd60ba6e62a1eb79abb90d43dfb (patch)
tree10a51475ac83d41b265545b8114acaf0e23a37b8 /loader
parent680f52f839b08d7a7f252a7dc9027956a18e8b3f (diff)
downloadusermoji-66b605ea9d091dd60ba6e62a1eb79abb90d43dfb.tar.xz
loader: Remove unused debug helper functions
Helper functions weren't considered essential to the debug_report extension and will be moved to a library.
Diffstat (limited to 'loader')
-rw-r--r--loader/debug_report.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/loader/debug_report.c b/loader/debug_report.c
index 8fcdfe57..14f5a250 100644
--- a/loader/debug_report.c
+++ b/loader/debug_report.c
@@ -250,74 +250,6 @@ static void print_msg_flags(VkFlags msgFlags, char *msg_flags)
}
}
-// DebugReport utility callback functions
-static VKAPI_ATTR void VKAPI_CALL StringCallback(
- VkFlags msgFlags,
- VkDebugReportObjectTypeLUNARG objType,
- uint64_t srcObject,
- size_t location,
- int32_t msgCode,
- const char* pLayerPrefix,
- const char* pMsg,
- void* pUserData)
-{
- size_t buf_size;
- char *buf;
- char msg_flags[30];
- PFN_stringCallback callback = (PFN_stringCallback) pUserData;
-
- print_msg_flags(msgFlags, msg_flags);
-
- buf_size = strlen(msg_flags) + /* ReportFlags: i.e. (DEBUG,INFO,WARN,PERF,ERROR) */
- 20 + /* objType */
- 20 + /* srcObject */
- 20 + /* location */
- 20 + /* msgCode */
- strlen(pLayerPrefix) +
- strlen(pMsg) +
- 50 /* other / whitespace */;
- buf = loader_stack_alloc(buf_size);
-
- snprintf(buf, buf_size, "%s (%s): object: 0x%" PRIxLEAST64 " type: %d location: " PRINTF_SIZE_T_SPECIFIER " msgCode : %d : %s",
- pLayerPrefix, msg_flags, srcObject, objType, location, msgCode, pMsg);
- callback(buf);
-}
-
-static VKAPI_ATTR void VKAPI_CALL StdioCallback(
- VkFlags msgFlags,
- VkDebugReportObjectTypeLUNARG objType,
- uint64_t srcObject,
- size_t location,
- int32_t msgCode,
- const char* pLayerPrefix,
- const char* pMsg,
- void* pUserData)
-{
- char msg_flags[30];
-
- print_msg_flags(msgFlags, msg_flags);
-
- fprintf((FILE *)pUserData, "%s(%s): object: 0x%" PRIxLEAST64 " type: %d location: " PRINTF_SIZE_T_SPECIFIER " msgCode : %d : %s",
- pLayerPrefix, msg_flags, srcObject, objType, location, msgCode, pMsg);
-}
-
-static VKAPI_ATTR void VKAPI_CALL BreakCallback(
- VkFlags msgFlags,
- VkDebugReportObjectTypeLUNARG objType,
- uint64_t srcObject,
- size_t location,
- int32_t msgCode,
- const char* pLayerPrefix,
- const char* pMsg,
- void* pUserData)
-{
-#ifndef WIN32
- raise(SIGTRAP);
-#else
- DebugBreak();
-#endif
-}
-
bool debug_report_instance_gpa(
struct loader_instance *ptr_instance,
const char* name,
@@ -335,17 +267,5 @@ bool debug_report_instance_gpa(
*addr = ptr_instance->debug_report_enabled ? (void *) debug_report_DbgDestroyMsgCallback : NULL;
return true;
}
- if (!strcmp("vkDbgStringCallback", name)) {
- *addr = ptr_instance->debug_report_enabled ? (void *) StringCallback : NULL;
- return true;
- }
- if (!strcmp("vkDbgStdioCallback", name)) {
- *addr = ptr_instance->debug_report_enabled ? (void *) StdioCallback : NULL;
- return true;
- }
- if (!strcmp("vkDbgBreakCallback", name)) {
- *addr = ptr_instance->debug_report_enabled ? (void *) BreakCallback : NULL;
- return true;
- }
return false;
}