mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
dri: Flush the context after flush_resource when creating shareable image
This makes sure that we'll be done with any pending preparations before the actual export of the resource. Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
This commit is contained in:
parent
27d35588f5
commit
a330ecc48a
1 changed files with 6 additions and 2 deletions
|
|
@ -346,8 +346,10 @@ dri2_create_image_from_renderbuffer2(__DRIcontext *context,
|
|||
* it's in a shareable state. Do this now while we still have the access to
|
||||
* the context.
|
||||
*/
|
||||
if (dri2_get_mapping_by_format(img->dri_format))
|
||||
if (dri2_get_mapping_by_format(img->dri_format)) {
|
||||
p_ctx->flush_resource(p_ctx, tex);
|
||||
st_context_flush(st, 0, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
ctx->Shared->HasExternallySharedImages = true;
|
||||
*error = __DRI_IMAGE_ERROR_SUCCESS;
|
||||
|
|
@ -455,8 +457,10 @@ dri2_create_from_texture(__DRIcontext *context, int target, unsigned texture,
|
|||
* it's in a shareable state. Do this now while we still have the access to
|
||||
* the context.
|
||||
*/
|
||||
if (dri2_get_mapping_by_format(img->dri_format))
|
||||
if (dri2_get_mapping_by_format(img->dri_format)) {
|
||||
p_ctx->flush_resource(p_ctx, glimg->pt);
|
||||
st_context_flush(st, 0, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
ctx->Shared->HasExternallySharedImages = true;
|
||||
*error = __DRI_IMAGE_ERROR_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue