diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-08-02 08:35:13 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-08-02 08:35:13 -0600 |
commit | 6e6a02261a7c0fcfdf9fbf17199aff4278c8e5b7 (patch) | |
tree | 87d18cd1bb7d63f4f9aa137d01c955472c562768 /src/mesa/drivers | |
parent | 6dae3f8c881ae90664fa826032402efb6de1bb8b (diff) |
s/MAX_TEXTURE_LEVELS/SIS_MAX_TEXTURE_LEVELS/ and add assertion (bug 11806)
Diffstat (limited to 'src/mesa/drivers')
-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 be87f16e29..8fd7b26ba5 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 ); } |