diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-08-31 22:32:45 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-08-31 22:32:45 +0000 |
commit | b3fdfa1246c86c051516f3abb94902a79b24ce4a (patch) | |
tree | 964f521acdf6a58db2079b79a6064275a15df505 /src/mesa/drivers/glide/fxglidew.c | |
parent | 15915b03d06a34d103666235f346f1c81fb3e665 (diff) |
fbiRev and tmuRev weren't getting initialized when using Glide3
Diffstat (limited to 'src/mesa/drivers/glide/fxglidew.c')
-rw-r--r-- | src/mesa/drivers/glide/fxglidew.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/mesa/drivers/glide/fxglidew.c b/src/mesa/drivers/glide/fxglidew.c index 5155c825a8..3a26e0917f 100644 --- a/src/mesa/drivers/glide/fxglidew.c +++ b/src/mesa/drivers/glide/fxglidew.c @@ -332,34 +332,47 @@ void FX_grHints(GrHint_t hintType, FxU32 hintMask) { END_BOARD_LOCK(); } +/* + * Glide3 doesn't have the grSstQueryHardware function anymore. + * Instead, we call grGet() and fill in the data structures ourselves. + */ int FX_grSstQueryHardware(GrHwConfiguration *config) { - int i,j; + int i, j; int numFB; BEGIN_BOARD_LOCK(); - grGet(GR_NUM_BOARDS,4,(void*)&(config->num_sst)); + + grGet(GR_NUM_BOARDS, 4, (void*)&(config->num_sst)); if (config->num_sst == 0) - return 0; - for (i = 0; i< config->num_sst; i++) - { + return 0; + + for (i = 0; i< config->num_sst; i++) { + FxI32 result; + config->SSTs[i].type = GR_SSTTYPE_VOODOO; grSstSelect(i); - grGet(GR_MEMORY_FB,4,(void*)&(config->SSTs[i].sstBoard.VoodooConfig.fbRam)); - config->SSTs[i].sstBoard.VoodooConfig.fbRam/= 1024*1024; + + grGet(GR_MEMORY_FB, 4, &result); + config->SSTs[i].sstBoard.VoodooConfig.fbRam = result / (1024 * 1024); - grGet(GR_NUM_TMU,4,(void*)&(config->SSTs[i].sstBoard.VoodooConfig.nTexelfx)); + grGet(GR_NUM_TMU, 4, &result); + config->SSTs[i].sstBoard.VoodooConfig.nTexelfx = result; + + grGet(GR_REVISION_FB, 4, &result); + config->SSTs[i].sstBoard.VoodooConfig.fbiRev = result; - grGet(GR_NUM_FB,4,(void*)&numFB); if (numFB > 1) config->SSTs[i].sstBoard.VoodooConfig.sliDetect = FXTRUE; else config->SSTs[i].sstBoard.VoodooConfig.sliDetect = FXFALSE; - for (j = 0; j < config->SSTs[i].sstBoard.VoodooConfig.nTexelfx; j++) - { - grGet(GR_MEMORY_TMU,4,(void*)&(config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRam)); - config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRam /= 1024*1024; + + for (j = 0; j < config->SSTs[i].sstBoard.VoodooConfig.nTexelfx; j++) { + grGet(GR_MEMORY_TMU, 4, &result); + config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRam = result / (1024*1024); + grGet(GR_REVISION_TMU, 4, &result); + config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRev = result; } } END_BOARD_LOCK(); |