diff options
author | Brian Paul <[email protected]> | 2006-11-03 23:32:30 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-11-03 23:32:30 +0000 |
commit | c9365b7ca4fe7ac7e7e56debe50b371c8ed721d6 (patch) | |
tree | b60917e670e4161c80a5bce21df1bcd081cd67eb /src/mesa | |
parent | 2fbaddfa695986ed04e4d648bb91632fd66f326b (diff) |
Fix _mesa_IsProgram() and _mesa_IsShader()
Diffstat (limited to 'src/mesa')
-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 8265ff40e30..a2416c28726 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; + } } |