summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2017-05-07 17:58:56 +0100
committerJose Fonseca <jfonseca@vmware.com>2017-05-07 19:23:07 +0100
commitdab6a2dfd9cab05e7e9b57373546516bf153f080 (patch)
treefb0cd9267db6354a481d4b57dd9fc136515c80ae
parent27ad060c6e69a408ce903f1dfbaaa6fa82c080a7 (diff)
nir: Fix missing snprintf symbol on Windows.
Copy nir_print.c's snprintf definition for now, to unbreak Windows builds. We can and should cleanup all snprintf definitions in a follow up change, but I rather not leave Windows build broken any further. Trivial.
-rw-r--r--src/compiler/nir/nir_lower_atomics_to_ssbo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_atomics_to_ssbo.c b/src/compiler/nir/nir_lower_atomics_to_ssbo.c
index 976371bb9c..27fe50bbc2 100644
--- a/src/compiler/nir/nir_lower_atomics_to_ssbo.c
+++ b/src/compiler/nir/nir_lower_atomics_to_ssbo.c
@@ -27,6 +27,10 @@
#include "nir.h"
#include "nir_builder.h"
+#if defined(_WIN32) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
/*
* Remap atomic counters to SSBOs. Atomic counters get remapped to
* SSBO binding points [0..ssbo_offset) and the original SSBOs are