summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2020-02-05 20:30:53 -0800
committerFrancisco Jerez <currojerez@riseup.net>2020-02-06 21:40:44 -0800
commit93bea4494f700c2d8f41f44319985fb47d63dcff (patch)
treebcf90256b28f730cee462133871c36e15be4aecb
parentd3068cde747fd726ad210300aa9dd111cf82d0b0 (diff)
WIP: iris: Add read-write domain for data cache.
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.h1
-rw-r--r--src/gallium/drivers/iris/iris_pipe_control.c2
-rw-r--r--src/gallium/drivers/iris/iris_state.c6
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h
index 8aecb087375..5506d104676 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.h
+++ b/src/gallium/drivers/iris/iris_bufmgr.h
@@ -92,6 +92,7 @@ enum iris_memory_zone {
enum iris_domain {
IRIS_DOMAIN_RENDER_WRITE = 0,
IRIS_DOMAIN_DEPTH_WRITE,
+ IRIS_DOMAIN_DATA_WRITE,
IRIS_DOMAIN_OTHER_WRITE,
IRIS_DOMAIN_VF_READ,
IRIS_DOMAIN_OTHER_READ,
diff --git a/src/gallium/drivers/iris/iris_pipe_control.c b/src/gallium/drivers/iris/iris_pipe_control.c
index 3143d4e63c1..38132202d81 100644
--- a/src/gallium/drivers/iris/iris_pipe_control.c
+++ b/src/gallium/drivers/iris/iris_pipe_control.c
@@ -179,6 +179,7 @@ iris_emit_buffer_barrier_for(struct iris_batch *batch,
const uint32_t flush_bits[NUM_IRIS_DOMAINS] = {
PIPE_CONTROL_RENDER_TARGET_FLUSH,
PIPE_CONTROL_DEPTH_CACHE_FLUSH,
+ PIPE_CONTROL_DATA_CACHE_FLUSH,
PIPE_CONTROL_FLUSH_ENABLE,
PIPE_CONTROL_STALL_AT_SCOREBOARD,
PIPE_CONTROL_STALL_AT_SCOREBOARD,
@@ -186,6 +187,7 @@ iris_emit_buffer_barrier_for(struct iris_batch *batch,
const uint32_t invalidate_bits[NUM_IRIS_DOMAINS] = {
PIPE_CONTROL_RENDER_TARGET_FLUSH,
PIPE_CONTROL_DEPTH_CACHE_FLUSH,
+ PIPE_CONTROL_DATA_CACHE_FLUSH,
PIPE_CONTROL_FLUSH_ENABLE,
PIPE_CONTROL_VF_CACHE_INVALIDATE,
(PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 78345a5ba3a..4d40e4d465c 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -6863,6 +6863,9 @@ batch_mark_sync_for_pipe_control(struct iris_batch *batch, uint32_t flags)
if ((flags & PIPE_CONTROL_DEPTH_CACHE_FLUSH))
iris_batch_mark_flush_sync(batch, IRIS_DOMAIN_DEPTH_WRITE);
+ if ((flags & PIPE_CONTROL_DATA_CACHE_FLUSH))
+ iris_batch_mark_flush_sync(batch, IRIS_DOMAIN_DATA_WRITE);
+
if ((flags & PIPE_CONTROL_FLUSH_ENABLE))
iris_batch_mark_flush_sync(batch, IRIS_DOMAIN_OTHER_WRITE);
@@ -6879,6 +6882,9 @@ batch_mark_sync_for_pipe_control(struct iris_batch *batch, uint32_t flags)
if ((flags & PIPE_CONTROL_DEPTH_CACHE_FLUSH))
iris_batch_mark_invalidate_sync(batch, IRIS_DOMAIN_DEPTH_WRITE);
+ if ((flags & PIPE_CONTROL_DATA_CACHE_FLUSH))
+ iris_batch_mark_invalidate_sync(batch, IRIS_DOMAIN_DATA_WRITE);
+
if ((flags & PIPE_CONTROL_FLUSH_ENABLE))
iris_batch_mark_invalidate_sync(batch, IRIS_DOMAIN_OTHER_WRITE);