diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-28 10:02:20 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-28 10:02:20 -0600 |
commit | 8fda97afb8b7a03415dbca6d83691d2d6461126c (patch) | |
tree | d78b55385eed2b37baa4dcc8df8a63bcca95e6ac /src/gallium | |
parent | eb82373abb08171d7fcb15b5f4f229fc9ca9aa91 (diff) | |
parent | eeb7e04da64fdae3a40b1afdcde71dcded2481f3 (diff) |
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_gen_mipmap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index f06c0e463d..4e3d35f40e 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1515,6 +1515,17 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, uint zslice = 0; uint offset; + /* The texture object should have room for the levels which we're + * about to generate. + */ + assert(lastLevel <= pt->last_level); + + /* If this fails, why are we here? */ + assert(lastLevel > baseLevel); + + assert(filter == PIPE_TEX_FILTER_LINEAR || + filter == PIPE_TEX_FILTER_NEAREST); + /* check if we can render in the texture's format */ if (!screen->is_format_supported(screen, pt->format, PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) { |