diff options
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/shaderobjects.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 8265ff40e3..a2416c2872 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1097,16 +1097,28 @@ GLboolean GLAPIENTRY _mesa_IsProgram(GLuint program) { GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, program, "glIsProgram"); - return gen ? GL_TRUE : GL_FALSE; + GET_PROGRAM(pro, program, "glIsProgram"); + if (pro) { + RELEASE_PROGRAM(pro); + return GL_TRUE; + } + else { + return GL_FALSE; + } } GLboolean GLAPIENTRY _mesa_IsShader(GLuint shader) { GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, shader, "glIsProgram"); - return gen ? GL_TRUE : GL_FALSE; + GET_SHADER(sh, shader, "glIsProgram"); + if (sh) { + RELEASE_SHADER(sh); + return GL_TRUE; + } + else { + return GL_FALSE; + } } |