From 3bd6e3d532d5c4e0d1c7ef17b13d9784589771c4 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 11 Jan 2005 17:12:48 +0000 Subject: Disable bogus pbuffer code (though this could be revived with a little attention). Correctly advertise FBConfigs with GL_BGRA rather than GL_BGR. --- src/mesa/drivers/dri/unichrome/via_context.c | 6 ++++++ src/mesa/drivers/dri/unichrome/via_screen.c | 22 +++++++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 11f9940998..b55600f6f1 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -469,6 +469,12 @@ viaCreateContext(const __GLcontextModes *mesaVis, vmesa->renderIndex = ~0; vmesa->setupIndex = ~0; + /* KW: Hardwire this. Was previously set bogusly in + * viaCreateBuffer. Needs work before PBUFFER can be used: + */ + vmesa->drawType = GLX_WINDOW_BIT; + + make_empty_list(&vmesa->TexObjList); make_empty_list(&vmesa->SwappedOut); diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index b7f049022b..7ced8fe50f 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -216,20 +216,14 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap) { - viaContextPtr vmesa = 0; - GET_CURRENT_CONTEXT(ctx); GLboolean swStencil = (mesaVis->stencilBits > 0 && mesaVis->depthBits != 24); - if (ctx) - vmesa = VIA_CONTEXT(ctx); - - if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__); - - /* KW: removed bogus depth recalculations. - */ if (isPixmap) { + /* KW: This needs work, disabled for now: + */ +#if 0 driDrawPriv->driverPrivate = (void *) _mesa_create_framebuffer(mesaVis, GL_FALSE, /* software depth buffer? */ @@ -237,9 +231,10 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, mesaVis->accumRedBits > 0, GL_FALSE /* s/w alpha planes */); - if (vmesa) vmesa->drawType = GLX_PBUFFER_BIT; if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__); return (driDrawPriv->driverPrivate != NULL); +#endif + return GL_FALSE; } else { driDrawPriv->driverPrivate = (void *) @@ -249,8 +244,6 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, mesaVis->accumRedBits > 0, GL_FALSE /* s/w alpha planes */); - if (vmesa) vmesa->drawType = GLX_WINDOW_BIT; - if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__); return (driDrawPriv->driverPrivate != NULL); } } @@ -259,9 +252,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, static void viaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) { - if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__); _mesa_destroy_framebuffer((GLframebuffer *)(driDrawPriv->driverPrivate)); - if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__); } @@ -335,7 +326,7 @@ viaFillInModes( unsigned pixel_bits, GLboolean have_back_buffer ) fb_type = GL_UNSIGNED_SHORT_5_6_5; } else { - fb_format = GL_BGR; + fb_format = GL_BGRA; fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; } @@ -413,6 +404,7 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc } } + fprintf(stderr, "%s - succeeded\n", __FUNCTION__); return (void *) psp; } #endif /* USE_NEW_INTERFACE */ -- cgit v1.2.3