summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/isl/isl.c')
-rw-r--r--src/intel/isl/isl.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index a53f46feb4f..9ae2bfefb44 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -236,6 +236,22 @@ isl_surf_choose_tiling(const struct isl_device *dev,
{
isl_tiling_flags_t tiling_flags = info->tiling_flags;
+ /* HiZ surfaces always use the HiZ tiling */
+ if (info->usage & ISL_SURF_USAGE_HIZ_BIT) {
+ assert(info->format == ISL_FORMAT_HIZ);
+ assert(tiling_flags == ISL_TILING_HIZ_BIT);
+ *tiling = ISL_TILING_HIZ;
+ return true;
+ }
+
+ /* CCS surfaces always use the CCS tiling */
+ if (info->usage & ISL_SURF_USAGE_CCS_BIT) {
+ assert(isl_format_get_layout(info->format)->txc == ISL_TXC_CCS);
+ assert(tiling_flags == ISL_TILING_CCS_BIT);
+ *tiling = ISL_TILING_CCS;
+ return true;
+ }
+
if (ISL_DEV_GEN(dev) >= 6) {
gen6_filter_tiling(dev, info, &tiling_flags);
} else {
@@ -264,8 +280,6 @@ isl_surf_choose_tiling(const struct isl_device *dev,
CHOOSE(ISL_TILING_LINEAR);
}
- CHOOSE(ISL_TILING_CCS);
- CHOOSE(ISL_TILING_HIZ);
CHOOSE(ISL_TILING_Ys);
CHOOSE(ISL_TILING_Yf);
CHOOSE(ISL_TILING_Y0);