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.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c
index 73cff3cc1..4d2b77343 100644
--- a/xorg-server/hw/xwin/glx/glwrap.c
+++ b/xorg-server/hw/xwin/glx/glwrap.c
@@ -39,12 +39,13 @@
#include <X11/Xwindows.h>
#include <GL/gl.h>
#include <GL/glext.h>
+#include <glx/glheader.h>
#include <glx/glxserver.h>
#include <glx/glxext.h>
-#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 +66,7 @@ glWinCallDelta(void)
glWinIndirectProcCallsLast = glWinIndirectProcCalls;
}
}
+#endif
static PROC
glWinResolveHelper(PROC * cache, const char *symbol)
@@ -75,11 +77,11 @@ glWinResolveHelper(PROC * cache, const 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 +97,20 @@ glWinResolveHelper(PROC * cache, const 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,)