diff options
author | Nanley Chery <[email protected]> | 2016-03-01 17:32:14 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2016-03-03 11:23:40 -0800 |
commit | 091f1da902c71ac8d3d27b325a118e2f683f1ae5 (patch) | |
tree | 07b34f936d49576212ebeef712e43e6f40cd4c7a /src/intel/isl | |
parent | 456f5b0314747c5e47435a6d9d708ef7895c7a49 (diff) |
isl: Don't filter tiling flags if a specific tiling bit is set
If a specific bit is set, the intention to create a surface with a
specific tiling format should be respected.
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/isl')
-rw-r--r-- | src/intel/isl/isl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 7fd9eeac515..a36638071d5 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -184,11 +184,14 @@ isl_surf_choose_tiling(const struct isl_device *dev, { isl_tiling_flags_t tiling_flags = info->tiling_flags; - if (ISL_DEV_GEN(dev) >= 7) { - gen7_filter_tiling(dev, info, &tiling_flags); - } else { - isl_finishme("%s: gen%u", __func__, ISL_DEV_GEN(dev)); - gen7_filter_tiling(dev, info, &tiling_flags); + /* Filter if multiple tiling options are given */ + if (!isl_is_pow2(tiling_flags)) { + if (ISL_DEV_GEN(dev) >= 7) { + gen7_filter_tiling(dev, info, &tiling_flags); + } else { + isl_finishme("%s: gen%u", __func__, ISL_DEV_GEN(dev)); + gen7_filter_tiling(dev, info, &tiling_flags); + } } #define CHOOSE(__tiling) \ |