mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
panfrost: Free imported BOs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
b5a01296f4
commit
4a4ed53c01
3 changed files with 12 additions and 0 deletions
|
|
@ -312,6 +312,10 @@ panfrost_destroy_bo(struct panfrost_screen *screen, struct panfrost_bo *pbo)
|
|||
/* TODO */
|
||||
printf("--leaking checksum (%zd bytes)--\n", bo->checksum_slab.size);
|
||||
}
|
||||
|
||||
if (bo->imported) {
|
||||
screen->driver->free_imported_bo(screen, bo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ struct panfrost_bo {
|
|||
/* Memory entry corresponding to gpu above */
|
||||
struct panfrost_memory_entry *entry[MAX_MIP_LEVELS];
|
||||
|
||||
/* Set if this bo was imported rather than allocated */
|
||||
bool imported;
|
||||
|
||||
/* Number of bytes of the imported allocation */
|
||||
size_t imported_size;
|
||||
|
||||
/* Set for tiled, clear for linear. */
|
||||
bool tiled;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ struct panfrost_driver {
|
|||
int extent);
|
||||
void (*free_slab) (struct panfrost_screen *screen,
|
||||
struct panfrost_memory *mem);
|
||||
void (*free_imported_bo) (struct panfrost_screen *screen,
|
||||
struct panfrost_bo *bo);
|
||||
void (*enable_counters) (struct panfrost_screen *screen);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue