<p dir="ltr"></p>
<p dir="ltr">On Sep 2, 2016 3:07 AM, "Pohjolainen, Topi" <<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>> wrote:<br>
><br>
> On Fri, Sep 02, 2016 at 08:34:27AM +0300, Pohjolainen, Topi wrote:<br>
> > On Thu, Sep 01, 2016 at 02:33:48PM -0700, Jason Ekstrand wrote:<br>
> > > On Wed, Aug 31, 2016 at 8:17 AM, Topi Pohjolainen<br>
> > > <[1]<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
> > ><br>
> > > From: Topi Pohjolainen <[2]<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>><br>
> > > Blorp consults brw_is_color_fast_clear_compatible() to see if any<br>
> > > restrictions apply for fast clear in addition to the capablities<br>
> > > advertised in isl_format.c::format_info[]. On Gen8+ integer formats<br>
> > > are backlisted for plain old fast clear but there is no reason why<br>
> > > lossless compression shouldn't be supported. In fact, lossless<br>
> > > compression of integer formats is already supported for normal<br>
> > > render paths.<br>
> > > This patch prepares for dropping the delayed allocating of the mcs<br>
> > > buffer for lossless compression. Until now the skip of fast clear<br>
> > > also prevented the mcs being allocated and hence the lossless<br>
> > > compression being effectively turned off for integer formats.<br>
> > > Once the mcs buffer is allocated beforehand, the assertion addressed<br>
> > > here would start triggering.<br>
> > > Signed-off-by: Topi Pohjolainen <[3]<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
> > > ---<br>
> > > src/mesa/drivers/dri/i965/brw_blorp.c | 6 +++++-<br>
> > > 1 file changed, 5 insertions(+), 1 deletion(-)<br>
> > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > > b/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > > index c902f2e..7e257e9 100644<br>
> > > --- a/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > > @@ -761,8 +761,12 @@ do_single_blorp_clear(struct brw_context *brw,<br>
> > > struct gl_framebuffer *fb,<br>
> > > /* Compressed buffers can be cleared also using normal<br>
> > > rep-clear. In<br>
> > > * such case they bahave such as if they were drawn using<br>
> > > normal 3D<br>
> > > * render pipeline, and we simply mark the mcs as dirty.<br>
> > > + *<br>
> > > + * Fast clear of integer formats is not supported on<br>
> > > Gen8+. See<br>
> > > + * brw_is_color_fast_clear_compatible(). This, however,<br>
> > > doesn't<br>
> > > + * prevent lossless compression on Gen9+.<br>
> > > */<br>
> > > - assert(partial_clear);<br>
> > > + assert(partial_clear || _mesa_is_format_integer_color(<br>
> > > format));<br>
> > ><br>
> > > How about assert(isl_format_supports_lossless_compression())?<br>
> ><br>
> > Instead of _mesa_is_format_integer_color()? Sounds good to me.<br>
><br>
> Well, I suppose we could just drop the assert? This is in a conditional<br>
> block:</p>
<p dir="ltr">Yeah, really the code that's protected by the assert has nothing to do with fast clears. Instead, it's just "you rendered into a compressed render target with compression, flag it as unresolved". We probably need similar code in brw_blorp_blit_miptrees of we don't have it already.</p>
<p dir="ltr">> if (intel_miptree_is_lossless_compressed(brw, irb->mt)) {<br>
> /* Compressed buffers can be cleared also using normal rep-clear. In<br>
> * such case they bahave such as if they were drawn using normal 3D<br>
> * render pipeline, and we simply mark the mcs as dirty.<br>
> *<br>
> * Fast clear of integer formats is not supported on Gen8+. See<br>
> * brw_is_color_fast_clear_compatible(). This, however, doesn't<br>
> * prevent lossless compression on Gen9+.<br>
> */<br>
> assert(partial_clear || _mesa_is_format_integer_color(format));<br>
><br>
> ><br>
> > ><br>
> > > irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_<br>
> > > UNRESOLVED;<br>
> > > }<br>
> > > }<br>
> > > --<br>
> > > 2.5.5<br>
> > > _______________________________________________<br>
> > > mesa-dev mailing list<br>
> > > [4]<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > > [5]<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> > ><br>
> > > References<br>
> > ><br>
> > > 1. mailto:<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a><br>
> > > 2. mailto:<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a><br>
> > > 3. mailto:<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a><br>
> > > 4. mailto:<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > > 5. <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br></p>