From d0a7c8f4a8cd375a9448f50d777e2cc9ee95a8d1 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Tue, 4 Feb 2020 17:38:42 -0800 Subject: [PATCH] freedreno/a6xx: Add fd6_resource_screen_init() We'll move a few things here in the next commits. Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 10 +++++++++- src/gallium/drivers/freedreno/a6xx/fd6_resource.h | 2 +- src/gallium/drivers/freedreno/a6xx/fd6_screen.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c index 2e86632892a..c4e129a3785 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c @@ -136,7 +136,7 @@ setup_lrz(struct fd_resource *rsc) rsc->lrz = fd_bo_new(screen->dev, size, flags, "lrz"); } -uint32_t +static uint32_t fd6_setup_slices(struct fd_resource *rsc) { struct pipe_resource *prsc = &rsc->base; @@ -154,3 +154,11 @@ fd6_setup_slices(struct fd_resource *rsc) return rsc->layout.size; } + +void +fd6_resource_screen_init(struct pipe_screen *pscreen) +{ + struct fd_screen *screen = fd_screen(pscreen); + + screen->setup_slices = fd6_setup_slices; +} diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.h b/src/gallium/drivers/freedreno/a6xx/fd6_resource.h index b988f1c78b6..6eec087e10f 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.h @@ -32,8 +32,8 @@ void fd6_validate_format(struct fd_context *ctx, struct fd_resource *rsc, enum pipe_format format); -uint32_t fd6_setup_slices(struct fd_resource *rsc); void fd6_emit_flag_reference(struct fd_ringbuffer *ring, struct fd_resource *rsc, int level, int layer); +void fd6_resource_screen_init(struct pipe_screen *pscreen); #endif /* FD6_RESOURCE_H_ */ diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c index 6e04df65119..32d06ed13a4 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c @@ -136,7 +136,6 @@ fd6_screen_init(struct pipe_screen *pscreen) pscreen->context_create = fd6_context_create; pscreen->is_format_supported = fd6_screen_is_format_supported; - screen->setup_slices = fd6_setup_slices; screen->tile_mode = fd6_tile_mode; static const uint64_t supported_modifiers[] = { @@ -147,5 +146,6 @@ fd6_screen_init(struct pipe_screen *pscreen) screen->supported_modifiers = supported_modifiers; screen->num_supported_modifiers = ARRAY_SIZE(supported_modifiers); + fd6_resource_screen_init(pscreen); fd6_emit_init_screen(pscreen); } -- 2.30.2