gst_gl_context_fill_info glGetString error: 0x502

Matthew Waters ystreet00 at gmail.com
Fri Sep 24 04:50:11 UTC 2021


0x0502 is GL_INVALID_OPERATION which is interesting.

Are you sure you your wrapped GL context is actually active? 
(gst_gl_context_activate() does not change anything about wrapped GL 
contexts, it only signals to GStreamer that some other code has 
activated the OpenGL context).  gst_gl_context_get_current_context 
(GST_GL_PLATFORM_EGL) must equal state->context.

Second thing, you must not add a wrapped OpenGL context to the display 
with gst_gl_display_add_context().  That will cause weird failures.

Cheers
-Matt

On 24/9/21 3:36 am, Lusine Hayrapetyan via gstreamer-devel wrote:
> Hi Folks,
>
> I'm getting the following error from gst_gl_context_fill_info function:
> / " glGetString error: 0x502"/
> /
> /
> This is my code:
>  state->x_gst_display = 
> gst_gl_display_x11_new_with_display(state->xdisplay);
>  gst_gl_display_filter_gl_api(GST_GL_DISPLAY(state->x_gst_display), 
> GST_GL_API_GLES2);
>
>  state->gl_context =
> gst_gl_context_new_wrapped(GST_GL_DISPLAY(state->x_gst_display),
>         (guintptr)state->context, GST_GL_PLATFORM_EGL, GST_GL_API_GLES2);
>
>     if ( 
> !gst_gl_display_add_context(GST_GL_DISPLAY(state->x_gst_display), 
> state->gl_context))
>         g_print("Failed to add gl_context to display\n");
>
>     if (!gst_gl_context_activate(state->gl_context, TRUE))
>         g_print("gst_gl_context_activate failed!");
>
>     if (!gst_gl_context_fill_info(state->gl_context, &error)) // This 
> line produces the error
>     {
>         g_printerr ("Error received from gst_gl_context_fill_info 
> %s\n", error->message);
>         return -1;
>     }/
> /
>
> Here is the output of gl*:7
>
> 0:00:01.485389528 687728 0x55a54a1e5380 TRACE              gldisplay 
> gstgldisplay.c:206:gst_gl_display_init: init 0x55a54abb3090
> 0:00:01.486088690 687728 0x55a54a1e5380 TRACE  gldisplay 
> gstgldisplay.c:206:gst_gl_display_init: init 0x55a54abf8100
> 0:00:01.486204108 687728 0x55a54a1e5380 TRACE  gldisplay 
> gstgldisplay.c:508:gst_gl_display_filter_gl_api:<gldisplayx11-0> 
> filtering with api gles2
> 0:00:01.486301157 687728 0x55a54a1e5380 DEBUG  gldisplay 
> gstgldisplay.c:956:gst_gl_display_add_context:<gldisplayx11-0> Adding 
> GL context <glwrappedcontext0>
> 0:00:01.486334198 687728 0x55a54a1e5380 DEBUG  gldisplay 
> gstgldisplay.c:963:gst_gl_display_add_context:<gldisplayx11-0> 
> successfully inserted context <glwrappedcontext0>
> 0:00:01.486354854 687728 0x55a54a1e5380 DEBUG  glcontext 
> gstglcontext.c:783:gst_gl_context_activate:<glwrappedcontext0> activate:1
> 0:00:01.486572233 687728 0x55a54a1e5380 INFO glcontext 
> gstglcontext.c:1121:_create_context_info:<glwrappedcontext0> 
> GL_VERSION: OpenGL ES 3.2 Mesa 21.0.1
> 0:00:01.486603926 687728 0x55a54a1e5380 INFO glcontext 
> gstglcontext.c:1123:_create_context_info:<glwrappedcontext0> 
> GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.20
> 0:00:01.486635954 687728 0x55a54a1e5380 INFO glcontext 
> gstglcontext.c:1126:_create_context_info:<glwrappedcontext0> 
> GL_VENDOR: Mesa/X.org
> 0:00:01.486668872 687728 0x55a54a1e5380 INFO glcontext 
> gstglcontext.c:1128:_create_context_info:<glwrappedcontext0> 
> GL_RENDERER: llvmpipe (LLVM 11.0.1, 256 bits)
> Error received from gst_gl_context_fill_info glGetString error: 0x502
>
> Regards,
> Lusine

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210924/41047aa2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210924/41047aa2/attachment.sig>


More information about the gstreamer-devel mailing list