[Mesa-dev] [PATCH 2/6] intel/isl: Fix up asserts in calc_phys_level0_extent_sa
Pohjolainen, Topi
topi.pohjolainen at gmail.com
Tue Sep 6 07:01:12 UTC 2016
On Fri, Sep 02, 2016 at 03:50:43PM -0700, Jason Ekstrand wrote:
> First, compressed 1D textures should be allowed. There's nothing in the
> Vulkan spec (or in GL as far as I can remember) that dissallows them. It
> just waists a bit of vertical space because it's only one pixel tall.
>
> Second, the assertion that a format is uncompressed in the multisample
> layouts isn't quite right either. What we really want to assert is that
> the format supports multisampling which is a bit more complicated query.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/intel/isl/isl.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index c460ddb..f8f5802 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -518,7 +518,6 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev,
> assert(info->height == 1);
> assert(info->depth == 1);
> assert(info->samples == 1);
> - assert(!isl_format_is_compressed(info->format));
>
> switch (dim_layout) {
> case ISL_DIM_LAYOUT_GEN4_3D:
> @@ -558,7 +557,7 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev,
> case ISL_MSAA_LAYOUT_ARRAY:
> assert(info->depth == 1);
> assert(info->levels == 1);
> - assert(!isl_format_is_compressed(info->format));
> + assert(isl_format_supports_multisampling(dev->info, info->format));
>
> *phys_level0_sa = (struct isl_extent4d) {
> .w = info->width,
> @@ -571,7 +570,7 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev,
> case ISL_MSAA_LAYOUT_INTERLEAVED:
> assert(info->depth == 1);
> assert(info->levels == 1);
> - assert(!isl_format_is_compressed(info->format));
> + assert(isl_format_supports_multisampling(dev->info, info->format));
>
> *phys_level0_sa = (struct isl_extent4d) {
> .w = info->width,
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list