Un-glx-libcwrap DMX GLX proxy so it works without GL/include.
This commit is contained in:
parent
4c225a3a8b
commit
f029e9a32d
|
@ -59,7 +59,6 @@
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
#include "GL/glx_ansic.h"
|
|
||||||
|
|
||||||
#include "GL/glxproto.h"
|
#include "GL/glxproto.h"
|
||||||
#include "glxvendor.h"
|
#include "glxvendor.h"
|
||||||
|
@ -158,7 +157,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
if (!glxc) {
|
if (!glxc) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
__glXMemset(glxc, 0, sizeof(__GLXcontext));
|
memset(glxc, 0, sizeof(__GLXcontext));
|
||||||
|
|
||||||
pScreen = screenInfo.screens[screen];
|
pScreen = screenInfo.screens[screen];
|
||||||
pGlxScreen = &__glXActiveScreens[screen];
|
pGlxScreen = &__glXActiveScreens[screen];
|
||||||
|
@ -610,7 +609,7 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawableP
|
||||||
cl->currentContexts = table;
|
cl->currentContexts = table;
|
||||||
cl->numCurrentContexts++;
|
cl->numCurrentContexts++;
|
||||||
|
|
||||||
__glXMemset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
|
memset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
|
||||||
screenInfo.numScreens * sizeof(GLXContextTag));
|
screenInfo.numScreens * sizeof(GLXContextTag));
|
||||||
|
|
||||||
return num+1;
|
return num+1;
|
||||||
|
@ -2589,7 +2588,7 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
|
||||||
cl->GLClientminorVersion = req->minor;
|
cl->GLClientminorVersion = req->minor;
|
||||||
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
||||||
buf = (const char *)(req+1);
|
buf = (const char *)(req+1);
|
||||||
cl->GLClientextensions = __glXStrdup(buf);
|
cl->GLClientextensions = strdup(buf);
|
||||||
|
|
||||||
to_screen = screenInfo.numScreens - 1;
|
to_screen = screenInfo.numScreens - 1;
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include <windowstr.h>
|
#include <windowstr.h>
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "GL/glx_ansic.h"
|
|
||||||
#include "glxvendor.h"
|
#include "glxvendor.h"
|
||||||
|
|
||||||
extern int glxIsExtensionSupported( char *ext );
|
extern int glxIsExtensionSupported( char *ext );
|
||||||
|
@ -714,7 +713,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
||||||
}
|
}
|
||||||
cl->largeCmdBufSize = hdr->length;
|
cl->largeCmdBufSize = hdr->length;
|
||||||
}
|
}
|
||||||
__glXMemcpy(cl->largeCmdBuf, pc, req->dataBytes);
|
memcpy(cl->largeCmdBuf, pc, req->dataBytes);
|
||||||
|
|
||||||
cl->largeCmdBytesSoFar = req->dataBytes;
|
cl->largeCmdBytesSoFar = req->dataBytes;
|
||||||
cl->largeCmdBytesTotal = hdr->length;
|
cl->largeCmdBytesTotal = hdr->length;
|
||||||
|
@ -737,7 +736,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
||||||
return __glXBadLargeRequest;
|
return __glXBadLargeRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
|
memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
|
||||||
pc, req->dataBytes);
|
pc, req->dataBytes);
|
||||||
|
|
||||||
cl->largeCmdBytesSoFar += req->dataBytes;
|
cl->largeCmdBytesSoFar += req->dataBytes;
|
||||||
|
@ -759,7 +758,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
||||||
return __glXBadLargeRequest;
|
return __glXBadLargeRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
|
memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
|
||||||
pc, req->dataBytes);
|
pc, req->dataBytes);
|
||||||
|
|
||||||
cl->largeCmdBytesSoFar += req->dataBytes;
|
cl->largeCmdBytesSoFar += req->dataBytes;
|
||||||
|
|
|
@ -79,7 +79,7 @@ static void ResetClientState(int clientIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_be_displays = cl->be_displays;
|
keep_be_displays = cl->be_displays;
|
||||||
__glXMemset(cl, 0, sizeof(__GLXclientState));
|
memset(cl, 0, sizeof(__GLXclientState));
|
||||||
cl->be_displays = keep_be_displays;
|
cl->be_displays = keep_be_displays;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -90,7 +90,7 @@ static void ResetClientState(int clientIndex)
|
||||||
cl->GLClientminorVersion = 0;
|
cl->GLClientminorVersion = 0;
|
||||||
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
||||||
|
|
||||||
__glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -414,14 +414,14 @@ static int __glXDispatch(ClientPtr client)
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
__glXMemset(cl, 0, sizeof(__GLXclientState));
|
memset(cl, 0, sizeof(__GLXclientState));
|
||||||
|
|
||||||
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
|
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
|
||||||
if (!cl->be_displays) {
|
if (!cl->be_displays) {
|
||||||
__glXFree( cl );
|
__glXFree( cl );
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
__glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cl->inUse) {
|
if (!cl->inUse) {
|
||||||
|
@ -468,7 +468,7 @@ static int __glXSwapDispatch(ClientPtr client)
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
__glXMemset(cl, 0, sizeof(__GLXclientState));
|
memset(cl, 0, sizeof(__GLXclientState));
|
||||||
|
|
||||||
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
|
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
|
||||||
if (!cl->be_displays) {
|
if (!cl->be_displays) {
|
||||||
|
@ -476,7 +476,7 @@ static int __glXSwapDispatch(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cl->inUse) {
|
if (!cl->inUse) {
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
#include <extnsionst.h>
|
#include <extnsionst.h>
|
||||||
#include <resource.h>
|
#include <resource.h>
|
||||||
#include <scrnintstr.h>
|
#include <scrnintstr.h>
|
||||||
#include "GL/glx_ansic.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <pixmapstr.h>
|
#include <pixmapstr.h>
|
||||||
#include <windowstr.h>
|
#include <windowstr.h>
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
#include "GL/glx_ansic.h"
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ __glXCalloc(size_t numElements, size_t elementSize)
|
||||||
/* XXX: handle out of memory error */
|
/* XXX: handle out of memory error */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
__glXMemset(addr, 0, size);
|
memset(addr, 0, size);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <dmx-config.h>
|
#include <dmx-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include "dmx.h"
|
#include "dmx.h"
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user