From: Brian Date: Thu, 27 Sep 2007 22:33:01 +0000 (-0600) Subject: set miptree pitch to region pitch after allocating the region in st_miptree_create() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7966e479dca22bf2d2b844d50ac5bef70614e15a;p=mesa.git set miptree pitch to region pitch after allocating the region in st_miptree_create() This fixes rendering with small (4x4) textures with softpipe. Haven't yet tested with i915. --- diff --git a/src/mesa/state_tracker/st_mipmap_tree.c b/src/mesa/state_tracker/st_mipmap_tree.c index 27bbf176087..faca148d805 100644 --- a/src/mesa/state_tracker/st_mipmap_tree.c +++ b/src/mesa/state_tracker/st_mipmap_tree.c @@ -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) {