summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-06-20 09:50:56 -0500
committerKenneth Graunke <[email protected]>2019-06-20 13:32:15 -0500
commit5e501ffeb245c3e2e4f93260495aaff960cd8876 (patch)
tree394070993c7c4021ed4440eb9645b2921000e7f0 /src
parentd4a4384b315a4b74357b30f868f4d1c25a571083 (diff)
iris: Add maybe_flush calls to texture_barrier and memory_barrier
Otherwise, tests which loop on glMemoryBarrier may run us out of batch space with piles of flushing. (Ideally, we'd elide those bonus PIPE_CONTROLs, but presumably this isn't that common of a case...) Piglit's arb_pipeline_statistics_query-comp would hit this case after some of the next patches remove other PIPE_CONTROLs with maybe_flushes.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_pipe_control.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_pipe_control.c b/src/gallium/drivers/iris/iris_pipe_control.c
index 65879b4968f..4633ac11134 100644
--- a/src/gallium/drivers/iris/iris_pipe_control.c
+++ b/src/gallium/drivers/iris/iris_pipe_control.c
@@ -161,6 +161,7 @@ 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_batch_maybe_flush(render_batch, 48);
iris_emit_pipe_control_flush(render_batch,
"API: texture barrier (1/2)",
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
@@ -172,6 +173,7 @@ iris_texture_barrier(struct pipe_context *ctx, unsigned flags)
}
if (compute_batch->contains_draw) {
+ iris_batch_maybe_flush(compute_batch, 48);
iris_emit_pipe_control_flush(compute_batch,
"API: texture barrier (1/2)",
PIPE_CONTROL_CS_STALL);
@@ -206,6 +208,7 @@ iris_memory_barrier(struct pipe_context *ctx, unsigned flags)
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
if (ice->batches[i].contains_draw ||
ice->batches[i].cache.render->entries) {
+ iris_batch_maybe_flush(&ice->batches[i], 24);
iris_emit_pipe_control_flush(&ice->batches[i], "API: memory barrier",
bits);
}