iris: Use render_batch/compute_batch locals in memory_barrier
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 15:02:42 +0000 (10:02 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 15:04:38 +0000 (10:04 -0500)
We have them, may as well use them.

src/gallium/drivers/iris/iris_pipe_control.c

index 3d12a5b03603f805f0063acec0299eacb58315a8..f686ef745c90bab78159f252387f92c9ec43bf20 100644 (file)
@@ -155,18 +155,18 @@ iris_texture_barrier(struct pipe_context *ctx, unsigned flags)
    if (render_batch->contains_draw ||
        render_batch->cache.render->entries ||
        render_batch->cache.depth->entries) {
-      iris_emit_pipe_control_flush(&ice->batches[IRIS_BATCH_RENDER],
+      iris_emit_pipe_control_flush(render_batch,
                                    PIPE_CONTROL_DEPTH_CACHE_FLUSH |
                                    PIPE_CONTROL_RENDER_TARGET_FLUSH |
                                    PIPE_CONTROL_CS_STALL);
-      iris_emit_pipe_control_flush(&ice->batches[IRIS_BATCH_RENDER],
+      iris_emit_pipe_control_flush(render_batch,
                                    PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE);
    }
 
    if (compute_batch->contains_draw) {
-      iris_emit_pipe_control_flush(&ice->batches[IRIS_BATCH_COMPUTE],
+      iris_emit_pipe_control_flush(compute_batch,
                                    PIPE_CONTROL_CS_STALL);
-      iris_emit_pipe_control_flush(&ice->batches[IRIS_BATCH_COMPUTE],
+      iris_emit_pipe_control_flush(compute_batch,
                                    PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE);
    }
 }