summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxapi.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-12-01 01:22:20 +0000
committerBrian Paul <[email protected]>1999-12-01 01:22:20 +0000
commiteb6e3d3613fda6e91f3b3fd9fb1e6a656cf461db (patch)
tree030c821ff0afe74cd7a669939828eb33d6f27de7 /src/mesa/drivers/glide/fxapi.c
parentb7a4304f70c498ff68fceaf584b579ea2df91acb (diff)
fxInitPixelTables() change for Voodoo 1/2 vs 3
Diffstat (limited to 'src/mesa/drivers/glide/fxapi.c')
-rw-r--r--src/mesa/drivers/glide/fxapi.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index ca561881037..cb4230a5aec 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -972,12 +972,27 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
}
/* Pixel tables are use during pixel read-back */
+#if FXMESA_USE_ARGB
+ fxInitPixelTables(GL_FALSE); /* Force RGB pixel order */
+#else
if (glbHWConfig.SSTs[glbCurrentBoard].type == GR_SSTTYPE_VOODOO) {
- fxInitPixelTables(GL_TRUE); /* use BGR pixel order on Voodoo1/2 */
+ /* jk991130 - GROSS HACK!!! - Voodoo 3s don't use BGR!!
+ * the only way to tell if it's a Voodoo 3 at this stage of the
+ * ballgame (no Glide 3.x for linux *yet*) is to query the # of TMUs
+ * as Voodoo3s have 2 TMUs on board, Banshee has only 1
+ * Thanks to Joseph Kain for that one
+ */
+ if (glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx == 2) {
+ fxInitPixelTables(GL_FALSE); /* use RGB pixel order (Voodoo3) */
+ }
+ else {
+ fxInitPixelTables(GL_TRUE); /* use BGR pixel order on Voodoo1/2 */
+ }
}
else {
fxInitPixelTables(GL_FALSE); /* use RGB pixel order otherwise */
}
+#endif
fxMesa->width=FX_grSstScreenWidth();
fxMesa->height=FX_grSstScreenHeight();