panfrost: Pass a device object to panfrost_new_texture()

We will need it to merge some of the Bifrost and Midgard logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>
This commit is contained in:
Boris Brezillon 2020-12-16 08:36:46 +01:00
parent 3c5fd5509f
commit 062dde4151
4 changed files with 4 additions and 1 deletions

View File

@ -1080,6 +1080,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
so->bo = panfrost_bo_create(device, size, 0);
panfrost_new_texture(
device,
so->bo->ptr.cpu,
texture->width0, texture->height0,
depth, array_size,

View File

@ -311,7 +311,7 @@ midgard_load_emit_texture(struct pan_pool *pool, struct MALI_DRAW *draw,
* itself is for a 2D texture with array size 1 even for 3D/array
* textures, removing the need to separately key the blit shaders for
* 2D and 3D variants */
panfrost_new_texture(texture.cpu,
panfrost_new_texture(pool->dev, texture.cpu,
image->width0, image->height0,
MAX2(image->nr_samples, 1), 1,
image->format, MALI_TEXTURE_DIMENSION_2D,

View File

@ -366,6 +366,7 @@ panfrost_emit_texture_payload_v7(mali_ptr *payload,
void
panfrost_new_texture(
const struct panfrost_device *dev,
void *out,
uint16_t width, uint16_t height,
uint16_t depth, uint16_t array_size,

View File

@ -102,6 +102,7 @@ panfrost_estimate_texture_payload_size(
void
panfrost_new_texture(
const struct panfrost_device *dev,
void *out,
uint16_t width, uint16_t height,
uint16_t depth, uint16_t array_size,