diff options
author | Marek Olšák <marek.olsak@amd.com> | 2021-06-12 12:31:28 -0400 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-06-17 02:24:22 +0000 |
commit | 3da170faaec2a57d76e668ab56781621c23c6703 (patch) | |
tree | db5fc78ae3199cc49ae59387ea933f8cd630eb7e /src/mesa | |
parent | 0510a947ba287f8b416601fcbc64512164b2918e (diff) |
glthread: change when glFlush flushes asynchronously
This fixes the flushing with external textures.
We don't know if we need to flush synchronously with multiple contexts,
so I removed that.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11341>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_eglimage.c | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ee1c19df9a2..e7474ad0262 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3474,6 +3474,14 @@ 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 0c487d01021..9bd53148aa7 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -192,6 +192,7 @@ st_get_egl_image(struct gl_context *ctx, GLeglImageOES image_handle, return false; } + ctx->Shared->HasExternallySharedImages = true; return true; } |