summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2015-10-16 16:19:30 +0800
committerChia-I Wu <olvaffe@gmail.com>2015-10-18 21:04:52 +0800
commitd04126a773f8a70ff6ae549751dc674133ea26b0 (patch)
tree9193ba8dad3baf489fa46854cfbfd406ed5c8fdb
parenta445e0f7efcaa0ff21b5fe4faa3f73f3b73dcfe8 (diff)
ilo: ignore prefer_linear_threshold when zero
This was the intended behavior but it did not work as intended until now.
-rw-r--r--src/gallium/drivers/ilo/core/ilo_image.c4
-rw-r--r--src/gallium/drivers/ilo/core/ilo_image.h2
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 fa547ac5c36..6eefc8f46d2 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 646ed6f5727..546e0ff7739 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;