freedreno/a2xx: call fd2_emit_ib() directly from fd2
[mesa.git] / src / gallium / drivers / v3d / v3d_context.c
index 8dc8dd635816677d3c5b273af4d00fd663ee59d6..93f0caabc357e078e1e107306d8d599254879bfc 100644 (file)
@@ -72,7 +72,13 @@ v3d_memory_barrier(struct pipe_context *pctx, unsigned int flags)
 {
         struct v3d_context *v3d = v3d_context(pctx);
 
-       if (!(flags & ~PIPE_BARRIER_UPDATE))
+        /* We only need to flush for SSBOs and images, because for everything
+         * else we flush the job automatically when we needed.
+         */
+        const unsigned int flush_flags = PIPE_BARRIER_SHADER_BUFFER |
+                                         PIPE_BARRIER_IMAGE;
+
+       if (!(flags & flush_flags))
                return;
 
         /* We only need to flush jobs writing to SSBOs/images. */