ilo: ignore prefer_linear_threshold when zero
authorChia-I Wu <olvaffe@gmail.com>
Fri, 16 Oct 2015 08:19:30 +0000 (16:19 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sun, 18 Oct 2015 13:04:52 +0000 (21:04 +0800)
This was the intended behavior but it did not work as intended until now.

src/gallium/drivers/ilo/core/ilo_image.c
src/gallium/drivers/ilo/core/ilo_image.h

index fa547ac5c362b438488e33e335aae8847b9dc1f3..6eefc8f46d216bdb6ab32f9a00a58968994c12c0 100644 (file)
@@ -286,8 +286,8 @@ image_get_gen6_tiling(const struct ilo_dev *dev,
                                  info->bind_surface_dp_typed))
          return GEN6_TILING_NONE;
 
-      if (estimated_size <= 64 ||
-          estimated_size > info->prefer_linear_threshold)
+      if (estimated_size <= 64 || (info->prefer_linear_threshold &&
+               estimated_size > info->prefer_linear_threshold))
          return GEN6_TILING_NONE;
 
       if (estimated_size <= 2048)
index 646ed6f572787571ed1b9ad32d938f34ba6e3b9c..546e0ff7739deb5c69e087c0388588905e93c8ea 100644 (file)
@@ -102,7 +102,7 @@ struct ilo_image_info {
 
    /*
     * prefer GEN6_TILING_NONE when the (estimated) image size exceeds the
-    * threshold
+    * threshold; ignored when zero
     */
    uint32_t prefer_linear_threshold;