Avoid failing assertion in intel_miptree_set_image_offset() with cube maps.
authorMichel Dänzer <michel@tungstengraphics.com>
Thu, 14 Dec 2006 11:47:44 +0000 (12:47 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Thu, 14 Dec 2006 11:47:44 +0000 (12:47 +0100)
Cube maps still aren't working quite correctly though.

src/mesa/drivers/dri/i915tex/i915_tex_layout.c

index fc98611d319515e5515cb7f1c21ecfb95d3da7bb..333fefef859dcd173786f1e2ad2292ec0b932e4c 100644 (file)
@@ -212,7 +212,7 @@ i945_miptree_layout(struct intel_mipmap_tree * mt)
                y = mt->total_height - 4;
                x = (face - 4) * 8;
             }
-            else if (dim < 4) {
+            else if (dim < 4 && (face > 0 || mt->first_level > 0)) {
                y = mt->total_height - 4;
                x = face * 8;
             }