diff options
author | Brian <[email protected]> | 2007-04-18 14:55:18 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-18 14:55:18 -0600 |
commit | bac15c8db87261ea168caa98d818bd6917ca14d6 (patch) | |
tree | 6b2361eacd136d0c92176b6f204ddbf8dd6d7277 /src/mesa/shader/shader_api.c | |
parent | f3e8c32376d8bdf1c48a0a2ad97eddcde7fc2f00 (diff) |
Remove bad assertions, decrement NumShaders in _mesa_detach_shader().
Fixes crashes w/ Brad King's depth peeling test.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 004c9c8ec3a..0c4f4837fbf 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -309,8 +309,6 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) * what we're expecting. */ if (sh && sh->Type == GL_SHADER_PROGRAM_MESA) { - assert(sh->Type == GL_VERTEX_SHADER || - sh->Type == GL_FRAGMENT_SHADER); return NULL; } return sh; @@ -576,6 +574,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) _mesa_free(shProg->Shaders); shProg->Shaders = newList; + shProg->NumShaders = n - 1; return; } } |