From 382ce985ac4c5569fb79a0c3545c8a4e727a816c Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 22 Feb 2006 19:54:32 +0000 Subject: Fix cubemap layout --- src/mesa/drivers/dri/i915/i915_tex_layout.c | 8 +++++--- 1 file 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; } -- cgit v1.2.3