From 88c046a6d3228cc3a667cba96e4fa57c341ab162 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 26 Nov 2019 16:22:55 +0200 Subject: [PATCH] isl: don't warn in physical extent calculation for yuv formats Those format have correct descriptions already with the exception of the planar format. In that case we introduce an assert. This fine because we don't use the planar format in any of our drivers. There are restrictions on how the addresses of the 2 planes are relative to one another which make this annoying. The sampler is also more limited than what we can do with a shader snippet. Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Tested-by: Marge Bot Part-of: --- src/intel/isl/isl.c | 4 ++-- src/intel/isl/isl.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 94778ac8594..7271ecfbe7d 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -822,8 +822,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev, { const struct isl_format_layout *fmtl = isl_format_get_layout(info->format); - if (isl_format_is_yuv(info->format)) - isl_finishme("%s:%s: YUV format", __FILE__, __func__); + if (isl_format_is_planar(info->format)) + unreachable("Planar formats unsupported"); switch (info->dim) { case ISL_SURF_DIM_1D: diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index f3cb1751ea9..05ab472e468 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -1623,6 +1623,12 @@ isl_format_has_bc_compression(enum isl_format fmt) return false; } +static inline bool +isl_format_is_planar(enum isl_format fmt) +{ + return fmt == ISL_FORMAT_PLANAR_420_8; +} + static inline bool isl_format_is_yuv(enum isl_format fmt) { -- 2.30.2