lima: Return fence unconditionally
authorRoman Stratiienko <roman.stratiienko@globallogic.com>
Mon, 2 Sep 2019 14:46:22 +0000 (17:46 +0300)
committerVasily Khoruzhick <anarsoul@gmail.com>
Wed, 4 Sep 2019 00:32:04 +0000 (00:32 +0000)
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>
src/gallium/drivers/lima/lima_draw.c

index d39e198..3b8f752 100644 (file)
@@ -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;