summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-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 866683c23e9..cc17bebc6b6 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);
}