diff options
author | Brian Paul <[email protected]> | 2009-09-28 09:59:59 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-09-28 09:59:59 -0600 |
commit | eeb7e04da64fdae3a40b1afdcde71dcded2481f3 (patch) | |
tree | d968a71505b92c86a78b435f72752884a9435f92 /src/gallium | |
parent | 151e0c0aeaa78f4eb6a87d2b3dd86b4807db1523 (diff) | |
parent | d09941c8cc2d4620eb774744c8878921b9dc3bcc (diff) |
Merge branch 'mesa_7_5_branch' into 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 f06c0e463d0..4e3d35f40e7 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)) { |