57 lines
1.9 KiB
Diff
57 lines
1.9 KiB
Diff
|
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
|
||
|
index e0a1e181937..9cb0c6c360f 100644
|
||
|
--- a/src/gallium/drivers/lima/lima_draw.c
|
||
|
+++ b/src/gallium/drivers/lima/lima_draw.c
|
||
|
@@ -1549,7 +1549,7 @@ lima_pack_pp_frame_reg(struct lima_context *ctx, uint32_t *frame_reg,
|
||
|
}
|
||
|
|
||
|
static void
|
||
|
-_lima_flush(struct lima_context *ctx, bool end_of_frame)
|
||
|
+_lima_flush(struct lima_context *ctx)
|
||
|
{
|
||
|
lima_finish_plbu_cmd(ctx);
|
||
|
|
||
|
@@ -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;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@@ -1687,7 +1687,7 @@ lima_flush(struct lima_context *ctx)
|
||
|
if (!lima_ctx_dirty(ctx))
|
||
|
return;
|
||
|
|
||
|
- _lima_flush(ctx, false);
|
||
|
+ _lima_flush(ctx);
|
||
|
}
|
||
|
|
||
|
static void
|
||
|
@@ -1698,7 +1698,7 @@ lima_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
|
||
|
if (!lima_ctx_dirty(ctx))
|
||
|
return;
|
||
|
|
||
|
- _lima_flush(ctx, flags & PIPE_FLUSH_END_OF_FRAME);
|
||
|
+ _lima_flush(ctx);
|
||
|
|
||
|
if (fence) {
|
||
|
int fd;
|
||
|
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 = {
|