summaryrefslogtreecommitdiffstats
path: root/src/glsl/standalone_scaffolding.cpp
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-01-16 12:56:34 -0800
committerChad Versace <chad.versace@linux.intel.com>2013-01-24 21:11:41 -0800
commit1fafd008392d5240dc36d0c72978cef62e21b4b1 (patch)
tree9c782c6d82226b394cc3ce871a0cb018949aa5ad /src/glsl/standalone_scaffolding.cpp
parentee5921ad0dfb11eebe666b03eab2ac1875c11280 (diff)
downloadexternal_mesa3d-1fafd008392d5240dc36d0c72978cef62e21b4b1.zip
external_mesa3d-1fafd008392d5240dc36d0c72978cef62e21b4b1.tar.gz
external_mesa3d-1fafd008392d5240dc36d0c72978cef62e21b4b1.tar.bz2
glsl/standalone_scaffolding: Add stub for _mesa_warning()
A subsequent patch will add mesa/main/imports.c as a dependency to the compiler, which in turn requires that _mesa_warning() be defined. The real definition of _mesa_warning() is in mesa/main/errors.c, but to pull that file into the standalone scaffolding would require transitively pulling in the dispatch tables. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/glsl/standalone_scaffolding.cpp')
-rw-r--r--src/glsl/standalone_scaffolding.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 33d3804..ccf5b4f 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -34,6 +34,24 @@
#include "ralloc.h"
void
+_mesa_warning(struct gl_context *ctx, const char *fmt, ...)
+{
+ va_list vargs;
+ (void) ctx;
+
+ va_start(vargs, fmt);
+
+ /* This output is not thread-safe, but that's good enough for the
+ * standalone compiler.
+ */
+ fprintf(stderr, "Mesa warning: ");
+ vfprintf(stderr, fmt, vargs);
+ fprintf(stderr, "\n");
+
+ va_end(vargs);
+}
+
+void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{