mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
render/gles2: log error on shader compilation failure
This commit is contained in:
parent
f83b3809cf
commit
bc416ed752
1 changed files with 2 additions and 0 deletions
|
@ -590,6 +590,7 @@ static GLuint compile_shader(struct wlr_gles2_renderer *renderer,
|
||||||
GLint ok;
|
GLint ok;
|
||||||
glGetShaderiv(shader, GL_COMPILE_STATUS, &ok);
|
glGetShaderiv(shader, GL_COMPILE_STATUS, &ok);
|
||||||
if (ok == GL_FALSE) {
|
if (ok == GL_FALSE) {
|
||||||
|
wlr_log(WLR_ERROR, "Failed to compile shader");
|
||||||
glDeleteShader(shader);
|
glDeleteShader(shader);
|
||||||
shader = 0;
|
shader = 0;
|
||||||
}
|
}
|
||||||
|
@ -626,6 +627,7 @@ static GLuint link_program(struct wlr_gles2_renderer *renderer,
|
||||||
GLint ok;
|
GLint ok;
|
||||||
glGetProgramiv(prog, GL_LINK_STATUS, &ok);
|
glGetProgramiv(prog, GL_LINK_STATUS, &ok);
|
||||||
if (ok == GL_FALSE) {
|
if (ok == GL_FALSE) {
|
||||||
|
wlr_log(WLR_ERROR, "Failed to link shader");
|
||||||
glDeleteProgram(prog);
|
glDeleteProgram(prog);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue