From 5af5260f3cc6642c16d6b32b3f42693ffd50374b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 30 Oct 2006 22:07:00 +0000 Subject: Get DRI drawable from framebuffer object. In the software rasterization fallbacks, get the __DRIdrawablePrivate pointer from the driRenderbuffer that is passed in. This eliminates the need for the mesa_drawable pointer in MGA context structure. This partially fixes bug #8799. wincopy no longer produces a black window for the destination window, but it does produce incorrect results if the destination window is resized. --- src/mesa/drivers/dri/mga/mgaspan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/mga/mgaspan.c') diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c index dbc7fc884c..05dcbb8526 100644 --- a/src/mesa/drivers/dri/mga/mgaspan.c +++ b/src/mesa/drivers/dri/mga/mgaspan.c @@ -36,9 +36,9 @@ #define LOCAL_VARS \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = mmesa->mesa_drawable; \ __DRIscreenPrivate *sPriv = mmesa->driScreen; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ + const __DRIdrawablePrivate *dPriv = drb->dPriv; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ @@ -52,9 +52,9 @@ #define LOCAL_DEPTH_VARS \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = mmesa->mesa_drawable; \ __DRIscreenPrivate *sPriv = mmesa->driScreen; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ + const __DRIdrawablePrivate *dPriv = drb->dPriv; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ -- cgit v1.2.3