diff options
author | Brian Paul <[email protected]> | 2010-11-11 18:04:00 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-12 07:21:29 -0700 |
commit | 56b4819932b0a44bfef9e10ed5f55649534252a8 (patch) | |
tree | 1a34110f961e1a109c8ef4a1a9b3279cf680c443 /src | |
parent | 93edd15178a4d3367ac3d2f9369603807de411d7 (diff) |
mesa: consolidate assertions in teximage code
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 2e9410f2717..eec5effcb3c 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2276,6 +2276,7 @@ _mesa_choose_texture_format(struct gl_context *ctx, prevImage->InternalFormat == internalFormat) { /* use the same format */ texImage->TexFormat = prevImage->TexFormat; + ASSERT(texImage->TexFormat != MESA_FORMAT_NONE); return; } } @@ -2350,8 +2351,6 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, width, border, format, type, pixels, &ctx->Unpack, texObj, texImage); - ASSERT(texImage->TexFormat); - _mesa_set_fetch_functions(texImage, 1); check_gen_mipmap(ctx, target, texObj, level); @@ -2460,8 +2459,6 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, width, height, border, format, type, pixels, &ctx->Unpack, texObj, texImage); - ASSERT(texImage->TexFormat); - _mesa_set_fetch_functions(texImage, 2); check_gen_mipmap(ctx, target, texObj, level); @@ -2574,8 +2571,6 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, width, height, depth, border, format, type, pixels, &ctx->Unpack, texObj, texImage); - ASSERT(texImage->TexFormat); - _mesa_set_fetch_functions(texImage, 3); check_gen_mipmap(ctx, target, texObj, level); @@ -2902,8 +2897,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat, x, y, width, border); - ASSERT(texImage->TexFormat); - _mesa_set_fetch_functions(texImage, 1); check_gen_mipmap(ctx, target, texObj, level); @@ -2972,8 +2965,6 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat, x, y, width, height, border); - ASSERT(texImage->TexFormat); - _mesa_set_fetch_functions(texImage, 2); check_gen_mipmap(ctx, target, texObj, level); |