intel: Only adjust the local stride used for SET_TILING in tiled alloc

Mesa uses the returned pitch from alloc_tiled, so make sure that we set
it correctly before modifying the stride used for the SET_TILING call.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-06-22 13:03:52 +01:00
parent aba3502190
commit 6ea2bda5f5

View file

@ -710,7 +710,6 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
unsigned long *pitch, unsigned long flags)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
drm_intel_bo *bo;
unsigned long size, stride;
uint32_t tiling;
@ -743,17 +742,13 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
size = stride * aligned_y;
size = drm_intel_gem_bo_tile_size(bufmgr_gem, size, tiling_mode);
} while (*tiling_mode != tiling);
*pitch = stride;
if (*tiling_mode == I915_TILING_NONE)
if (tiling == I915_TILING_NONE)
stride = 0;
bo = drm_intel_gem_bo_alloc_internal(bufmgr, name, size, flags,
*tiling_mode, stride);
if (!bo)
return NULL;
*pitch = stride;
return bo;
return drm_intel_gem_bo_alloc_internal(bufmgr, name, size, flags,
tiling, stride);
}
/**