[Mesa-dev] [PATCH 3/3] anv/image: Disable HiZ for depth buffer arrays

Nanley Chery nanleychery at gmail.com
Fri Jan 6 23:48:31 UTC 2017


On Fri, Jan 06, 2017 at 03:08:12PM -0800, Jason Ekstrand wrote:
> 2017-01-06 14:46 GMT-08:00 Nanley Chery <nanleychery at gmail.com>:
> 
> > We currently don't perform clears or resolves on multiple array layers
> > with HiZ.
> >
> 
> Glancing through the code, it looks like you're right.  I'm not even sure
> that you can do layered HiZ clears and/or resolves with the HZ op; you'd
> probably have to do it the gen7 way with blorp.  Thanks for catching this!
> 

No problem! I believe we can perform those HiZ operations on different
layers, but it requires changing
3DSTATE_DEPTH_BUFFER::MinimumArrayElement before each HiZ sequence.
You'll find this note in the following section of the SKL PRM:
Optimized Depth Buffer Clear and/or Stencil Buffer Clear .

> 
> > Cc: mesa-stable at lists.freedesktop.org
> 
> 
> Do we have hiz in 13.1?  If not, it won't apply and Emil will reject it.
> 

We do. If you run a Vulkan application with INTEL_VK_HIZ=0 preceding the
command, you'll see: 'anv_image.c:190: FINISHME: Implement gen7 HiZ'

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

Thanks for the review!

-Nanley

> 
> >
> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> >  src/intel/vulkan/anv_image.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> > index e60373a151..f262d8a524 100644
> > --- a/src/intel/vulkan/anv_image.c
> > +++ b/src/intel/vulkan/anv_image.c
> > @@ -186,6 +186,8 @@ make_surface(const struct anv_device *dev,
> >           anv_finishme("Implement gen7 HiZ");
> >        } else if (vk_info->mipLevels > 1) {
> >           anv_finishme("Test multi-LOD HiZ");
> > +      } else if (vk_info->arrayLayers > 1) {
> > +         anv_finishme("Implement multi-arrayLayer HiZ clears and
> > resolves");
> >        } else if (dev->info.gen == 8 && vk_info->samples > 1) {
> >           anv_finishme("Test gen8 multisampled HiZ");
> >        } else {
> > --
> > 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