mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
swrast: Reuse _swrast_free_texture_image_buffer from drivers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
0a484f1006
commit
e7ecc11311
2 changed files with 2 additions and 15 deletions
|
|
@ -121,13 +121,7 @@ intel_free_texture_image_buffer(struct gl_context * ctx,
|
|||
|
||||
intel_miptree_release(&intelImage->mt);
|
||||
|
||||
if (intelImage->base.Buffer) {
|
||||
_mesa_align_free(intelImage->base.Buffer);
|
||||
intelImage->base.Buffer = NULL;
|
||||
}
|
||||
|
||||
free(intelImage->base.ImageOffsets);
|
||||
intelImage->base.ImageOffsets = NULL;
|
||||
_swrast_free_texture_image_buffer(ctx, texImage);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -127,20 +127,13 @@ void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_imag
|
|||
|
||||
if (image->mt) {
|
||||
radeon_miptree_unreference(&image->mt);
|
||||
} else {
|
||||
_swrast_free_texture_image_buffer(ctx, timage);
|
||||
}
|
||||
if (image->bo) {
|
||||
radeon_bo_unref(image->bo);
|
||||
image->bo = NULL;
|
||||
}
|
||||
if (image->base.Buffer) {
|
||||
_mesa_align_free(image->base.Buffer);
|
||||
image->base.Buffer = NULL;
|
||||
}
|
||||
|
||||
free(image->base.ImageOffsets);
|
||||
image->base.ImageOffsets = NULL;
|
||||
_swrast_free_texture_image_buffer(ctx, timage);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue