X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fx11%2Fdri_glx.c;h=44724d2c7d0ffce3ed21a356afca549eb4c3cc36;hb=b4866f8a5229d4769a49b4c54a1675a61497d206;hp=08c83a2310882c0980189edca09c66d11736e54b;hpb=8b512781345090a18403c43c908fa84c45b8016c;p=mesa.git diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 08c83a23108..44724d2c7d0 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -37,7 +37,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include "glheader.h" #include "glxclient.h" #include "glcontextmodes.h" #include "xf86dri.h" @@ -570,6 +569,18 @@ static __GLXDRIdrawable *driCreateDrawable(__GLXscreenConfigs *psc, return pdraw; } +static void driSwapBuffers(__GLXDRIdrawable *pdraw) +{ + (*pdraw->psc->core->swapBuffers)(pdraw->driDrawable); +} + +static void driCopySubBuffer(__GLXDRIdrawable *pdraw, + int x, int y, int width, int height) +{ + (*pdraw->psc->driCopySubBuffer->copySubBuffer)(pdraw->driDrawable, + x, y, width, height); +} + static void driDestroyScreen(__GLXscreenConfigs *psc) { /* Free the direct rendering per screen data */ @@ -637,10 +648,13 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen, } driBindExtensions(psc, 0); + if (psc->driCopySubBuffer) + psp->copySubBuffer = driCopySubBuffer; psp->destroyScreen = driDestroyScreen; psp->createContext = driCreateContext; psp->createDrawable = driCreateDrawable; + psp->swapBuffers = driSwapBuffers; return psp; }