summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2021-06-09 13:29:50 -0700
committerMarge Bot <eric+marge@anholt.net>2021-06-09 22:18:35 +0000
commit5066839ffdbeac5b8d24f83e7c55cb20545cd48b (patch)
tree59d4ad11e57eade9097f747b1c15087092623428 /src/mesa
parent3c5b7dca30edc7365839944447476e0b8b56bf1f (diff)
Revert "st/mesa: execute glFlush asynchronously if no image has been imported/exported"
A number of the piglit glx tests use multiple contexts on a single thread, and previously the flush in MakeCurrent() was enforcing the ordering between draws on those different contexts. When that flush made ASYNC, now there is nothing ordering the draws because we have two (or more) driver threads for a single frontend thread which is using nothing more than glxMakeCurrent() to enforce the ordering. This reverts commit 057a702a3f6a78a8bcd347a74e5a79d70dfc4153. Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4903 Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11278>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h8
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c1
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c2
3 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e7474ad0262..ee1c19df9a2 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3474,14 +3474,6 @@ struct gl_shared_state
* frequency changes.
*/
bool DisjointOperation;
-
- /**
- * Whether at least one image has been imported or exported, excluding
- * the default framebuffer. If this is false, glFlush can be executed
- * asynchronously because there is no invisible dependency on external
- * users.
- */
- bool HasExternallySharedImages;
};
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 9bd53148aa7..0c487d01021 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -192,7 +192,6 @@ st_get_egl_image(struct gl_context *ctx, GLeglImageOES image_handle,
return false;
}
- ctx->Shared->HasExternallySharedImages = true;
return true;
}
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index ee72c331cdd..bec1c2f177b 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -98,7 +98,7 @@ st_glFlush(struct gl_context *ctx)
* synchronization issues. Calling finish() here will just hide
* problems that need to be fixed elsewhere.
*/
- st_flush(st, NULL, ctx->Shared->HasExternallySharedImages ? 0 : PIPE_FLUSH_ASYNC);
+ st_flush(st, NULL, 0);
st_manager_flush_frontbuffer(st);
}