Module: Mesa Branch: main Commit: 91514e7091879151cb9e258f9d5419864a1c3d57 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=91514e7091879151cb9e258f9d5419864a1c3d57
Author: Louis-Francis Ratté-Boulianne <[email protected]> Date: Thu Aug 31 12:18:46 2023 -0400 panfrost: Make panfrost_resource_create_with_modifier public It allows creating a resource when we already know which modifier we're gonna use. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012> --- src/gallium/drivers/panfrost/pan_resource.c | 2 +- src/gallium/drivers/panfrost/pan_resource.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index d653fe6ceb5..fd330a793dc 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -619,7 +619,7 @@ panfrost_resource_set_damage_region(struct pipe_screen *screen, } } -static struct pipe_resource * +struct pipe_resource * panfrost_resource_create_with_modifier(struct pipe_screen *screen, const struct pipe_resource *template, uint64_t modifier) diff --git a/src/gallium/drivers/panfrost/pan_resource.h b/src/gallium/drivers/panfrost/pan_resource.h index a8237221f96..37bb3ccddc7 100644 --- a/src/gallium/drivers/panfrost/pan_resource.h +++ b/src/gallium/drivers/panfrost/pan_resource.h @@ -172,6 +172,11 @@ panfrost_translate_texture_dimension(enum pipe_texture_target t) } } +struct pipe_resource * +panfrost_resource_create_with_modifier(struct pipe_screen *screen, + const struct pipe_resource *template, + uint64_t modifier); + void pan_resource_modifier_convert(struct panfrost_context *ctx, struct panfrost_resource *rsrc, uint64_t modifier, const char *reason);
