projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92eb845
)
gltexture: Synchronize when downloading
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 30 Jan 2023 13:35:43 +0000
(08:35 -0500)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 27 Apr 2023 04:57:02 +0000
(06:57 +0200)
If the GL texture has a sync object, wait
on it before downloading the data.
gdk/gdkgltexture.c
patch
|
blob
|
history
diff --git
a/gdk/gdkgltexture.c
b/gdk/gdkgltexture.c
index 3b6c20a63789755be5096d2b4b6ed79ac772ee44..b409ae852d6d299434eabf08ba58d7490d1a54cd 100644
(file)
--- a/
gdk/gdkgltexture.c
+++ b/
gdk/gdkgltexture.c
@@
-100,6
+100,10
@@
gdk_gl_texture_invoke_callback (gpointer data)
context = gdk_display_get_gl_context (gdk_gl_context_get_display (invoke->self->context));
gdk_gl_context_make_current (context);
+
+ if (invoke->self->sync && context != invoke->self->context)
+ glWaitSync (invoke->self->sync, 0, GL_TIMEOUT_IGNORED);
+
glBindTexture (GL_TEXTURE_2D, invoke->self->id);
invoke->func (invoke->self, context, invoke->data);