<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 8:17 AM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>><br>
<br>
Blorp consults brw_is_color_fast_clear_<wbr>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>
<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>
<br>
Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_<wbr>blorp.c | 6 +++++-<br>
1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
index c902f2e..7e257e9 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
@@ -761,8 +761,12 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,<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_<wbr>compatible(). This, however, doesn't<br>
+ * prevent lossless compression on Gen9+.<br>
*/<br>
- assert(partial_clear);<br>
+ assert(partial_clear || _mesa_is_format_integer_color(<wbr>format));<br></blockquote><div><br></div><div>How about assert(isl_format_supports_lossless_compression())?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_<wbr>UNRESOLVED;<br>
}<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.5<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>