diff options
author | Brian Paul <[email protected]> | 2006-05-08 23:52:32 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-05-08 23:52:32 +0000 |
commit | c3c19be8e0d0b13916cc128cf3c8e839935c912a (patch) | |
tree | 9d880143c625d673af6e896339249e64a8786ffe /src/mesa/main/texstore.c | |
parent | 5999c5b620236fb6a996cf56759aec31f01c126b (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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index c373d2f95ea..b9a1925be02 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); |