summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-08-23 23:10:14 +0000
committerBrian Paul <[email protected]>2006-08-23 23:10:14 +0000
commit4d12a05e6c11ca8d7325503131b2594dfe304164 (patch)
treeddfec24494574b8d9a24fdfdefc5c94b3b105a39 /src/mesa/drivers/dri/tdfx
parent261a806f9e26347d756bddeae81f4e98325b8e84 (diff)
Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoid
a lot of casting elsewhere. Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300 driver.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c
index 826a9f71dfe..8d8a629474c 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c
@@ -602,7 +602,7 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
id;
id = _mesa_HashNextEntry(textures, id)) {
struct gl_texture_object *tObj
- = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
tdfxTMFreeTexture(fxMesa, tObj);
}
}
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.c b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
index 63cae17e4e9..6f782f687f3 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
@@ -38,6 +38,7 @@
#include "tdfx_context.h"
#include "tdfx_tex.h"
#include "tdfx_texman.h"
+#include "texobj.h"
#include "hash.h"
@@ -82,8 +83,8 @@ VerifyFreeList(tdfxContextPtr fxMesa, FxU32 tmu)
for (id = _mesa_HashFirstEntry(textures);
id;
id = _mesa_HashNextEntry(textures, id)) {
- struct gl_texture_object *tObj;
- tObj = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ struct gl_texture_object *tObj
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
if (ti) {
if (ti->isInTM) {
@@ -122,7 +123,7 @@ dump_texmem(tdfxContextPtr fxMesa)
id;
id = _mesa_HashNextEntry(textures, id)) {
struct gl_texture_object *obj
- = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
tdfxTexInfo *info = TDFX_TEXTURE_DATA(obj);
if (info && info->isInTM) {
@@ -404,7 +405,7 @@ FindOldestObject(tdfxContextPtr fxMesa, FxU32 tmu)
id;
id = _mesa_HashNextEntry(textures, id)) {
struct gl_texture_object *obj
- = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
tdfxTexInfo *info = TDFX_TEXTURE_DATA(obj);
if (info && info->isInTM &&
@@ -460,7 +461,7 @@ FlushTexMemory(tdfxContextPtr fxMesa)
id;
id = _mesa_HashNextEntry(textures, id)) {
struct gl_texture_object *obj
- = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
if (obj->RefCount < 2) {
/* don't flush currently bound textures */
tdfxTMMoveOutTM_NoLock(fxMesa, obj);
@@ -972,7 +973,7 @@ void tdfxTMRestoreTextures_NoLock( tdfxContextPtr fxMesa )
id;
id = _mesa_HashNextEntry(textures, id)) {
struct gl_texture_object *tObj
- = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ = _mesa_lookup_texture(fxMesa->glCtx, id);
tdfxTexInfo *ti = TDFX_TEXTURE_DATA( tObj );
if ( ti && ti->isInTM ) {
int i;