OSDN Git Service

intel: Only align Y-tiling pitch to the Y tile width.
authorEric Anholt <eric@anholt.net>
Fri, 5 Mar 2010 00:09:40 +0000 (16:09 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 5 Mar 2010 00:27:45 +0000 (16:27 -0800)
Fixes piglit depth-tex-modes on gen4.

intel/intel_bufmgr_gem.c

index f852c09..21fe099 100644 (file)
@@ -254,12 +254,17 @@ static unsigned long
 drm_intel_gem_bo_tile_pitch(drm_intel_bufmgr_gem *bufmgr_gem,
                            unsigned long pitch, uint32_t tiling_mode)
 {
-       unsigned long tile_width = 512;
+       unsigned long tile_width;
        unsigned long i;
 
        if (tiling_mode == I915_TILING_NONE)
                return pitch;
 
+       if (tiling_mode == I915_TILING_X)
+               tile_width = 512;
+       else
+               tile_width = 128;
+
        /* 965 is flexible */
        if (bufmgr_gem->gen >= 4)
                return ROUND_UP_TO(pitch, tile_width);