Module: Mesa
Branch: 7.8-gles
Commit: e48964a561434cc300f5e962107a3e53eb91981a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e48964a561434cc300f5e962107a3e53eb91981a

Author: Eric Anholt <[email protected]>
Date:   Tue May  4 21:19:55 2010 -0700

intel: Don't tile textures so small that size is blown up by over 2x.

Noted on the mailing list for an app that puts each glyph for its text
into a separate texture.
(cherry picked from commit 453f0b1f243b26e02b371293e9c8bbf09362c14a)

---

 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c 
b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 5b6b4b2..0483ea4 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -117,17 +117,16 @@ intel_miptree_create(struct intel_context *intel,
                     GLboolean expect_accelerated_upload)
 {
    struct intel_mipmap_tree *mt;
-   uint32_t tiling;
+   uint32_t tiling = I915_TILING_NONE;
 
    if (intel->use_texture_tiling && compress_byte == 0) {
       if (intel->gen >= 4 &&
          (base_format == GL_DEPTH_COMPONENT ||
           base_format == GL_DEPTH_STENCIL_EXT))
         tiling = I915_TILING_Y;
-      else
+      else if (width0 >= 64)
         tiling = I915_TILING_X;
-   } else
-      tiling = I915_TILING_NONE;
+   }
 
    mt = intel_miptree_create_internal(intel, target, internal_format,
                                      first_level, last_level, width0,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to