After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726494 - use wglCreateContextAttribsARB to create share context
use wglCreateContextAttribsARB to create share context
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
git master
Other Windows
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-17 08:30 UTC by comicfans44
Modified: 2014-03-20 04:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
misc patch to improve windows share context create (3.40 KB, patch)
2014-03-17 08:30 UTC, comicfans44
needs-work Details | Review
improved patch with wglShareLists fallback (3.22 KB, patch)
2014-03-18 01:26 UTC, comicfans44
committed Details | Review

Description comicfans44 2014-03-17 08:30:23 UTC
Created attachment 272121 [details] [review]
misc patch to improve windows share context create

currently gst-plugins-gl use wglShareLists to create share context ,as I tested
(win7 32bit + AMD GPU), it can not share context correctly (qglwtextureshare) ,and  GstGLContextWGL code path did not support wrapped context. so I created this misc patch to improve this.

I use wglCreateContextAttribsARB to create context, as this link mentioned
(https://www.opengl.org/wiki/Platform_specifics:_Windows#wglShareLists)

I haven't other os (such as XP ) nor GPU to test , it may break in some condition.
hopes others help testing and improving this.
Comment 1 Matthew Waters (ystreet00) 2014-03-17 10:34:08 UTC
Review of attachment 272121 [details] [review]:

Otherwise, looks good.

::: gst-libs/gst/gl/win32/gstglcontext_wgl.c
@@ +133,3 @@
+
+    if (wglCreateContextAttribsARB == NULL) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR,

It would be better to fallback to wglShareLists rather than failing/
Comment 2 Matthew Waters (ystreet00) 2014-03-17 10:34:09 UTC
Review of attachment 272121 [details] [review]:

Otherwise, looks good.

::: gst-libs/gst/gl/win32/gstglcontext_wgl.c
@@ +133,3 @@
+
+    if (wglCreateContextAttribsARB == NULL) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR,

It would be better to fallback to wglShareLists rather than failing/
Comment 3 Matthew Waters (ystreet00) 2014-03-17 10:34:10 UTC
Review of attachment 272121 [details] [review]:

Otherwise, looks good.

::: gst-libs/gst/gl/win32/gstglcontext_wgl.c
@@ +133,3 @@
+
+    if (wglCreateContextAttribsARB == NULL) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR,

It would be better to fallback to wglShareLists rather than failing/
Comment 4 comicfans44 2014-03-18 01:26:49 UTC
Created attachment 272220 [details] [review]
improved patch with wglShareLists fallback
Comment 5 comicfans44 2014-03-18 01:27:54 UTC
(In reply to comment #3)
> Review of attachment 272121 [details] [review]:
> 
> Otherwise, looks good.
> 
> ::: gst-libs/gst/gl/win32/gstglcontext_wgl.c
> @@ +133,3 @@
> +
> +    if (wglCreateContextAttribsARB == NULL) {
> +      g_set_error (error, GST_GL_CONTEXT_ERROR,
> 
> It would be better to fallback to wglShareLists rather than failing/

That's better than failing . I create a improved one, Thanks for reviewing.