intel: Align region height as required for tiled regions.

Otherwise, we would address beyond the end of our buffers.  Fixes reliable
GPU segfault with texture_tiling=true and oglconform shadow.c.

Bug #22406.
This commit is contained in:
Eric Anholt 2009-08-07 18:09:31 -07:00
parent 12c6973c6e
commit ceb8afcca5
1 changed files with 5 additions and 0 deletions

View File

@ -181,6 +181,11 @@ intel_region_alloc(struct intel_context *intel,
dri_bo *buffer;
struct intel_region *region;
if (tiling == I915_TILING_X)
height = ALIGN(height, 8);
else if (tiling == I915_TILING_Y)
height = ALIGN(height, 32);
if (expect_accelerated_upload) {
buffer = drm_intel_bo_alloc_for_render(intel->bufmgr, "region",
pitch * cpp * height, 64);