aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-03-02 08:15:24 +0000
committerDaniel Borca <[email protected]>2004-03-02 08:15:24 +0000
commitfa21787b52d85a7aeaf5de64a39e019f39fcfa07 (patch)
tree5465c5008210bef81266b91acc4988fcf01c33bf /src/mesa/drivers/x11
parent725a56f157506a0122912da9f8df92b275da5b98 (diff)
workaround for crash-upon-exit in verbose mode
fxMesa now uses grQueryResolution minor fixes to X11 and DOS drivers
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_api.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 16963ab71c7..c36c9c9c6a2 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1830,15 +1830,19 @@ XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, XMesaWindow w,
}
attribs[numAttribs++] = FXMESA_NONE;
- /* [dBorca] we should take an envvar for `fxMesaSelectCurrentBoard'!!! */
- if ((hw = fxMesaSelectCurrentBoard(0))==GR_SSTTYPE_VOODOO) {
+ /* [dBorca] we should take an envvar for `fxMesaSelectCurrentBoard'!!! */
+ hw = fxMesaSelectCurrentBoard(0);
+ if ((hw == GR_SSTTYPE_VOODOO) || (hw == GR_SSTTYPE_Voodoo2)) {
b->FXctx = fxMesaCreateBestContext(0, b->width, b->height, attribs);
if ((v->undithered_pf!=PF_Index) && (b->backimage)) {
b->FXisHackUsable = b->FXctx ? GL_TRUE : GL_FALSE;
- if (fxEnvVar[0]=='w' || fxEnvVar[0]=='W')
- b->FXwindowHack = b->FXctx ? GL_TRUE : GL_FALSE;
- else
+ if (b->FXctx && (fxEnvVar[0]=='w' || fxEnvVar[0]=='W')) {
+ b->FXwindowHack = GL_TRUE;
+ FX_grSstControl(GR_CONTROL_DEACTIVATE);
+ }
+ else {
b->FXwindowHack = GL_FALSE;
+ }
}
}
else {
@@ -2210,6 +2214,10 @@ GLboolean XMesaSetFXmode( GLint mode )
return GL_FALSE;
}
if (ctx) {
+ /* [dBorca] Hack alert:
+ * oh, this is sooo wrong: ctx above is
+ * really an fxMesaContext, not an XMesaContext
+ */
XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (mode == XMESA_FX_WINDOW) {
if (xmesa->xm_draw_buffer->FXisHackUsable) {
@@ -2269,10 +2277,7 @@ static void FXgetImage( XMesaBuffer b )
xmesa_alloc_back_buffer( b );
}
- /* [dBorca]
- * not needed for Voodoo2 anymore.
- * should we test fxMesa->bgrOrder?
- */
+ /* [dBorca] we're always in the right GR_COLORFORMAT... aren't we? */
/* grLfbWriteColorFormat(GR_COLORFORMAT_ARGB); */
if (b->xm_visual->undithered_pf==PF_5R6G5B) {
/* Special case: 16bpp RGB */