RESOLVED FIXED 257599
[GStreamer] Do not activate and fill the gst GL context
https://bugs.webkit.org/show_bug.cgi?id=257599
Summary [GStreamer] Do not activate and fill the gst GL context
Carlos Garcia Campos
Reported 2023-06-01 02:47:59 PDT
We currently create the GstGLContext wrapping the sharing context and it's activated in the main thread. That means, among other things, that gst sends all gl operations on the context to the main thread. Another side effect is that the sharing context is made current in the main thread and remains forever.
Attachments
Miguel Gomez
Comment 1 2023-06-01 02:54:52 PDT
Isn't gstreamer creating a new glcontext in its own thread (one of the many that it uses) and sending its gl operations there? I would expect so.
Carlos Garcia Campos
Comment 2 2023-06-01 02:59:23 PDT
Carlos Garcia Campos
Comment 3 2023-06-01 03:00:49 PDT
(In reply to Miguel Gomez from comment #1) > Isn't gstreamer creating a new glcontext in its own thread (one of the many > that it uses) and sending its gl operations there? I would expect so. I don't think so, it does that when not creating a wrapping context.
Carlos Garcia Campos
Comment 4 2023-06-01 04:14:48 PDT
(In reply to Carlos Garcia Campos from comment #3) > (In reply to Miguel Gomez from comment #1) > > Isn't gstreamer creating a new glcontext in its own thread (one of the many > > that it uses) and sending its gl operations there? I would expect so. > > I don't think so, it does that when not creating a wrapping context. hmm, it's not created for the wrapped context, but another one is created apparently, so I was indeed wrong. I'll continue checking, the patch would still be needed, though to avoid using the sharing context.
Carlos Garcia Campos
Comment 5 2023-06-01 04:46:42 PDT
Ok, I see how it works now, our wrapped context is indeed only used as the sharing context of a gl context created by gst and used in a dedicated thread. I'm sorry for the noise, but this patch doesn't make sense as is. I'll close the PR for now.
Carlos Garcia Campos
Comment 6 2023-06-01 05:44:31 PDT
It's only used as a sharing context, so it doesn't need to be activated and filled. This ways we avoid making the sharing context the current one in the main thread forever.
Carlos Garcia Campos
Comment 7 2023-06-01 05:46:05 PDT
EWS
Comment 8 2023-06-02 01:50:42 PDT
Committed 264826@main (d4b48c265736): <https://commits.webkit.org/264826@main> Reviewed commits have been landed. Closing PR #14586 and removing active labels.
Radar WebKit Bug Importer
Comment 9 2023-06-02 01:51:17 PDT
Note You need to log in before you can comment on or make changes to this bug.