Module: Mesa
Branch: master
Commit: e44a4bae52f8d835bd7d4b740cb688f59d03cced
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e44a4bae52f8d835bd7d4b740cb688f59d03cced

Author: Vasily Khoruzhick <[email protected]>
Date:   Tue May  7 19:03:34 2019 -0700

lima: fix tile buffer reloading

Buffer needs to be reloaded every time unless explicit clear() was
called.

Fixes rendering issues with wayland compositors.

Reviewed-by: Qiang Yu <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>

---

 src/gallium/drivers/lima/lima_draw.c     | 4 ++--
 src/gallium/drivers/lima/lima_resource.c | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/lima/lima_draw.c 
b/src/gallium/drivers/lima/lima_draw.c
index e0a1e181937..99b2675cb1e 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -1675,9 +1675,9 @@ _lima_flush(struct lima_context *ctx, bool end_of_frame)
    ctx->plb_index = (ctx->plb_index + 1) % lima_ctx_num_plb;
 
    if (ctx->framebuffer.base.nr_cbufs) {
-      /* this surface may need reload when next draw if not end of frame */
+      /* Set reload flag for next draw. It'll be unset if buffer is cleared */
       struct lima_surface *surf = lima_surface(ctx->framebuffer.base.cbufs[0]);
-      surf->reload = !end_of_frame;
+      surf->reload = true;
    }
 }
 
diff --git a/src/gallium/drivers/lima/lima_resource.c 
b/src/gallium/drivers/lima/lima_resource.c
index 4e215e9e08f..0aefb2c7900 100644
--- a/src/gallium/drivers/lima/lima_resource.c
+++ b/src/gallium/drivers/lima/lima_resource.c
@@ -382,6 +382,8 @@ lima_surface_create(struct pipe_context *pctx,
    surf->tiled_w = align(psurf->width, 16) >> 4;
    surf->tiled_h = align(psurf->height, 16) >> 4;
 
+   surf->reload = true;
+
    struct lima_context *ctx = lima_context(pctx);
    if (ctx->plb_pp_stream) {
       struct lima_ctx_plb_pp_stream_key key = {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to