On Tue, Oct 04, 2016 at 03:55:13PM -0700, Chad Versace wrote: > On Tue 04 Oct 2016, Nanley Chery wrote: > > On Mon, Oct 03, 2016 at 06:21:30PM -0700, Jason Ekstrand wrote: > > > On Mon, Oct 3, 2016 at 6:11 PM, Jason Ekstrand <ja...@jlekstrand.net> > > > wrote: > > > > > > > On Tue, Sep 27, 2016 at 3:23 PM, Nanley Chery <nanleych...@gmail.com> > > > > wrote: > > > > > > > >> 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. > > > >> > > > > > > > > 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. > > > > > > > > > > Thinking about it a bit more... > > > > > > We only set up dept/stencil packets once per subpass and we only do clears > > > once per subpass so... I don't think we're actually saving anything by > > > emitting it at clear time rather than at depth/stencil setup time. It is > > > a > > > bit more convenient because the clear values may be more accessible at > > > clear time. > > > > > > As far as "should we emit 3DSTATE_CLEAR_PARAMS all the time?" Let's not > > > go > > > to any heroics to try and avoid re-emitting it. Once per subpass is not a > > > big deal at all. > > > > > > > I wouldn't say the code to implement it was complex, but I'm fine with > > trading off efficiency for simplicity here. I'll add a comment describing > > the > > situation. > > I'm happy with this conclusion.
After testing the V3, I found an interesting result. Emitting two 3DSTATE_CLEAR_PARAMS that both have DepthClearValueValid set to 1 is causing Vulkan CTS failures on BDW+. The GPU doesn't seem to be picking up on the latter packet's clear color. I'll look into this more tomorrow. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev