<div dir="ltr">I think I agree with the content of this patch but it needs a new commit message. :-)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 13, 2017 at 7:53 AM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">because buffers get unconditionally initialised by cpu writing.<br>
<br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><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/<wbr>intel_mipmap_tree.c | 7 ++++++-<br>
1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
index f51bbd9cda..5b26300a0f 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -1662,7 +1662,12 @@ intel_miptree_alloc_mcs(struct brw_context *brw,<br>
assert(temp_mcs_surf.size &&<br>
(temp_mcs_surf.size % temp_mcs_surf.row_pitch == 0));<br>
<br>
- const uint32_t alloc_flags = BO_ALLOC_FOR_RENDER;<br>
+ /* Buffer needs to be initialised requiring the buffer to be immediately<br>
+ * mapped to cpu space for writing. Therefore do not use the gpu access<br>
+ * flag which can cause an unnecessary delay if the backing pages happened<br>
+ * to be just used by the GPU.<br>
+ */<br>
+ const uint32_t alloc_flags = 0;<br>
mt->mcs_buf = intel_alloc_aux_buffer(brw, "mcs-miptree",<br>
&temp_main_surf, &temp_mcs_surf,<br>
alloc_flags, mt);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<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>