From 8db761409dadc2e899d4e7107eff3aa07b07aa11 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 12 Sep 2008 15:48:13 -0700 Subject: intel: Add a width field to regions, and use it for making miptrees in TFP. Otherwise, we would use the pitch as width of the texture, and compiz would render the pitch padding on the right hand side. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.c') diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 9be7e02eff..f28fac8394 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -117,7 +117,10 @@ intel_miptree_create(struct intel_context *intel, return NULL; mt->region = intel_region_alloc(intel, - mt->cpp, mt->pitch, mt->total_height); + mt->cpp, + mt->pitch, + mt->total_height, + mt->pitch); if (!mt->region) { free(mt); @@ -141,7 +144,7 @@ intel_miptree_create_for_region(struct intel_context *intel, mt = intel_miptree_create_internal(intel, target, internal_format, first_level, last_level, - region->pitch, region->height, depth0, + region->width, region->height, 1, region->cpp, compress_byte); if (!mt) return mt; -- cgit v1.2.3