[Mesa-dev] [PATCH V2 10/11] genX/cmd_buffer: Enable fast depth clears

Nanley Chery nanleychery at gmail.com
Tue Sep 27 22:23:03 UTC 2016


On Tue, Sep 27, 2016 at 03:12:17PM -0700, Chad Versace wrote:
> On Tue 27 Sep 2016, Nanley Chery wrote:
> > On Tue, Sep 27, 2016 at 11:00:21AM -0700, Chad Versace wrote:
> 
> > > As a consequence of that reasoning, we should set 3DSTATE_CLEAR_PARAMS.DepthClearValueValid = 1 
> > > whenever hiz is enabled, even if we don't care about the actual clear value.
> > 
> > In the V3, I plan to emit that packet once at device initialization time
> > HSW+, and to always emit it (in the expected location) for IVB/BYT. Only
> > the latter platforms have the restriction that it must always be
> > programmed with the other depth/stencil commands.
> 
> Is there any benefit to emitting it multiple times on ivb/byt? Does
> emitting once during initialization, as for hsw, also work for ivb/byt?
> If so, the code is cleaner if the two gens share the same workaround
> code.

The benefit for emitting it multiple times on IVB/BYT is that we're
(possibly) following the oddly-worded programming note for the packet:

   From the IVB PRM Vol2P1, 11.5.5.4 3DSTATE_CLEAR_PARAMS:

      3DSTATE_CLEAR_PARAMS must always be programmed in the along with
      the other Depth/Stencil state commands(i.e.  3DSTATE_DEPTH_BUFFER,
      3DSTATE_STENCIL_BUFFER, or 3DSTATE_HIER_DEPTH_BUFFER)

HSW+ doesn't have this restriction, so we're free to only do it once.


More information about the mesa-dev mailing list