summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-02-22 19:54:32 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-02-22 19:54:32 +0000
commit382ce985ac4c5569fb79a0c3545c8a4e727a816c (patch)
tree1ba728dc71c5ceebfda46de11f889c3206236b3b
parent54b7eca7a04ff5b53285e56391f262ed889ebb36 (diff)
Fix cubemap layout
-rw-r--r--src/mesa/drivers/dri/i915/i915_tex_layout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c
index f41fa83880..fe7c3476c8 100644
--- a/src/mesa/drivers/dri/i915/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c
@@ -76,10 +76,12 @@ GLboolean i915_miptree_layout( struct intel_mipmap_tree *mt )
mt->offset[face][i].width = d;
mt->offset[face][i].height = d;
mt->offset[face][i].depth = 1;
-
- d >>= 1;
- assert(d > 0);
+ if (d == 0)
+ _mesa_printf("cube mipmap %d/%d (%d..%d) is 0x0\n",
+ face, i, mt->first_level, mt->last_level);
+
+ d >>= 1;
x += step_offsets[face][0] * d;
y += step_offsets[face][1] * d;
}