mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
eglglessink: Add log reporting at shader compilation failure
This commit is contained in:
parent
b4887425cc
commit
28aadcad4e
1 changed files with 11 additions and 0 deletions
|
@ -1166,6 +1166,7 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||
GLint test;
|
||||
GLuint verthandle, fraghandle, prog;
|
||||
GLboolean ret;
|
||||
GLchar *info_log;
|
||||
|
||||
GST_DEBUG_OBJECT (eglglessink, "Enter EGL surface setup");
|
||||
|
||||
|
@ -1221,6 +1222,11 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||
GST_DEBUG_OBJECT (eglglessink, "Successfully compiled vertex shader");
|
||||
else {
|
||||
GST_ERROR_OBJECT (eglglessink, "Couldn't compile vertex shader");
|
||||
glGetShaderiv (verthandle, GL_INFO_LOG_LENGTH, &test);
|
||||
info_log = g_new0 (GLchar, test);
|
||||
glGetShaderInfoLog (verthandle, test, NULL, info_log);
|
||||
GST_INFO_OBJECT (eglglessink, "Compilation info log:\n%s", info_log);
|
||||
g_free (info_log);
|
||||
goto HANDLE_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1238,6 +1244,11 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||
GST_DEBUG_OBJECT (eglglessink, "Successfully compiled fragment shader");
|
||||
else {
|
||||
GST_ERROR_OBJECT (eglglessink, "Couldn't compile fragment shader");
|
||||
glGetShaderiv (fraghandle, GL_INFO_LOG_LENGTH, &test);
|
||||
info_log = g_new0 (GLchar, test);
|
||||
glGetShaderInfoLog (fraghandle, test, NULL, info_log);
|
||||
GST_INFO_OBJECT (eglglessink, "Compilation info log:\n%s", info_log);
|
||||
g_free (info_log);
|
||||
goto HANDLE_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue