Mesa (master): iris: Insert buffer barrier in existing cache flush helpers.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 3 23:24:44 UTC 2020
Module: Mesa
Branch: master
Commit: 878c770d13df355432da053c015b7701b3c533e1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=878c770d13df355432da053c015b7701b3c533e1
Author: Francisco Jerez <currojerez at riseup.net>
Date: Wed Feb 5 18:58:23 2020 -0800
iris: Insert buffer barrier in existing cache flush helpers.
As a first step to phasing out the current hashtable-based depth and
render cache tracking mechanisms.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
---
src/gallium/drivers/iris/iris_resolve.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index 1b0c22fc09a..040bb91038e 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -388,6 +388,8 @@ iris_cache_flush_for_read(struct iris_batch *batch,
if (_mesa_hash_table_search_pre_hashed(batch->cache.render, bo->hash, bo) ||
_mesa_set_search_pre_hashed(batch->cache.depth, bo->hash, bo))
iris_flush_depth_and_render_caches(batch);
+
+ iris_emit_buffer_barrier_for(batch, bo, IRIS_DOMAIN_OTHER_READ);
}
static void *
@@ -402,6 +404,8 @@ iris_cache_flush_for_render(struct iris_batch *batch,
enum isl_format format,
enum isl_aux_usage aux_usage)
{
+ iris_emit_buffer_barrier_for(batch, bo, IRIS_DOMAIN_RENDER_WRITE);
+
if (_mesa_set_search_pre_hashed(batch->cache.depth, bo->hash, bo))
iris_flush_depth_and_render_caches(batch);
@@ -461,6 +465,8 @@ iris_cache_flush_for_depth(struct iris_batch *batch,
{
if (_mesa_hash_table_search_pre_hashed(batch->cache.render, bo->hash, bo))
iris_flush_depth_and_render_caches(batch);
+
+ iris_emit_buffer_barrier_for(batch, bo, IRIS_DOMAIN_DEPTH_WRITE);
}
void
More information about the mesa-commit
mailing list