diff options
author | Daniel Borca <[email protected]> | 2004-04-14 08:00:52 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-04-14 08:00:52 +0000 |
commit | edf4f53c15254ac53ab80ed127f3ff88f35dff8d (patch) | |
tree | 54a4fa75ad65644cf6ffe60713ea5f2088f97180 /src/mesa/drivers/glide/fxg.c | |
parent | 377ced2bf1423fbb982395c8a35b67ed9a6e0bf7 (diff) |
documentation updates
Glide3 driver: POINTCAST palette fixes
Diffstat (limited to 'src/mesa/drivers/glide/fxg.c')
-rw-r--r-- | src/mesa/drivers/glide/fxg.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/drivers/glide/fxg.c b/src/mesa/drivers/glide/fxg.c index b7408a70f98..c06b8dec2fb 100644 --- a/src/mesa/drivers/glide/fxg.c +++ b/src/mesa/drivers/glide/fxg.c @@ -2240,8 +2240,12 @@ void FX_CALL fake_grTexNCCTableExt (GrChipID_t tmu, /****************************************************************************\ * interface * \****************************************************************************/ -void tdfx_hook_glide (struct tdfx_glide *Glide) +void tdfx_hook_glide (struct tdfx_glide *Glide, int pointcast) { +/* GET_EXT_ADDR: get function pointer + * GET_EXT_FAKE: get function pointer if possible, else use a fake function + * GET_EXT_NULL: get function pointer if possible, else leave NULL pointer + */ #if FX_TRAP_GLIDE #define GET_EXT_ADDR(name) *(GrProc *)&real_##name = grGetProcAddress(#name), Glide->name = trap_##name #define GET_EXT_FAKE(name) GET_EXT_ADDR(name); if (real_##name == NULL) real_##name = fake_##name @@ -2263,9 +2267,15 @@ void tdfx_hook_glide (struct tdfx_glide *Glide) GET_EXT_ADDR(grTexChromaModeExt); GET_EXT_ADDR(grTexChromaRangeExt); /* pointcast */ - GET_EXT_FAKE(grTexDownloadTableExt); - GET_EXT_FAKE(grTexDownloadTablePartialExt); - GET_EXT_FAKE(grTexNCCTableExt); + if (pointcast) { + GET_EXT_FAKE(grTexDownloadTableExt); + GET_EXT_FAKE(grTexDownloadTablePartialExt); + GET_EXT_FAKE(grTexNCCTableExt); + } else { + Glide->grTexDownloadTableExt = fake_grTexDownloadTableExt; + Glide->grTexDownloadTablePartialExt = fake_grTexDownloadTablePartialExt; + Glide->grTexNCCTableExt = fake_grTexNCCTableExt; + } /* tbext */ GET_EXT_ADDR(grTextureBufferExt); GET_EXT_ADDR(grTextureAuxBufferExt); |