From: Roman Stratiienko <roman.stratiienko@globallogic.com> Date: Mon, 2 Sep 2019 14:46:22 +0000 (+0300) Subject: lima: Return fence unconditionally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef621a73f720e1956ca356c1147d3b3dc680da0d;p=mesa.git lima: Return fence unconditionally Based on the vc4 implementation. Fixes Android RenderEngine::flush() routine: android.googlesource.com/platform/frameworks/native/+/refs/tags/android-o-mr1-iot-release-smart-clock-fcs/services/surfaceflinger/RenderEngine/RenderEngine.cpp#225 Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> --- diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c index d39e198cd9b..3b8f7526f32 100644 --- a/src/gallium/drivers/lima/lima_draw.c +++ b/src/gallium/drivers/lima/lima_draw.c @@ -1693,10 +1693,8 @@ lima_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, unsigned flags) { struct lima_context *ctx = lima_context(pctx); - if (!lima_ctx_dirty(ctx)) - return; - - _lima_flush(ctx, flags & PIPE_FLUSH_END_OF_FRAME); + if (lima_ctx_dirty(ctx)) + _lima_flush(ctx, flags & PIPE_FLUSH_END_OF_FRAME); if (fence) { int fd;