diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-30 17:38:27 -0700 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-09-03 13:55:29 +0200 |
commit | 5cdfccf8a6a0528b5112a7f12a4e1eb38a7363a4 (patch) | |
tree | 530d3bb87bbac3d414b7f9c084be4cae3fc33463 /src | |
parent | 42f0aae874da440a041ee09b20c93f0d8e836b37 (diff) |
panfrost: Remove panfrost_upload
This routine was made obsolete over a series of reworks of memory
allocation; Tomeu's changes to shader memory allocation finally made
this unused as cppcheck noted.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Tomeu Vizoso <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_allocate.c | 23 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_allocate.h | 3 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/gallium/drivers/panfrost/pan_allocate.c b/src/gallium/drivers/panfrost/pan_allocate.c index 57af5adede5..2efb01c7558 100644 --- a/src/gallium/drivers/panfrost/pan_allocate.c +++ b/src/gallium/drivers/panfrost/pan_allocate.c @@ -147,26 +147,3 @@ panfrost_upload_transient(struct panfrost_context *ctx, const void *data, size_t memcpy(transfer.cpu, data, sz); return transfer.gpu; } - -/* The code below is exclusively for the use of shader memory and is subject to - * be rewritten soon enough since it never frees the memory it allocates. Here - * be dragons, etc. */ - -mali_ptr -panfrost_upload(struct panfrost_memory *mem, const void *data, size_t sz) -{ - size_t aligned_sz = ALIGN_POT(sz, ALIGNMENT); - - /* Bounds check */ - if ((mem->stack_bottom + aligned_sz) >= mem->bo->size) { - printf("Out of memory, tried to upload %zu but only %zu available\n", - sz, mem->bo->size - mem->stack_bottom); - assert(0); - } - - memcpy((uint8_t *) mem->bo->cpu + mem->stack_bottom, data, sz); - mali_ptr gpu = mem->bo->gpu + mem->stack_bottom; - - mem->stack_bottom += aligned_sz; - return gpu; -} diff --git a/src/gallium/drivers/panfrost/pan_allocate.h b/src/gallium/drivers/panfrost/pan_allocate.h index 0e06567d206..cf9499154c8 100644 --- a/src/gallium/drivers/panfrost/pan_allocate.h +++ b/src/gallium/drivers/panfrost/pan_allocate.h @@ -69,9 +69,6 @@ struct panfrost_memory { int stack_bottom; }; -/* Functions for the actual Galliumish driver */ -mali_ptr panfrost_upload(struct panfrost_memory *mem, const void *data, size_t sz); - struct panfrost_transfer panfrost_allocate_transient(struct panfrost_context *ctx, size_t sz); |