<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 27, 2016 at 3:23 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Sep 27, 2016 at 03:12:17PM -0700, Chad Versace wrote:<br>
> On Tue 27 Sep 2016, Nanley Chery wrote:<br>
> > On Tue, Sep 27, 2016 at 11:00:21AM -0700, Chad Versace wrote:<br>
><br>
> > > As a consequence of that reasoning, we should set 3DSTATE_CLEAR_PARAMS.<wbr>DepthClearValueValid = 1<br>
> > > whenever hiz is enabled, even if we don't care about the actual clear value.<br></div></div></blockquote><div><br></div><div>The logic seems to imply that we can't trust the context to save/restore our depth clear value so we have to set it every time. At the very least, once per batch? In any case, I doubt there's all that much cost involved in emitting 3DSTATE_CLEAR_PARAMS so I don't think re-emitting it is that big of a deal.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
> ><br>
> > In the V3, I plan to emit that packet once at device initialization time<br>
> > HSW+, and to always emit it (in the expected location) for IVB/BYT. Only<br>
> > the latter platforms have the restriction that it must always be<br>
> > programmed with the other depth/stencil commands.<br>
><br>
> Is there any benefit to emitting it multiple times on ivb/byt? Does<br>
> emitting once during initialization, as for hsw, also work for ivb/byt?<br>
> If so, the code is cleaner if the two gens share the same workaround<br>
> code.<br>
<br>
</div></div>The benefit for emitting it multiple times on IVB/BYT is that we're<br>
(possibly) following the oddly-worded programming note for the packet:<br>
<br>
From the IVB PRM Vol2P1, 11.5.5.4 3DSTATE_CLEAR_PARAMS:<br>
<br>
3DSTATE_CLEAR_PARAMS must always be programmed in the along with<br>
the other Depth/Stencil state commands(i.e. 3DSTATE_DEPTH_BUFFER,<br>
3DSTATE_STENCIL_BUFFER, or 3DSTATE_HIER_DEPTH_BUFFER)<br>
<br>
HSW+ doesn't have this restriction, so we're free to only do it once.<br>
</blockquote></div><br></div></div>