llvmpipe: flush on api memorybarrier.
authorDave Airlie <airlied@redhat.com>
Thu, 22 Aug 2019 01:28:40 +0000 (11:28 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 27 Aug 2019 02:30:16 +0000 (12:30 +1000)
Until we have somewhere we can do better, just hit it with a hammer.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_texture.c

index ca15d785055ad5b26edd464fa944808edc47a111..3a182b67384dec2cb629543e68ac1fa095361786 100644 (file)
@@ -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;
 }