From 6c2fa01b9c22dc5f4b701a4a8e701c92b6ac182d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 22 Aug 2019 11:28:40 +1000 Subject: [PATCH] llvmpipe: flush on api memorybarrier. Until we have somewhere we can do better, just hit it with a hammer. Reviewed-by: Roland Scheidegger --- src/gallium/drivers/llvmpipe/lp_texture.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index ca15d785055..3a182b67384 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -768,6 +768,13 @@ llvmpipe_resource_size(const struct pipe_resource *resource) return size; } +static void +llvmpipe_memory_barrier(struct pipe_context *pipe, + unsigned flags) +{ + /* this may be an overly large hammer for this nut. */ + llvmpipe_finish(pipe, "barrier"); +} #ifdef DEBUG void @@ -824,4 +831,6 @@ llvmpipe_init_context_resource_funcs(struct pipe_context *pipe) pipe->transfer_flush_region = u_default_transfer_flush_region; pipe->buffer_subdata = u_default_buffer_subdata; pipe->texture_subdata = u_default_texture_subdata; + + pipe->memory_barrier = llvmpipe_memory_barrier; } -- 2.30.2