From: Chia-I Wu Date: Fri, 16 Oct 2015 08:19:30 +0000 (+0800) Subject: ilo: ignore prefer_linear_threshold when zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d04126a773f8a70ff6ae549751dc674133ea26b0;p=mesa.git ilo: ignore prefer_linear_threshold when zero This was the intended behavior but it did not work as intended until now. --- 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;