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 <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>
This commit is contained in:
Lionel Landwerlin 2019-11-26 16:22:55 +02:00 committed by Marge Bot
parent 015f08dd43
commit 88c046a6d3
2 changed files with 8 additions and 2 deletions

View 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);
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:

View file

@ -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)
{