ilo: ignore prefer_linear_threshold when zero

This was the intended behavior but it did not work as intended until now.
This commit is contained in:
Chia-I Wu 2015-10-16 16:19:30 +08:00
parent a445e0f7ef
commit d04126a773
2 changed files with 3 additions and 3 deletions

View 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)

View 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;