glframebuffer: Improve error tracing

glCheckFrameStatus() can fail by returning 0, and otherwise return a
status. Fix the trace to make it clear when we get an unkown status
compare to having an error, in which case we also trace the error code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7295>
This commit is contained in:
Nicolas Dufresne 2024-07-26 16:10:59 -04:00 committed by Backport Bot
parent 65f1c70430
commit 487e41b815

View file

@ -576,8 +576,14 @@ gst_gl_context_check_framebuffer_status (GstGLContext * context,
GST_WARNING_OBJECT (context, "GL_FRAMEBUFFER_UNDEFINED"); GST_WARNING_OBJECT (context, "GL_FRAMEBUFFER_UNDEFINED");
break; break;
#endif #endif
case 0:
ret = context->gl_vtable->GetError ();
GST_ERROR_OBJECT (context,
"Error calling glCheckFramebufferStatus(0x%X): %d (0x%X)",
fbo_target, ret, ret);
break;
default: default:
GST_WARNING_OBJECT (context, "Unknown FBO error: %d (0x%x)", ret, ret); GST_WARNING_OBJECT (context, "Unknown FBO status: %d (0x%X)", ret, ret);
break; break;
} }