diff options
author | Kristian Høgsberg <[email protected]> | 2010-07-19 22:40:22 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-07-19 22:45:51 -0400 |
commit | a7292f2920a28a190ca39ce530454a852ec36d59 (patch) | |
tree | 9cb4408b74319169602e4e151aa1eec55d26aaf4 /src/glx/dri_glx.c | |
parent | bab13969d8bf3ff9259524c3f4ab96d81485ccef (diff) |
glx: Move DRI CopySubBuffer extension to DRI1 code
We do this in the X server for DRI2.
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r-- | src/glx/dri_glx.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index aba7b1b844e..369d07a27fe 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -70,6 +70,7 @@ struct dri_screen const __DRIswapControlExtension *swapControl; const __DRImediaStreamCounterExtension *msc; const __DRIconfig **driver_configs; + const __DRIcopySubBufferExtension *driCopySubBuffer; void *driver; int fd; @@ -652,9 +653,10 @@ driCopySubBuffer(__GLXDRIdrawable * pdraw, int x, int y, int width, int height) { struct dri_drawable *pdp = (struct dri_drawable *) pdraw; + struct dri_screen *psc = (struct dri_screen *) pdp->base.psc; - (*pdp->base.psc->driCopySubBuffer->copySubBuffer) (pdp->driDrawable, - x, y, width, height); + (*psc->driCopySubBuffer->copySubBuffer) (pdp->driDrawable, + x, y, width, height); } static void @@ -788,6 +790,14 @@ driBindExtensions(struct dri_screen *psc, const __DRIextension **extensions) __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync"); } + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { + psc->driCopySubBuffer = (__DRIcopySubBufferExtension *) extensions[i]; + __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer"); + } + + if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) { + __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read"); + } /* Ignore unknown extensions */ } } @@ -852,11 +862,10 @@ driCreateScreen(int screen, __GLXdisplayPrivate *priv) extensions = psc->core->getExtensions(psc->driScreen); driBindExtensions(psc, extensions); - driBindCommonExtensions(&psc->base, extensions); psp = &psc->vtable; psc->base.driScreen = psp; - if (psc->base.driCopySubBuffer) + if (psc->driCopySubBuffer) psp->copySubBuffer = driCopySubBuffer; psp->destroyScreen = driDestroyScreen; |