Skip to content

Instantly share code, notes, and snippets.

@anarsoul
Created September 8, 2019 01:56
Show Gist options
  • Save anarsoul/ddd8e054554ea098964c1b95a236e1d3 to your computer and use it in GitHub Desktop.
Save anarsoul/ddd8e054554ea098964c1b95a236e1d3 to your computer and use it in GitHub Desktop.
commit f8d4713c22779a6f48f92a6271010598cb361a6b
Author: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Sat Sep 7 18:24:13 2019 -0700
serialize
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 3b8f7526f32..9760601ebfd 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -1668,6 +1668,18 @@ _lima_flush(struct lima_context *ctx, bool end_of_frame)
}
}
+#if 1 /* Serialize */
+ if (ctx->framebuffer.base.nr_cbufs) {
+ struct lima_resource *res = lima_resource(ctx->framebuffer.base.cbufs[0]->texture);
+ lima_bo_wait(res->bo, LIMA_GEM_WAIT_WRITE, PIPE_TIMEOUT_INFINITE);
+ }
+
+ if (ctx->framebuffer.base.zsbuf) {
+ struct lima_resource *res = lima_resource(ctx->framebuffer.base.zsbuf->texture);
+ lima_bo_wait(res->bo, LIMA_GEM_WAIT_WRITE, PIPE_TIMEOUT_INFINITE);
+ }
+#endif
+
ctx->plb_index = (ctx->plb_index + 1) % lima_ctx_num_plb;
if (ctx->framebuffer.base.nr_cbufs) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment