diff options
author | marha <marha@users.sourceforge.net> | 2015-03-22 14:10:47 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-03-22 14:10:47 +0100 |
commit | 3bc24b271f45f9f33484b8cf53b44f33f7e8a237 (patch) | |
tree | 193651a94adb3804e800747e993d07b92688e4d4 /mesalib/src/mapi/table.c | |
parent | c646056120fe14e4c4ccf81bac5d78d61225a8e8 (diff) | |
parent | 82c8df11062f72a7d467e26cedbbd8b322ff7a70 (diff) | |
download | vcxsrv-3bc24b271f45f9f33484b8cf53b44f33f7e8a237.tar.gz vcxsrv-3bc24b271f45f9f33484b8cf53b44f33f7e8a237.tar.bz2 vcxsrv-3bc24b271f45f9f33484b8cf53b44f33f7e8a237.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi.h
mesalib/src/mapi/glapi/glapi_nop.c
mesalib/src/mesa/main/bufferobj.c
Diffstat (limited to 'mesalib/src/mapi/table.c')
-rw-r--r-- | mesalib/src/mapi/table.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/mesalib/src/mapi/table.c b/mesalib/src/mapi/table.c index 0d2866618..748750197 100644 --- a/mesalib/src/mapi/table.c +++ b/mesalib/src/mapi/table.c @@ -30,16 +30,29 @@ #include "table.h" +static nop_handler_proc nop_handler = NULL; + +void +table_set_noop_handler(nop_handler_proc func) +{ + nop_handler = func; +} + static void noop_warn(const char *name) { - static int debug = -1; + if (nop_handler) { + nop_handler(name); + } + else { + static int debug = -1; - if (debug < 0) - debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")); + if (debug < 0) + debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")); - if (debug) - fprintf(stderr, "%s is no-op\n", name); + if (debug) + fprintf(stderr, "%s is no-op\n", name); + } } static int |