diff options
author | Kristian Høgsberg <krh@redhat.com> | 2006-07-06 02:28:55 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2006-07-06 21:25:29 -0400 |
commit | b84374b2917a91a7732e780ffab6a29c807a3ecc (patch) | |
tree | 05be5a759ebc59f1a9be907fe78a852f6dec0f22 /GL | |
parent | 2152e2d364bdd179cf218cde446c763d8c8bb833 (diff) |
Add GLX_MESA_copy_sub_buffer marshalling support.
Diffstat (limited to 'GL')
-rw-r--r-- | GL/glx/g_disptab.h | 9 | ||||
-rw-r--r-- | GL/glx/glxcmds.c | 25 | ||||
-rw-r--r-- | GL/glx/glxcmdsswap.c | 29 | ||||
-rw-r--r-- | GL/glx/glxscreens.c | 1 |
4 files changed, 62 insertions, 2 deletions
diff --git a/GL/glx/g_disptab.h b/GL/glx/g_disptab.h index 9be5bdf2c..a83c7a8ab 100644 --- a/GL/glx/g_disptab.h +++ b/GL/glx/g_disptab.h @@ -48,6 +48,7 @@ extern int __glXCopyContext(__GLXclientState*, GLbyte*); extern int __glXSwapBuffers(__GLXclientState*, GLbyte*); extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc); extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); extern int __glXUseXFont(__GLXclientState*, GLbyte*); extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*); @@ -85,6 +86,7 @@ extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*); extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*); extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*); extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*); @@ -124,4 +126,11 @@ extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE]; extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE]; extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE]; extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE]; + +/* Copied from mesa src/glx/x11/glxcmds.c + * + * Apparently there's no standardized opcode for this extension. + */ +#define X_GLXvop_CopySubBufferMESA 5154 /* temporary */ + #endif /* _GLX_g_disptab_h_ */ diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index 8033f5d10..3ec796c0f 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -1602,6 +1602,27 @@ int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) pGlxPixmap); } +int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + GLXDrawable drawId; + int x, y, width, height; + + (void) client; + (void) req; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + x = *((INT32 *) (pc + 4)); + y = *((INT32 *) (pc + 8)); + width = *((INT32 *) (pc + 12)); + height = *((INT32 *) (pc + 16)); + + return BadRequest; +} + /* ** Get drawable attributes */ @@ -2238,7 +2259,9 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc) case X_GLXvop_BindTexImageEXT: return __glXBindTexImageEXT(cl, pc); case X_GLXvop_ReleaseTexImageEXT: - return __glXReleaseTexImageEXT(cl, pc); + return __glXReleaseTexImageEXT(cl, pc); + case X_GLXvop_CopySubBufferMESA: + return __glXCopySubBufferMESA(cl, pc); } #endif diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c index b8f958bb3..4ce53b7b7 100644 --- a/GL/glx/glxcmdsswap.c +++ b/GL/glx/glxcmdsswap.c @@ -494,6 +494,31 @@ int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) return __glXReleaseTexImageEXT(cl, (GLbyte *)pc); } +int __glXSwapCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + (void) drawId; + (void) buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(pc); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + return __glXCopySubBufferMESA(cl, pc); + +} + int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; @@ -973,7 +998,9 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) case X_GLXvop_BindTexImageEXT: return __glXSwapBindTexImageEXT(cl, pc); case X_GLXvop_ReleaseTexImageEXT: - return __glXSwapReleaseTexImageEXT(cl, pc); + return __glXSwapReleaseTexImageEXT(cl, pc); + case X_GLXvop_CopySubBufferMESA: + return __glXSwapCopySubBufferMESA(cl, pc); } #endif diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index 77654d3ab..3809af373 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -139,6 +139,7 @@ static char GLXServerExtensions[] = "GLX_SGIX_swap_barrier " #endif "GLX_SGIX_fbconfig " + "GLX_MESA_copy_sub_buffer " ; __GLXscreen **__glXActiveScreens; |