summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-28 10:02:20 -0600
committerBrian Paul <[email protected]>2009-09-28 10:02:20 -0600
commit8fda97afb8b7a03415dbca6d83691d2d6461126c (patch)
treed78b55385eed2b37baa4dcc8df8a63bcca95e6ac /src/gallium
parenteb82373abb08171d7fcb15b5f4f229fc9ca9aa91 (diff)
parenteeb7e04da64fdae3a40b1afdcde71dcded2481f3 (diff)
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c11
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)) {