[Mesa-dev] [PATCH v2] isl: add MCS width constraint 16 samples

Jason Ekstrand jason at jlekstrand.net
Mon Feb 20 17:29:24 UTC 2017


On Mon, Feb 20, 2017 at 8:10 AM, Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> Applies on top of Jason's patch :
>
>    https://patchwork.freedesktop.org/patch/139603/
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/intel/isl/isl.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index 1a47da5257..b7f3aaee1c 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -1417,6 +1417,15 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
>     assert(surf->levels == 1);
>     assert(surf->logical_level0_px.depth == 1);
>
> +   /* Internal documentation says (not found in PRMs) :
> +    *
> +    *    "If Number of Multisamples is MULTISAMPLECOUNT_16, then Width
> must be
> +    *     8K texels or less, or the surface must not use the a multisample
> +    *     control surface (MCS)."
>

I just remembered there's actually a very simple (and a bit silly) reason
for this restriction.  The "Auxiliary Surface Pitch" field is only 9 bits
which means 512 tiles.  A 16k wide MCS for 16x MSAA is 1024 tiles wide.  We
should probably document that rather than the opaque internal spec citation.


> +    */
> +   if (surf->samples == 16 && surf->width > 8192)
> +      return false;
> +
>     enum isl_format mcs_format;
>     switch (surf->samples) {
>     case 2:  mcs_format = ISL_FORMAT_MCS_2X;  break;
> --
> 2.11.0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170220/4bab243b/attachment.html>


More information about the mesa-dev mailing list