aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/glwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/glx/glwrap.c')
-rw-r--r--xorg-server/hw/xwin/glx/glwrap.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c
index 690b82926..21a42aa9c 100644
--- a/xorg-server/hw/xwin/glx/glwrap.c
+++ b/xorg-server/hw/xwin/glx/glwrap.c
@@ -44,7 +44,9 @@
#include <glx/glapi.h>
#include <glx/dispatch.h>
#include <glwindows.h>
+#include <winmsg.h>
+#ifdef _DEBUG
static unsigned int glWinIndirectProcCalls = 0;
static unsigned int glWinDirectProcCalls = 0;
@@ -65,6 +67,7 @@ glWinCallDelta(void)
glWinIndirectProcCallsLast = glWinIndirectProcCalls;
}
}
+#endif
static PROC
glWinResolveHelper(PROC * cache, char *symbol)
@@ -75,11 +78,11 @@ glWinResolveHelper(PROC * cache, char *symbol)
if ((*cache) == NULL) {
proc = wglGetProcAddress(symbol);
if (proc == NULL) {
- ErrorF("glwrap: Can't resolve \"%s\"\n", symbol);
+ winDebug("glwrap: Can't resolve \"%s\"\n", symbol);
(*cache) = (PROC) - 1;
}
else {
- ErrorF("glwrap: Resolved \"%s\"\n", symbol);
+ winDebug("glwrap: Resolved \"%s\"\n", symbol);
(*cache) = proc;
}
}
@@ -95,14 +98,20 @@ glWinResolveHelper(PROC * cache, char *symbol)
return proc;
}
+#ifdef _DEBUG
+#define INCPROCCALLS glWinIndirectProcCalls++;
+#else
+#define INCPROCCALLS
+#endif
+
#define RESOLVE_RET(proctype, symbol, retval) \
static PROC cache = NULL; \
- __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
+ proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
if (proc == NULL) { \
__glXErrorCallBack(0); \
return retval; \
} \
- glWinIndirectProcCalls++;
+ INCPROCCALLS
#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,)