<div dir="auto"><div>Nack. We had that and Andres removed it due to high priority interactions.<br><div class="gmail_extra"><br><div class="gmail_quote">On 9 Nov 2017 18:01, "Samuel Pitoiset" <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Copied from RadeonSI.<br>
<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
---<br>
 src/amd/vulkan/si_cmd_buffer.c | 18 ++++++++++++------<br>
 1 file changed, 12 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/amd/vulkan/si_cmd_<wbr>buffer.c b/src/amd/vulkan/si_cmd_<wbr>buffer.c<br>
index 89ee399817..f5c04c07a8 100644<br>
--- a/src/amd/vulkan/si_cmd_<wbr>buffer.c<br>
+++ b/src/amd/vulkan/si_cmd_<wbr>buffer.c<br>
@@ -973,12 +973,18 @@ si_cs_emit_cache_flush(struct radeon_winsys_cs *cs,<br>
                radeon_emit(cs, EVENT_TYPE(V_028A90_FLUSH_AND_<wbr>INV_DB_META) | EVENT_INDEX(0));<br>
        }<br>
<br>
-       if (flush_bits & RADV_CMD_FLAG_PS_PARTIAL_<wbr>FLUSH) {<br>
-               radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));<br>
-               radeon_emit(cs, EVENT_TYPE(V_028A90_PS_<wbr>PARTIAL_FLUSH) | EVENT_INDEX(4));<br>
-       } else if (flush_bits & RADV_CMD_FLAG_VS_PARTIAL_<wbr>FLUSH) {<br>
-               radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));<br>
-               radeon_emit(cs, EVENT_TYPE(V_028A90_VS_<wbr>PARTIAL_FLUSH) | EVENT_INDEX(4));<br>
+       /* Wait for shader engines to go idle.<br>
+        * VS and PS waits are unnecessary if SURFACE_SYNC is going to wait<br>
+        * for everything including CB/DB cache flushes.<br>
+        */<br>
+       if (!flush_cb_db) {<br>
+               if (flush_bits & RADV_CMD_FLAG_PS_PARTIAL_<wbr>FLUSH) {<br>
+                       radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));<br>
+                       radeon_emit(cs, EVENT_TYPE(V_028A90_PS_<wbr>PARTIAL_FLUSH) | EVENT_INDEX(4));<br>
+               } else if (flush_bits & RADV_CMD_FLAG_VS_PARTIAL_<wbr>FLUSH) {<br>
+                       radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));<br>
+                       radeon_emit(cs, EVENT_TYPE(V_028A90_VS_<wbr>PARTIAL_FLUSH) | EVENT_INDEX(4));<br>
+               }<br>
        }<br>
<br>
        if (flush_bits & RADV_CMD_FLAG_CS_PARTIAL_<wbr>FLUSH) {<br>
<font color="#888888">--<br>
2.15.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></blockquote></div><br></div></div></div>