summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-01-11 17:12:48 +0000
committerKeith Whitwell <[email protected]>2005-01-11 17:12:48 +0000
commit3bd6e3d532d5c4e0d1c7ef17b13d9784589771c4 (patch)
treef243a2bb68f3d56a50ca2b7e104b36f36cf2b1d2 /src/mesa/drivers
parent5b5e6cc120727a38592d7e4d240ed54f759f446d (diff)
Disable bogus pbuffer code (though this could be revived with a little
attention). Correctly advertise FBConfigs with GL_BGRA rather than GL_BGR.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c22
2 files changed, 13 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 11f99409986..b55600f6f15 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 b7f049022b2..7ced8fe50fa 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 */