summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-08 23:52:32 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-08 23:52:32 +0000
commitc3c19be8e0d0b13916cc128cf3c8e839935c912a (patch)
tree9d880143c625d673af6e896339249e64a8786ffe /src/mesa/main/texstore.c
parent5999c5b620236fb6a996cf56759aec31f01c126b (diff)
More updates for texture compression.
Added _mesa_compressed_texture_size_glenum() for validating the imageSize parameter to glCompressedTex[Sub]Image1/2/3() which does _not_ call ctx->Driver.CompressedTextureSize() - since that could return a padded size.
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index c373d2f95e..b9a1925be0 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2383,12 +2383,13 @@ choose_texture_format(GLcontext *ctx, struct gl_texture_image *texImage,
GLuint dims,
GLenum format, GLenum type, GLint internalFormat)
{
- assert(ctx->Driver.ChooseTextureFormat);
+ ASSERT(dims == 1 || dims == 2 || dims == 3);
+ ASSERT(ctx->Driver.ChooseTextureFormat);
texImage->TexFormat
= ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
- assert(texImage->TexFormat);
+ ASSERT(texImage->TexFormat);
set_fetch_functions(texImage, dims);