summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-12-01 01:10:42 +0000
committerBrian Paul <[email protected]>1999-12-01 01:10:42 +0000
commit9493e540f91da3558e7221714c043ee8b95986e4 (patch)
tree83ad9ee0fb8fdba69f6b1a864679f580d722e7f8
parent7138d38cc1ee5a6336900f33bff96c10dab62e1d (diff)
fxInitPixelTables() change for Voodoo 1/2 vs 3
-rw-r--r--src/mesa/drivers/glide/fxapi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index 6f789adfd07..8dec237e044 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -978,8 +978,18 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
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 */