From 7966e479dca22bf2d2b844d50ac5bef70614e15a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 27 Sep 2007 16:33:01 -0600 Subject: [PATCH] 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. --- src/mesa/state_tracker/st_mipmap_tree.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.30.2