[Mesa-dev] [PATCH v2 2/7] intel/isl: Fix up asserts in calc_phys_level0_extent_sa

Nanley Chery nanleychery at gmail.com
Fri Sep 23 19:01:13 UTC 2016


On Mon, Sep 12, 2016 at 05:58:19PM -0700, Jason Ekstrand wrote:
> The assertion that a format is uncompressed in the multisample layouts
> isn't quite right.  What we really want to assert is that the format
> supports multisampling which is a bit more complicated query.  We also want
> to assert that it has a block size of 1x1 since we do nothing with the
> block size in the phys_level0_sa assignment.
> 
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> Reviewed-by: Chad Versace <chadversary at chromium.org>
> ---

This patch is,
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>

>  src/intel/isl/isl.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index c460ddb..a75fddf 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -558,7 +558,8 @@ 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));
> +         assert(fmtl->bw == 1 && fmtl->bh == 1);
>  
>           *phys_level0_sa = (struct isl_extent4d) {
>              .w = info->width,
> @@ -571,7 +572,8 @@ 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));
> +         assert(fmtl->bw == 1 && fmtl->bh == 1);
>  
>           *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