diff options
author | Eric Anholt <eric@anholt.net> | 2010-03-16 16:20:03 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-03-17 11:23:43 -0700 |
commit | da011faf48155a5c02ebc1fe1fa20a4f54b8c657 (patch) | |
tree | 27d6e32dc4b217cd8450921d8e539eb7b62b0cd3 /src/mesa/drivers/dri/intel/intel_regions.c | |
parent | 1a77f8af9bc9982d76a7f602712eb1a5c23ec14e (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_regions.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_regions.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index 581e5ec6b3..27e454d294 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -172,7 +172,7 @@ intel_region_alloc_internal(struct intel_context *intel, struct intel_region * intel_region_alloc(struct intel_context *intel, uint32_t tiling, - GLuint cpp, GLuint width, GLuint height, GLuint pitch, + GLuint cpp, GLuint width, GLuint height, GLboolean expect_accelerated_upload) { dri_bo *buffer; @@ -186,13 +186,9 @@ intel_region_alloc(struct intel_context *intel, buffer = drm_intel_bo_alloc_tiled(intel->bufmgr, "region", width, height, cpp, &tiling, &aligned_pitch, flags); - /* We've already chosen a pitch as part of miptree layout. It had - * better be the same. - */ - assert(aligned_pitch == pitch * cpp); region = intel_region_alloc_internal(intel, cpp, width, height, - pitch, buffer); + aligned_pitch / cpp, buffer); region->tiling = tiling; return region; |