<div dir="ltr">This makes sure we flush things out of other caches prior to using a surface through the render cache. Currently, this is a no-op because GL won't let you bind anything other than a color surface as color so it should never end up in the depth cache. However, this does complete the flush/add_bo pair for regular drawing which will be required for the next commit.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 13, 2017 at 5:52 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This makes sure we flush things out such as depth writes prior to using<br>
a surface through the render cache. Besides the overhead of a hash<br>
table look-up, this function is harmless to call repeatedly with the<br>
same arguments.<br>
<br>
Cc: "17.3" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_<wbr>draw.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
index 7e29dcf..1f86378 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
@@ -508,6 +508,8 @@ brw_predraw_resolve_<wbr>framebuffer(struct brw_context *brw)<br>
irb->mt_layer, irb->layer_count,<br>
isl_format,<br>
ctx->Color.BlendEnabled & (1 << i));<br>
+<br>
+ brw_cache_flush_for_render(<wbr>brw, irb->mt->bo);<br>
}<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>