[Mesa-dev] [PATCH 3/3] anv: Enable MSAA compression

Jason Ekstrand jason at jlekstrand.net
Wed Feb 22 19:28:34 UTC 2017


On Wed, Feb 22, 2017 at 11:09 AM, Chad Versace <chadversary at chromium.org>
wrote:

> On Mon 20 Feb 2017, Jason Ekstrand wrote:
> > This just enables basic MSAA compression (no fast clears) for all
> > multisampled surfaces.  This improves the framerate of the Sascha
> > "multisampling" demo by 76% on my Sky Lake laptop.  Running Talos on
> > medium settings with 8x MSAA, this improves the framerate in the
> > benchmark by 80%.
> > ---
> >  src/intel/vulkan/TODO              |  2 +-
> >  src/intel/vulkan/anv_blorp.c       |  3 ++-
> >  src/intel/vulkan/anv_image.c       |  9 +++++++++
> >  src/intel/vulkan/anv_pipeline.c    | 19 +++++++++++++++++++
> >  src/intel/vulkan/genX_cmd_buffer.c |  5 +++++
> >  5 files changed, 36 insertions(+), 2 deletions(-)
>
>
> > diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> b/src/intel/vulkan/genX_cmd_buffer.c
> > index 40a72f4..5d8c3ea 100644
> > --- a/src/intel/vulkan/genX_cmd_buffer.c
> > +++ b/src/intel/vulkan/genX_cmd_buffer.c
> > @@ -222,6 +222,11 @@ color_attachment_compute_aux_usage(struct
> anv_device *device,
> >        att_state->input_aux_usage = ISL_AUX_USAGE_NONE;
> >        att_state->fast_clear = false;
> >        return;
> > +   } else if (iview->image->aux_usage == ISL_AUX_USAGE_MCS) {
> > +      att_state->aux_usage = ISL_AUX_USAGE_MCS;
> > +      att_state->input_aux_usage = ISL_AUX_USAGE_MCS;
> > +      att_state->fast_clear = false;
> > +      return;
> >     }
>
> Small nit. It feels awkward that this function, above the hunk, checks
> iview->image->aux_surface.isl.size == 0, then the next branch checks
> iview->image->aux_usage. It seems more natural to check aux_usage in
> both branches.
>

Not so much... aux_surface.isl.size == 0 implies aux_usage == NONE but not
the other way around.  For gen7 fast clears, for instance, you get NONE in
aux_usage because that's the way we use it for texturing.

--Jason


> Anyway, that nit fixup belongs in a different commit anyway, for
> bisection's sake.
>
> Reviewed-by: Chad Versace <chadversary at chromium.org>
>

There's also an anv blorp patch that's needed to prevent regressions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170222/c1c57c50/attachment.html>


More information about the mesa-dev mailing list