From 6fed69cde2a96248ad3a5c20621c1e58c88f8d2f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 20 Jul 2020 17:23:55 -0400 Subject: [PATCH] panfrost: Introduce create_with_modifier helper As a stepping stone to full modifier support. Signed-off-by: Alyssa Rosenzweig Tested-by: Icecream95 Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 0897e7ca7e7..5dd6d36b9f2 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -472,8 +472,9 @@ panfrost_resource_set_damage_region(struct pipe_screen *screen, } static struct pipe_resource * -panfrost_resource_create(struct pipe_screen *screen, - const struct pipe_resource *template) +panfrost_resource_create_with_modifier(struct pipe_screen *screen, + const struct pipe_resource *template, + uint64_t modifier) { struct panfrost_device *dev = pan_device(screen); @@ -514,6 +515,16 @@ panfrost_resource_create(struct pipe_screen *screen, return (struct pipe_resource *)so; } +/* Default is to create a resource as don't care */ + +static struct pipe_resource * +panfrost_resource_create(struct pipe_screen *screen, + const struct pipe_resource *template) +{ + return panfrost_resource_create_with_modifier(screen, template, + DRM_FORMAT_MOD_INVALID); +} + static void panfrost_resource_destroy(struct pipe_screen *screen, struct pipe_resource *pt) -- 2.30.2