set miptree pitch to region pitch after allocating the region in st_miptree_create()
authorBrian <brian.paul@tungstengraphics.com>
Thu, 27 Sep 2007 22:33:01 +0000 (16:33 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 27 Sep 2007 22:33:01 +0000 (16:33 -0600)
This fixes rendering with small (4x4) textures with softpipe.
Haven't yet tested with i915.

src/mesa/state_tracker/st_mipmap_tree.c

index 27bbf176087b07a1b1f55ee08d04a98b73d02462..faca148d80567e4d27285eae57f004bb85fb6bfe 100644 (file)
@@ -89,6 +89,7 @@ st_miptree_create(struct pipe_context *pipe,
       /* note: it's OK to pass 'pitch' as 'width' here: */
       mt->region = pipe->region_alloc(pipe, mt->cpp, mt->pitch,
                                       mt->total_height, flags);
+      mt->pitch = mt->region->pitch; /*XXX NEW */
    }
 
    if (!mt->region) {