Mesa (master): Revert "st/dri: do FLUSH_VERTICES before calling flush_resource"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 20 13:02:31 UTC 2020


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

Author: Daniel Stone <daniels at collabora.com>
Date:   Mon Jan 20 12:33:22 2020 +0000

Revert "st/dri: do FLUSH_VERTICES before calling flush_resource"

This reverts commit 3ba16d36c988a1c7b31c7fe44c1b6a24d9d8227d.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472>

---

 src/gallium/state_trackers/dri/dri2.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index e1d87eec6ad..e6f0e40465a 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -445,8 +445,10 @@ dri2_allocate_textures(struct dri_context *ctx,
       /* Flush the texture before unreferencing, so that other clients can
        * see what the driver has rendered.
        */
-      if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i])
-         ctx->st->flush_resource(ctx->st, drawable->textures[i]);
+      if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i]) {
+         struct pipe_context *pipe = ctx->st->pipe;
+         pipe->flush_resource(pipe, drawable->textures[i]);
+      }
 
       pipe_resource_reference(&drawable->textures[i], NULL);
    }
@@ -1515,11 +1517,11 @@ dri2_blit_image(__DRIcontext *context, __DRIimage *dst, __DRIimage *src,
    pipe->blit(pipe, &blit);
 
    if (flush_flag == __BLIT_FLAG_FLUSH) {
-      ctx->st->flush_resource(ctx->st, dst->texture);
+      pipe->flush_resource(pipe, dst->texture);
       ctx->st->flush(ctx->st, 0, NULL, NULL, NULL);
    } else if (flush_flag == __BLIT_FLAG_FINISH) {
       screen = dri_screen(ctx->sPriv)->base.screen;
-      ctx->st->flush_resource(ctx->st, dst->texture);
+      pipe->flush_resource(pipe, dst->texture);
       ctx->st->flush(ctx->st, 0, &fence, NULL, NULL);
       (void) screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
       screen->fence_reference(screen, &fence, NULL);



More information about the mesa-commit mailing list