diff options
author | Kristian Høgsberg <krh@redhat.com> | 2006-03-12 00:11:34 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2006-03-12 00:11:34 +0000 |
commit | c3342c8000f6d2bfb61e2cf95e028d11b59698fa (patch) | |
tree | 854fa59122eff885f4f5bcf2300bdf69b5bb2b8f /GL/glx/glxcmdsswap.c | |
parent | b1b731c28630965d9e2defe62d1108270dc8264c (diff) |
Merge accel_indirect branch to HEAD.
Diffstat (limited to 'GL/glx/glxcmdsswap.c')
-rw-r--r-- | GL/glx/glxcmdsswap.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c index 5729cf851..e14106913 100644 --- a/GL/glx/glxcmdsswap.c +++ b/GL/glx/glxcmdsswap.c @@ -40,6 +40,7 @@ #include <dix-config.h> #endif +#include <string.h> #include "glxserver.h" #include "glxutil.h" #include <GL/glxtokens.h> @@ -389,6 +390,64 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) return __glXQueryContextInfoEXT(cl, pc); } +int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXBindTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXReleaseTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; + CARD32 *data; + + __GLX_DECLARE_SWAP_VARIABLES; + + data = (CARD32 *) (req + 1); + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(data); + + return __glXGetDrawableAttributesSGIX(cl, (GLbyte *)pc); +} + + /************************************************************************/ /* @@ -463,6 +522,19 @@ void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXT WriteToClient(client, length << 2, (char *)buf); } +void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply *reply, CARD32 *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->numAttribs); + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)reply); + __GLX_SWAP_INT_ARRAY((int *)buf, length); + WriteToClient(client, length << 2, (char *)buf); +} /************************************************************************/ @@ -824,6 +896,10 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(pc + 4); CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); return Success; + case X_GLXvop_BindTexImageEXT: + return __glXSwapBindTexImageEXT(cl, pc); + case X_GLXvop_ReleaseTexImageEXT: + return __glXSwapReleaseTexImageEXT(cl, pc); } #endif @@ -861,6 +937,8 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) return __glXSwapCreateContextWithConfigSGIX(cl, pc); case X_GLXvop_CreateGLXPixmapWithConfigSGIX: return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc); + case X_GLXvop_GetDrawableAttributesSGIX: + return __glXSwapGetDrawableAttributesSGIX(cl, pc); default: break; } |