summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 16:04:04 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 16:04:04 -0600
commitf8dce51083042b4d3fabf48524835290b6725682 (patch)
tree63815aa93b5446b455a980b3183543ce808a676c /src
parentb86cf714916d1bfdd6152839a8753cb3f3039cb2 (diff)
gallium: ref counting clean-ups
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 866683c23e..cc17bebc6b 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -151,7 +151,7 @@ st_DeleteTextureObject(GLcontext *ctx,
{
struct st_texture_object *stObj = st_texture_object(texObj);
if (stObj->pt)
- pipe_texture_release(&stObj->pt);
+ pipe_texture_reference(&stObj->pt, NULL);
_mesa_delete_texture_object(ctx, texObj);
}
@@ -165,7 +165,7 @@ st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
DBG("%s\n", __FUNCTION__);
if (stImage->pt) {
- pipe_texture_release(&stImage->pt);
+ pipe_texture_reference(&stImage->pt, NULL);
}
if (texImage->Data) {
@@ -544,7 +544,7 @@ st_TexImage(GLcontext * ctx,
* Release any old malloced memory.
*/
if (stImage->pt) {
- pipe_texture_release(&stImage->pt);
+ pipe_texture_reference(&stImage->pt, NULL);
assert(!texImage->Data);
}
else if (texImage->Data) {
@@ -564,7 +564,7 @@ st_TexImage(GLcontext * ctx,
stImage->face, stImage->level)))) {
DBG("release it\n");
- pipe_texture_release(&stObj->pt);
+ pipe_texture_reference(&stObj->pt, NULL);
assert(!stObj->pt);
stObj->teximage_realloc = FALSE;
}
@@ -1396,7 +1396,7 @@ copy_image_data_to_texture(struct st_context *st,
stImage->face
);
- pipe_texture_release(&stImage->pt);
+ pipe_texture_reference(&stImage->pt, NULL);
}
else if (stImage->base.Data) {
assert(stImage->base.Data != NULL);
@@ -1457,9 +1457,6 @@ st_finalize_texture(GLcontext *ctx,
firstImage->pt != stObj->pt &&
firstImage->pt->last_level >= stObj->lastLevel) {
- if (stObj->pt)
- pipe_texture_release(&stObj->pt);
-
pipe_texture_reference(&stObj->pt, firstImage->pt);
}