diff options
author | Brian <[email protected]> | 2007-08-02 08:35:27 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-02 08:35:27 -0600 |
commit | b477182dc3da7994011acf6ac1b93022a4b3a63e (patch) | |
tree | 3ec4b890d40e31ad3bfe3ee2a759a6114766d295 | |
parent | a8964ca89ef3011f57ef4c73f15478967f282fad (diff) |
s/MAX_TEXTURE_LEVELS/SIS_MAX_TEXTURE_LEVELS/ and add assertion (bug 11806)
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_tex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c index be87f16e298..8fd7b26ba55 100644 --- a/src/mesa/drivers/dri/sis/sis_tex.c +++ b/src/mesa/drivers/dri/sis/sis_tex.c @@ -130,6 +130,8 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, static void sisFreeTexImage( sisContextPtr smesa, sisTexObjPtr t, int level ) { + assert(level >= 0); + assert(level < SIS_MAX_TEXTURE_LEVELS); if (t->image[level].Data == NULL) return; @@ -213,7 +215,7 @@ sisDeleteTexture( GLcontext * ctx, struct gl_texture_object *texObj ) */ return; } - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { + for (i = 0; i < SIS_MAX_TEXTURE_LEVELS; i++) { sisFreeTexImage( smesa, t, i ); } |