summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/galahad/glhd_context.h
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-06-22 22:37:39 -0700
committerCorbin Simpson <[email protected]>2010-06-22 22:49:13 -0700
commit7d551eb03df0a732e9e55dd960afffc6a1525377 (patch)
tree7f330e0259fd77d59964b0c3464b607b1ff0b040 /src/gallium/drivers/galahad/glhd_context.h
parent75612aa19946c6e546ff72b83d0e1bbe4db90db2 (diff)
glhd: Add glhd_warn for unconditional stderr output.
Design decision. Bad API errors should never be silenced. Of course, you can always not use galahad.
Diffstat (limited to 'src/gallium/drivers/galahad/glhd_context.h')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.h b/src/gallium/drivers/galahad/glhd_context.h
index b316ec32b16..a8753d0255a 100644
--- a/src/gallium/drivers/galahad/glhd_context.h
+++ b/src/gallium/drivers/galahad/glhd_context.h
@@ -28,6 +28,8 @@
#ifndef GLHD_CONTEXT_H
#define GLHD_CONTEXT_H
+#include <stdio.h>
+
#include "pipe/p_state.h"
#include "pipe/p_context.h"
@@ -49,4 +51,11 @@ galahad_context(struct pipe_context *pipe)
return (struct galahad_context *)pipe;
}
+#define glhd_warn(...) \
+do { \
+ fprintf(stderr, "galahad: %s: ", __FUNCTION__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+} while (0)
+
#endif /* GLHD_CONTEXT_H */