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 27bbf17..faca148 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) {