isl: don't warn in physical extent calculation for yuv formats
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 26 Nov 2019 14:22:55 +0000 (16:22 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 15:59:21 +0000 (15:59 +0000)
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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2999>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2999>

src/intel/isl/isl.c
src/intel/isl/isl.h

index 94778ac859442317b72947e79a079dba7ad660b6..7271ecfbe7daeb33e4c1d69bea514ddf171a6991 100644 (file)
@@ -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);
 
 {
    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:
 
    switch (info->dim) {
    case ISL_SURF_DIM_1D:
index f3cb1751ea95704acfe063402ecb4ec0ec84aa48..05ab472e46833bde1601af5905ad5c44c1711ab0 100644 (file)
@@ -1623,6 +1623,12 @@ isl_format_has_bc_compression(enum isl_format fmt)
    return false;
 }
 
    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)
 {
 static inline bool
 isl_format_is_yuv(enum isl_format fmt)
 {