summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
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 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);