aboutsummaryrefslogtreecommitdiff
path: root/loader/debug_report.c
diff options
context:
space:
mode:
authorTony Barbour <tony@LunarG.com>2015-06-18 16:29:32 -0600
committerTony Barbour <tony@LunarG.com>2015-06-18 16:33:06 -0600
commit3d064253d2530ed1237f4501b8acf86b41bab7d0 (patch)
tree87215c09555c80f629624310bb73a6494a006ee9 /loader/debug_report.c
parent13cd6d4accdf7c1d7f6d6378f630e1864d1856e1 (diff)
downloadusermoji-3d064253d2530ed1237f4501b8acf86b41bab7d0.tar.xz
Windows: Fix build issues on Windows
Generate vulkan.def from header, fix use of alloca
Diffstat (limited to 'loader/debug_report.c')
-rw-r--r--loader/debug_report.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/loader/debug_report.c b/loader/debug_report.c
index 1d6a186b..245d2d0f 100644
--- a/loader/debug_report.c
+++ b/loader/debug_report.c
@@ -30,7 +30,9 @@
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
+#ifndef WIN32
#include <alloca.h>
+#endif
#include "debug_report.h"
#include "vkLayer.h"
@@ -286,8 +288,11 @@ static void VKAPI StringCallback(
strlen(pLayerPrefix) +
strlen(pMsg) +
50 /* other / whitespace */;
+#ifdef WIN32
+ buf = _alloca(buf_size);
+#else
buf = alloca(buf_size);
-
+#endif
snprintf(buf, buf_size, "%s (%s): object: 0x%" PRIxLEAST64 " type: %d location: %zu msgCode: %d: %s",
pLayerPrefix, msg_flags, srcObject, objType, location, msgCode, pMsg);
callback(buf);