summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/atifragshader.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-01-20 04:02:02 +0000
committerBrian Paul <[email protected]>2005-01-20 04:02:02 +0000
commitea2943efd95c0760a5423236ed37655d863b8a5e (patch)
treee86344d411aadf9b698a79896ed78469f7129285 /src/mesa/shader/atifragshader.c
parent36da0459e4d0b12ab46f0e2090d107a22f68844a (diff)
Update glDeletePrograms/Buffers() so that the ID is freed immediately, like
texture objects.
Diffstat (limited to 'src/mesa/shader/atifragshader.c')
-rw-r--r--src/mesa/shader/atifragshader.c9
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
}
}