diff options
author | Kenneth Graunke <[email protected]> | 2018-12-22 21:24:02 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:11 -0800 |
commit | bacc722d1376e95003da9904be9afc979b2be332 (patch) | |
tree | ffaf8129ee8d54ce93e30a1d9ee93a3bcd2133a0 /src/gallium | |
parent | 7a9e87c224cfe0854258ef293b017f3685626868 (diff) |
iris: Flush the render cache in flush_and_dirty_for_history
BLORP uses the render engine to write to buffers, and we need to flush
that data out to the actual surface (finishing the write). Then, the
rest of this function invalidates any caches that might have stale data
which needs to be refetched.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 0751b19267c..48f348b643e 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -930,6 +930,13 @@ iris_flush_and_dirty_for_history(struct iris_context *ice, return; unsigned flush = PIPE_CONTROL_CS_STALL; + + /* We've likely used the rendering engine (i.e. BLORP) to write to this + * surface. Flush the render cache so the data actually lands. + */ + if (batch->name != IRIS_BATCH_COMPUTE) + flush |= PIPE_CONTROL_RENDER_TARGET_FLUSH; + uint64_t dirty = 0ull; if (res->bind_history & PIPE_BIND_CONSTANT_BUFFER) { |