summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/errors.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-03-04 15:39:37 +0200
committerIan Romanick <[email protected]>2014-05-02 11:58:36 -0700
commit59ad2e6696c51dc9b3514770abb550df663ecc7b (patch)
tree13337e5cea8865b2c544bec4e5f108c68ad07f8b /src/mesa/main/errors.c
parent267e28bb62bb7ca2ebffc9a713bd5fa5fbd78ac7 (diff)
mesa: Add _mesa_error_no_memory for logging out-of-memory messages
This can be called from locations that don't have a context pointer handy. This patch also adds enough infrastructure so that the unit tests for the GLSL compiler and the stand-alone compiler will build and function. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Juha-Pekka Heikkila <[email protected]>
Diffstat (limited to 'src/mesa/main/errors.c')
-rw-r--r--src/mesa/main/errors.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 30a86729873..aa0ff50ac37 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -1414,6 +1414,12 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
_mesa_record_error(ctx, error);
}
+void
+_mesa_error_no_memory(const char *caller)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "out of memory in %s", caller);
+}
/**
* Report debug information. Print error message to stderr via fprintf().