[Mesa-dev] [PATCH v2 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

Nanley Chery nanleychery at gmail.com
Thu Feb 2 23:49:41 UTC 2017


On Thu, Feb 02, 2017 at 01:38:45PM -0800, Jason Ekstrand wrote:
> Perf numbers in the commit message would be nice
> 

How's the following?

   Reclaims about 1.95% FPS for Dota 2 on some configurations.

> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

Thanks!

> 
> On Thu, Feb 2, 2017 at 8:15 AM, Nanley Chery <nanleychery at gmail.com> wrote:
> 
> > Compressing a render target and decompressing it in the same
> > single-subpass render pass may waste bandwidth. While this may be
> > beneficial in some circumstances, it does not help in all.
> >
> > v2 (Jason Ekstrand):
> > - Provide a more thorough comment
> > - Enable CCS_D for input attachments
> >
> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> >  src/intel/vulkan/genX_cmd_buffer.c | 17 ++++++++++++++---
> >  1 file changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> > b/src/intel/vulkan/genX_cmd_buffer.c
> > index 63911f2c8e..cba876b58e 100644
> > --- a/src/intel/vulkan/genX_cmd_buffer.c
> > +++ b/src/intel/vulkan/genX_cmd_buffer.c
> > @@ -266,13 +266,24 @@ color_attachment_compute_aux_usage(struct
> > anv_device *device,
> >        att_state->fast_clear = false;
> >     }
> >
> > -   if (isl_format_supports_lossless_compression(&device->info,
> > -                                                iview->isl.format)) {
> > +   /**
> > +    * TODO: Consider using a heuristic to determine if temporarily
> > enabling
> > +    * CCS_E for this image view would be beneficial.
> > +    *
> > +    * While fast-clear resolves and partial resolves are fairly cheap in
> > the
> > +    * case where you render to most of the pixels, full resolves are not
> > +    * because they potentially involve reading and writing the entire
> > +    * framebuffer.  If we can't texture with CCS_E, we should leave it
> > off and
> > +    * limit ourselves to fast clears.
> > +    */
> > +   if (iview->image->aux_usage == ISL_AUX_USAGE_CCS_E) {
> >        att_state->aux_usage = ISL_AUX_USAGE_CCS_E;
> >        att_state->input_aux_usage = ISL_AUX_USAGE_CCS_E;
> >     } else if (att_state->fast_clear) {
> >        att_state->aux_usage = ISL_AUX_USAGE_CCS_D;
> > -      if (GEN_GEN >= 9) {
> > +      if (GEN_GEN >= 9 &&
> > +          !isl_format_supports_lossless_compression(&device->info,
> > +                                                    iview->isl.format)) {
> >           /* From the Sky Lake PRM, RENDER_SURFACE_STATE::
> > AuxiliarySurfaceMode:
> >            *
> >            *    "If Number of Multisamples is MULTISAMPLECOUNT_1, AUX_CCS_D
> > --
> > 2.11.0
> >
> > _______________________________________________
> > 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