[Mesa-dev] [PATCH 10/18] anv/cmd_buffer: Remove extra resolve for certain depth buffers

Nanley Chery nanleychery at gmail.com
Tue Feb 28 16:46:18 UTC 2017


On Mon, Feb 27, 2017 at 09:16:56PM -0800, Jason Ekstrand wrote:
> Let me make sure I understand this patch correctly:  In the previous patch
> we made it so that we no longer unconditionally use HiZ for sampling so,
> when the image is in the general layout, we don't need a HiZ resolve
		   ^
If you replace "is in" with "enters", your statement is correct.

> because we are ignoring the HiZ buffer anyway.
> 

-Nanley

> On Feb 27, 2017 5:22 PM, "Nanley Chery" <nanleychery at gmail.com> wrote:
> 
> > Due to recent commits, the sampler now bypasses the auxiliary HiZ buffer
> > when reading from a depth image subresource that is in the general
> > layout. Remove this unneeded resolve.
> >
> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> >  src/intel/vulkan/genX_cmd_buffer.c | 17 +----------------
> >  1 file changed, 1 insertion(+), 16 deletions(-)
> >
> > diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> > b/src/intel/vulkan/genX_cmd_buffer.c
> > index 2cb4468696..3d521a01f7 100644
> > --- a/src/intel/vulkan/genX_cmd_buffer.c
> > +++ b/src/intel/vulkan/genX_cmd_buffer.c
> > @@ -355,27 +355,12 @@ transition_depth_buffer(struct anv_cmd_buffer
> > *cmd_buffer,
> >        hiz_op = BLORP_HIZ_OP_HIZ_RESOLVE;
> >     } else {
> >        assert(hiz_enabled == enable_hiz);
> > -      /* If the same buffer will be used, no resolves are necessary
> > except for
> > -       * the special case noted below.
> > -       */
> > +      /* If the same buffer will be used, no resolves are necessary. */
> >        hiz_op = BLORP_HIZ_OP_NONE;
> >     }
> >
> >     if (hiz_op != BLORP_HIZ_OP_NONE)
> >        anv_gen8_hiz_op_resolve(cmd_buffer, image, hiz_op);
> > -
> > -   /* Images that have sampling with HiZ enabled cause all shader
> > sampling to
> > -    * load data with the HiZ buffer. Therefore, in the case of
> > transitioning to
> > -    * the general layout - which currently routes all writes to the depth
> > -    * buffer - we must ensure that the HiZ buffer remains consistent with
> > the
> > -    * depth buffer by performing an additional HIZ resolve if the
> > operation
> > -    * required by this transition was not already a HiZ resolve.
> > -    */
> > -   if (final_layout == VK_IMAGE_LAYOUT_GENERAL &&
> > -       anv_can_sample_with_hiz(GEN_GEN, image->samples) &&
> > -       hiz_op != BLORP_HIZ_OP_HIZ_RESOLVE) {
> > -      anv_gen8_hiz_op_resolve(cmd_buffer, image,
> > BLORP_HIZ_OP_HIZ_RESOLVE);
> > -   }
> >  }
> >
> >
> > --
> > 2.11.1
> >
> > _______________________________________________
> > 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