diff options
-rw-r--r-- | src/intel/isl/isl.c | 6 | ||||
-rw-r--r-- | src/intel/isl/isl_gen7.c | 12 | ||||
-rw-r--r-- | src/intel/isl/isl_gen7.h | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index a883aecddb4..b6e88ad03e6 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -236,11 +236,11 @@ 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); + if (ISL_DEV_GEN(dev) >= 6) { + gen6_filter_tiling(dev, info, &tiling_flags); } else { isl_finishme("%s: gen%u", __func__, ISL_DEV_GEN(dev)); - gen7_filter_tiling(dev, info, &tiling_flags); + gen6_filter_tiling(dev, info, &tiling_flags); } #define CHOOSE(__tiling) \ diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c index f3d8428d059..4f1cc9d5f1a 100644 --- a/src/intel/isl/isl_gen7.c +++ b/src/intel/isl/isl_gen7.c @@ -198,7 +198,7 @@ gen7_format_needs_valign2(const struct isl_device *dev, * flags except ISL_TILING_X_BIT and ISL_TILING_LINEAR_BIT. */ void -gen7_filter_tiling(const struct isl_device *dev, +gen6_filter_tiling(const struct isl_device *dev, const struct isl_surf_init_info *restrict info, isl_tiling_flags_t *flags) { @@ -297,6 +297,16 @@ gen7_filter_tiling(const struct isl_device *dev, */ *flags &= ~ISL_TILING_Y0_BIT; } + + /* From the Sandybridge PRM, Volume 1, Part 2, page 32: + * + * "NOTE: 128BPE Format Color Buffer ( render target ) MUST be either + * TileX or Linear." + * + * This is necessary all the way back to 965, but is permitted on Gen7+. + */ + if (ISL_DEV_GEN(dev) < 7 && isl_format_get_layout(info->format)->bpb >= 128) + *flags &= ~ISL_TILING_Y0_BIT; } /** diff --git a/src/intel/isl/isl_gen7.h b/src/intel/isl/isl_gen7.h index 5d19812092a..e35e2df4c4f 100644 --- a/src/intel/isl/isl_gen7.h +++ b/src/intel/isl/isl_gen7.h @@ -30,7 +30,7 @@ extern "C" { #endif void -gen7_filter_tiling(const struct isl_device *dev, +gen6_filter_tiling(const struct isl_device *dev, const struct isl_surf_init_info *restrict info, isl_tiling_flags_t *flags); |