Implement GLX_SGI_swap_control.
Regenerate from glX_API.xml 1.2. Add infrastructure to support GLX_SGI_swap_control for AIGLX when the DRI driver enables it. Tested with R300.
This commit is contained in:
parent
a9ef586291
commit
0f9cfb2f75
|
@ -77,5 +77,6 @@ libglx_la_SOURCES = \
|
|||
singlepixswap.c \
|
||||
singlesize.c \
|
||||
singlesize.h \
|
||||
swap_interval.c \
|
||||
unpack.h \
|
||||
xfont.c
|
||||
|
|
|
@ -60,7 +60,7 @@ struct extension_info {
|
|||
unsigned char version_minor;
|
||||
|
||||
/**
|
||||
* Is driver supported foced by the ABI?
|
||||
* Is driver support forced by the ABI?
|
||||
*/
|
||||
unsigned char driver_support;
|
||||
};
|
||||
|
@ -77,9 +77,7 @@ static const struct extension_info known_glx_extensions[] = {
|
|||
{ GLX(MESA_copy_sub_buffer), VER(0,0), N, },
|
||||
{ GLX(OML_swap_method), VER(0,0), Y, },
|
||||
{ GLX(SGI_make_current_read), VER(1,3), N, },
|
||||
#if 0 /* GLX protocol not yet supported for these. */
|
||||
{ GLX(SGI_swap_control), VER(0,0), N, },
|
||||
#endif
|
||||
{ GLX(SGIS_multisample), VER(0,0), Y, },
|
||||
{ GLX(SGIX_fbconfig), VER(1,3), Y, },
|
||||
{ GLX(SGIX_pbuffer), VER(1,3), N, },
|
||||
|
|
|
@ -2274,9 +2274,6 @@ int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/*
|
||||
** This sample implemention does not support any private requests.
|
||||
*/
|
||||
cl->client->errorValue = req->vendorCode;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
|
|
@ -148,6 +148,22 @@ __glXDRIenterServer(void)
|
|||
DRIWakeupHandler(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* \bug
|
||||
* We're jumping through hoops here to get the DRIdrawable which the DRI
|
||||
* driver tries to keep to it self... cf. FIXME in \c createDrawable.
|
||||
*/
|
||||
static void
|
||||
__glXDRIdrawableFoo(__GLXDRIdrawable *draw)
|
||||
{
|
||||
__GLXDRIscreen * const screen =
|
||||
(__GLXDRIscreen *) __glXgetActiveScreen(draw->base.pDraw->pScreen->myNum);
|
||||
|
||||
draw->driDrawable = (*screen->driScreen.getDrawable)(NULL,
|
||||
draw->base.drawId,
|
||||
screen->driScreen.private);
|
||||
}
|
||||
|
||||
static void
|
||||
__glXDRIdrawableDestroy(__GLXdrawable *private)
|
||||
{
|
||||
|
@ -172,16 +188,8 @@ static GLboolean
|
|||
__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
||||
{
|
||||
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
|
||||
__GLXDRIscreen *screen;
|
||||
|
||||
/* FIXME: We're jumping through hoops here to get the DRIdrawable
|
||||
* which the dri driver tries to keep to it self... cf. FIXME in
|
||||
* createDrawable. */
|
||||
|
||||
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
|
||||
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
|
||||
private->base.drawId,
|
||||
screen->driScreen.private);
|
||||
__glXDRIdrawableFoo(private);
|
||||
|
||||
(*private->driDrawable->swapBuffers)(NULL,
|
||||
private->driDrawable->private);
|
||||
|
@ -189,21 +197,26 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
|
||||
{
|
||||
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
|
||||
|
||||
__glXDRIdrawableFoo(draw);
|
||||
|
||||
draw->driDrawable->swap_interval = interval;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
|
||||
__GLXDRIscreen *screen;
|
||||
|
||||
/* FIXME: We're jumping through hoops here to get the DRIdrawable
|
||||
* which the dri driver tries to keep to it self... cf. FIXME in
|
||||
* createDrawable. */
|
||||
|
||||
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
|
||||
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
|
||||
private->base.drawId,
|
||||
screen->driScreen.private);
|
||||
__glXDRIdrawableFoo(private);
|
||||
|
||||
(*private->driDrawable->copySubBuffer)(NULL,
|
||||
private->driDrawable->private,
|
||||
|
@ -849,6 +862,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
screen->base.destroy = __glXDRIscreenDestroy;
|
||||
screen->base.createContext = __glXDRIscreenCreateContext;
|
||||
screen->base.createDrawable = __glXDRIscreenCreateDrawable;
|
||||
screen->base.swapInterval = __glXDRIdrawableSwapInterval;
|
||||
screen->base.pScreen = pScreen;
|
||||
|
||||
__glXInitExtensionEnableBits(screen->glx_enable_bits);
|
||||
|
|
|
@ -62,6 +62,8 @@ struct __GLXscreen {
|
|||
DrawablePtr pDraw,
|
||||
XID drawId,
|
||||
__GLcontextModes *modes);
|
||||
int (*swapInterval) (__GLXdrawable *drawable,
|
||||
int interval);
|
||||
|
||||
ScreenPtr pScreen;
|
||||
|
||||
|
|
|
@ -401,8 +401,8 @@ extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc);
|
||||
|
@ -549,6 +549,8 @@ extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -679,8 +681,8 @@ extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
|
||||
|
|
|
@ -1557,7 +1557,7 @@ static const void *VendorPriv_function_table[80][2] = {
|
|||
/* [ 69] = 5157 */ {NULL, NULL},
|
||||
/* [ 70] = 5158 */ {NULL, NULL},
|
||||
/* [ 71] = 5159 */ {NULL, NULL},
|
||||
/* [ 72] = 65536 */ {NULL, NULL},
|
||||
/* [ 72] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI},
|
||||
/* [ 73] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
|
||||
/* [ 74] = 65538 */ {NULL, NULL},
|
||||
/* [ 75] = 65539 */ {NULL, NULL},
|
||||
|
|
Loading…
Reference in New Issue
Block a user