asahi: Simplify can_tile type signature
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 24 Jul 2021 17:06:11 +0000 (13:06 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 24 Jul 2021 17:56:04 +0000 (13:56 -0400)
dev parameter inherited from panfrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053>

src/gallium/drivers/asahi/agx_pipe.c

index 8c5aca8..bae513b 100644 (file)
@@ -138,8 +138,7 @@ agx_is_2d(const struct agx_resource *pres)
 }
 
 static bool
-agx_should_tile(struct agx_device *dev,
-                const struct agx_resource *pres)
+agx_should_tile(const struct agx_resource *pres)
 {
    const unsigned valid_binding =
       PIPE_BIND_DEPTH_STENCIL |
@@ -173,10 +172,8 @@ agx_resource_create(struct pipe_screen *screen,
    nresource->base = *templ;
    nresource->base.screen = screen;
 
-   nresource->modifier =
-      agx_should_tile(dev, nresource) ?
-      DRM_FORMAT_MOD_APPLE_64X64_MORTON_ORDER :
-      DRM_FORMAT_MOD_LINEAR;
+   nresource->modifier = agx_should_tile(nresource) ?
+      DRM_FORMAT_MOD_APPLE_64X64_MORTON_ORDER : DRM_FORMAT_MOD_LINEAR;
 
    unsigned offset = 0;