aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/glwrap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-08 22:44:09 +0000
committermarha <marha@users.sourceforge.net>2009-12-08 22:44:09 +0000
commit610854e9a57f1a7d7dbfdef90d35f60fde7c6413 (patch)
treebcd51b5d4d6e708df363c5deeb7be713e58dc443 /xorg-server/hw/xwin/glx/glwrap.c
parentee49b108be991a90e1fd1670c52193433a7fb908 (diff)
downloadvcxsrv-610854e9a57f1a7d7dbfdef90d35f60fde7c6413.tar.gz
vcxsrv-610854e9a57f1a7d7dbfdef90d35f60fde7c6413.tar.bz2
vcxsrv-610854e9a57f1a7d7dbfdef90d35f60fde7c6413.zip
DC should only be released after the context is not current anymore on opengl
Diffstat (limited to 'xorg-server/hw/xwin/glx/glwrap.c')
-rw-r--r--xorg-server/hw/xwin/glx/glwrap.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c
index 2cbab5f4a..75065726f 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;
@@ -66,6 +68,7 @@ glWinCallDelta(void)
glWinIndirectProcCallsLast = glWinIndirectProcCalls;
}
}
+#endif
static PROC
glWinResolveHelper(PROC *cache, char *symbol)
@@ -78,12 +81,12 @@ glWinResolveHelper(PROC *cache, char *symbol)
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;
}
}
@@ -101,6 +104,12 @@ 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; \
proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
@@ -108,7 +117,7 @@ glWinResolveHelper(PROC *cache, char *symbol)
__glXErrorCallBack(0); \
return retval; \
} \
- glWinIndirectProcCalls++;
+ INCPROCCALLS
#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,)