diff options
Diffstat (limited to 'src/mesa/shader/atifragshader.c')
-rw-r--r-- | src/mesa/shader/atifragshader.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index dbffa37f4f6..2a8cf9016a4 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -185,6 +185,7 @@ _mesa_DeleteFragmentShaderATI(GLuint id) _mesa_BindFragmentShaderATI(0); } } +#if 0 if (!prog->DeletePending) { prog->DeletePending = GL_TRUE; prog->RefCount--; @@ -193,6 +194,14 @@ _mesa_DeleteFragmentShaderATI(GLuint id) _mesa_HashRemove(ctx->Shared->Programs, id); ctx->Driver.DeleteProgram(ctx, prog); } +#else + /* The ID is immediately available for re-use now */ + _mesa_HashRemove(ctx->Shared->Programs, id); + prog->RefCount--; + if (prog->RefCount <= 0) { + ctx->Driver.DeleteProgram(ctx, prog); + } +#endif } } |