diff options
author | Ian Romanick <idr@us.ibm.com> | 2006-11-10 00:14:30 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2006-11-10 00:14:30 +0000 |
commit | d7815f59134b0fb5cb3b56b72b22ba55002265ac (patch) | |
tree | 56c4ea5774573e1d9593363e2a19e4da0b240aef /src/mesa/drivers/dri/unichrome/via_span.c | |
parent | 3ce4adaa8fc0cb067dd9da3f358556490954f776 (diff) |
Implement GLX_SGI_make_current_read
Discontinue use of the old GetBuffeSize interface. Track both the
current read-drawable and the current draw-drawable. After moving
some context state to via_rednerbuffer, GLX_SGI_make_current_read can
be enabled.
The extension works, but the wincopy test prodcues a black window for
the destination window. After messing around with the window and
looking at the code, I believe the problem is in the handling of
buffer swap requests on a drawable that isn't the current draw-drawable.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_span.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_span.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index 6ff95cc444..f1ed98036b 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -41,13 +41,12 @@ #undef LOCAL_VARS #define LOCAL_VARS \ - struct via_context *vmesa = VIA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ + __DRIdrawablePrivate *dPriv = vrb->dPriv; \ GLuint pitch = vrb->pitch; \ GLuint height = dPriv->h; \ GLint p = 0; \ - char *buf = (char *)(vrb->origMap + vmesa->drawXoff * vrb->bpp); \ + char *buf = (char *)(vrb->origMap + vrb->drawXoff * vrb->bpp); \ (void) p; /* ================================================================ @@ -79,12 +78,11 @@ /* 16 bit depthbuffer functions. */ #define LOCAL_DEPTH_VARS \ - struct via_context *vmesa = VIA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ + __DRIdrawablePrivate *dPriv = vrb->dPriv; \ GLuint depth_pitch = vrb->pitch; \ GLuint height = dPriv->h; \ - char *buf = (char *)(vrb->map + (vmesa->drawXoff * vrb->bpp/8)) + char *buf = (char *)(vrb->map + (vrb->drawXoff * vrb->bpp/8)) #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS |