From 1c8b4940ebf795a2c41b901ef722a6182bc94eda Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 4 Mar 2022 03:47:06 -0800 Subject: [PATCH] iris: Emit flushes for push constant source buffers Push constant loading is not coherent with L3 according to the document that describes the hardware change for the vertex buffer L3 Bypass Disable field. If we've updated a push constant buffer with say, a blorp_buffer_copy, we may need to flush both the render cache and the tile cache. Reviewed-by: Francisco Jerez Reviewed-by: Rohan Garg Part-of: --- src/gallium/drivers/iris/iris_state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 86266ad..c52f927 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -5617,6 +5617,9 @@ setup_constant_buffers(struct iris_context *ice, assert(cbuf->buffer_offset % 32 == 0); + if (res) + iris_emit_buffer_barrier_for(batch, res->bo, IRIS_DOMAIN_OTHER_READ); + push_bos->buffers[n].length = range->length; push_bos->buffers[n].addr = res ? ro_bo(res->bo, range->start * 32 + cbuf->buffer_offset) -- 2.7.4