Mesa (master): ilo: ignore prefer_linear_threshold when zero

Chia-I Wu olv at kemper.freedesktop.org
Sun Oct 18 13:36:03 UTC 2015


Module: Mesa
Branch: master
Commit: d04126a773f8a70ff6ae549751dc674133ea26b0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d04126a773f8a70ff6ae549751dc674133ea26b0

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Fri Oct 16 16:19:30 2015 +0800

ilo: ignore prefer_linear_threshold when zero

This was the intended behavior but it did not work as intended until now.

---

 src/gallium/drivers/ilo/core/ilo_image.c |    4 ++--
 src/gallium/drivers/ilo/core/ilo_image.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/ilo/core/ilo_image.c b/src/gallium/drivers/ilo/core/ilo_image.c
index fa547ac..6eefc8f 100644
--- a/src/gallium/drivers/ilo/core/ilo_image.c
+++ b/src/gallium/drivers/ilo/core/ilo_image.c
@@ -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)
diff --git a/src/gallium/drivers/ilo/core/ilo_image.h b/src/gallium/drivers/ilo/core/ilo_image.h
index 646ed6f..546e0ff 100644
--- a/src/gallium/drivers/ilo/core/ilo_image.h
+++ b/src/gallium/drivers/ilo/core/ilo_image.h
@@ -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;
 




More information about the mesa-commit mailing list