diff options
author | Ian Romanick <idr@us.ibm.com> | 2006-01-12 00:21:59 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2006-01-12 00:21:59 +0000 |
commit | 847d83ec3c90c5b298eaf19ba55251b4a30f4155 (patch) | |
tree | 92ad2d46a7d304e5c6362a79d571642bbb94d223 /GL/glx/single2.c | |
parent | c56e9a8849ce8dd5c09732ae1860e409e7886690 (diff) |
Bug #2996: libglx / libGLcore should use a dispatch table
Port all changes from the (monolithic) accelerated_indirect-0-0-1 branch to
the modular trunk. This will break the Darwin and cygwin builds. Other
than the changes to symlink-mesa.sh and the various Makefile.am files,
to code is identical to what's in the branch.
Reviewed by: airlied, krh
Diffstat (limited to 'GL/glx/single2.c')
-rw-r--r-- | GL/glx/single2.c | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/GL/glx/single2.c b/GL/glx/single2.c index 9fee5ff49..fc6cdf160 100644 --- a/GL/glx/single2.c +++ b/GL/glx/single2.c @@ -42,9 +42,13 @@ #include "glxserver.h" #include "glxutil.h" #include "glxext.h" +#include "indirect_dispatch.h" #include "unpack.h" -#include "g_disptab.h" #include "GL/glx_ansic.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { @@ -71,7 +75,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) } cx->feedbackBufSize = size; } - glFeedbackBuffer(size, type, cx->feedbackBuf); + CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -99,7 +103,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc) } cx->selectBufSize = size; } - glSelectBuffer(size, cx->selectBuf); + CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -121,10 +125,10 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; newMode = *(GLenum*) pc; - retval = glRenderMode(newMode); + retval = CALL_RenderMode( GET_DISPATCH(), (newMode) ); /* Check that render mode worked */ - glGetIntegerv(GL_RENDER_MODE, &newModeCheck); + CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) ); if (newModeCheck != newMode) { /* Render mode change failed. Bail */ newMode = newModeCheck; @@ -212,7 +216,7 @@ int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc) return error; } - glFlush(); + CALL_Flush( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); return Success; } @@ -229,7 +233,7 @@ int __glXDisp_Finish(__GLXclientState *cl, GLbyte *pc) } /* Do a local glFinish */ - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); /* Send empty reply packet to indicate finish is finished */ @@ -326,7 +330,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) pc += __GLX_SINGLE_HDR_SIZE; name = *(GLenum *)(pc + 0); - string = (const char *)glGetString(name); + string = (const char *) CALL_GetString( GET_DISPATCH(), (name) ); client = cl->client; /* @@ -382,30 +386,3 @@ int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc) { return DoGetString(cl, pc, GL_FALSE); } - -int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answer[4]; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - __glXClearErrorOccured(); - glGetClipPlane(*(GLenum *)(pc + 0), answer); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(32); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(4); - } - return Success; -} - |