[gtk/wip/chergert/glproto: 589/920] detach shader before deleting
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 589/920] detach shader before deleting
- Date: Mon, 8 Feb 2021 19:15:31 +0000 (UTC)
commit b713c7cbcd80f1e9d897e81ae2cc865307a796a1
Author: Christian Hergert <chergert redhat com>
Date: Mon Dec 28 20:07:12 2020 -0800
detach shader before deleting
gsk/next/gskglcompiler.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskglcompiler.c b/gsk/next/gskglcompiler.c
index d5df9bc3b4..450a57b6c7 100644
--- a/gsk/next/gskglcompiler.c
+++ b/gsk/next/gskglcompiler.c
@@ -622,10 +622,13 @@ gsk_gl_compiler_compile (GskGLCompiler *self,
glBindAttribLocation (program_id, GPOINTER_TO_UINT (value), key);
glLinkProgram (program_id);
- glDeleteShader (fragment_id);
+ glGetProgramiv (program_id, GL_LINK_STATUS, &status);
+
+ glDetachShader (program_id, vertex_id);
glDeleteShader (vertex_id);
- glGetProgramiv (program_id, GL_LINK_STATUS, &status);
+ glDetachShader (program_id, fragment_id);
+ glDeleteShader (fragment_id);
if (status == GL_FALSE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]