i915: Use Y tiling for textures
authorStéphane Marchesin <marcheu@chromium.org>
Sat, 4 May 2013 21:06:12 +0000 (14:06 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Wed, 8 May 2013 09:07:00 +0000 (02:07 -0700)
This basically reverts commit
2acc7193743199701f8f6d1877a59ece0ec4fa5b.

With the previous change, we're not batchbuffer limited any
longer. So we actually start seeing a performance difference
between X and Y tiling. X tiling is funny because it is
faster for screen-aligned quads but slower in games. So let's
use Y tiling which is 10% faster overall.

src/gallium/drivers/i915/i915_resource_texture.c

index d9f58c01ac19e4daab958e56d439c7fbc1d184ff..3d6179495d28aac1adc9b8ad4e73cdeb7ecb2c12 100644 (file)
@@ -181,8 +181,13 @@ i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex)
    if (tex->b.b.target == PIPE_TEXTURE_1D)
       return I915_TILE_NONE;
 
-   /* Use X tiling for 2D, 3D and compressed textures */
-   return I915_TILE_X;
+   if (util_format_is_s3tc(tex->b.b.format))
+      return I915_TILE_X;
+
+   if (is->debug.use_blitter)
+      return I915_TILE_X;
+   else
+      return I915_TILE_Y;
 }