panfrost: Pass a device object to panfrost_new_texture()
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 16 Dec 2020 07:36:46 +0000 (08:36 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 4 Jan 2021 16:05:42 +0000 (17:05 +0100)
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>

src/gallium/drivers/panfrost/pan_context.c
src/panfrost/lib/pan_blit.c
src/panfrost/lib/pan_texture.c
src/panfrost/lib/pan_texture.h

index ed4a91e..ea81dfb 100644 (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,
index df4b4bc..299c60c 100644 (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,
index 05c9c48..0d18bd7 100644 (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,
index d2343f3..f9cd15d 100644 (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,