Mesa (master): iris: Use iris_flush_bits_for_history in iris_transfer_flush_region
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 18:32:52 UTC 2019
Module: Mesa
Branch: master
Commit: c4c17ab3ec1d67b0f2fd9816681378bdc8efe220
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4c17ab3ec1d67b0f2fd9816681378bdc8efe220
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed Jun 19 23:01:21 2019 -0500
iris: Use iris_flush_bits_for_history in iris_transfer_flush_region
Instead of using the combined iris_flush_and_dirty_for_history, use
iris_flush_bits_for_history directly - we were already using the split
out iris_dirty_for_history. There's no need to dirty twice, and we can
avoid the looping altogether for non-buffers.
---
src/gallium/drivers/iris/iris_resource.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index f088f259f19..1f7ed3e270b 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1472,12 +1472,19 @@ iris_transfer_flush_region(struct pipe_context *ctx,
if (map->staging)
iris_flush_staging_region(xfer, box);
+ uint32_t history_flush = 0;
+
+ if (res->base.target == PIPE_BUFFER) {
+ history_flush |= iris_flush_bits_for_history(res) |
+ PIPE_CONTROL_RENDER_TARGET_FLUSH;
+ }
+
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_flush_and_dirty_for_history(ice, &ice->batches[i], res,
- "cache history: transfer flush");
+ struct iris_batch *batch = &ice->batches[i];
+ if (batch->contains_draw || batch->cache.render->entries) {
+ iris_batch_maybe_flush(batch, 24);
+ iris_emit_pipe_control_flush(batch, "cache history: transfer flush",
+ history_flush);
}
}
More information about the mesa-commit
mailing list