summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-03-16 16:20:03 -0700
committerEric Anholt <eric@anholt.net>2010-03-17 11:23:43 -0700
commitda011faf48155a5c02ebc1fe1fa20a4f54b8c657 (patch)
tree27d6e32dc4b217cd8450921d8e539eb7b62b0cd3 /src/mesa/drivers/dri/intel/intel_mipmap_tree.c
parent1a77f8af9bc9982d76a7f602712eb1a5c23ec14e (diff)
intel: Rely on allocated region pitch for the miptree pitch.
Bug #26966: 945 miptree pitch disagreement with libdrm.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index ac9e135a01..e02b188e35 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -146,8 +146,8 @@ intel_miptree_create(struct intel_context *intel,
mt->cpp,
mt->pitch,
mt->total_height,
- mt->pitch,
expect_accelerated_upload);
+ mt->pitch = mt->region->pitch;
if (!mt->region) {
free(mt);
@@ -177,20 +177,11 @@ intel_miptree_create_for_region(struct intel_context *intel,
I915_TILING_NONE);
if (!mt)
return mt;
-#if 0
- if (mt->pitch != region->pitch) {
- fprintf(stderr,
- "region pitch (%d) doesn't match mipmap tree pitch (%d)\n",
- region->pitch, mt->pitch);
- free(mt);
- return NULL;
- }
-#else
+
/* The mipmap tree pitch is aligned to 64 bytes to make sure render
* to texture works, but we don't need that for texturing from a
* pixmap. Just override it here. */
mt->pitch = region->pitch;
-#endif
intel_region_reference(&mt->region, region);