gallium: ref counting clean-ups
This commit is contained in:
parent
b86cf71491
commit
f8dce51083
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue