From 94b4e1869cd58c8a16bf73534e9237fb70bd96bd Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 7 Jan 2020 08:46:12 +0100 Subject: [PATCH] v3dv: rename and make compute_tile_size_for_framebuffer() public We will use this when we implement copying images to buffers using the TLB, where we'll need to setup a framebuffer and tiling configuration for the TLB store to the destination buffer. Part-of: --- src/broadcom/vulkan/v3dv_device.c | 6 +++--- src/broadcom/vulkan/v3dv_private.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index b83ac70..26543a2 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -1315,8 +1315,8 @@ compute_internal_bpp_from_attachments(struct v3dv_framebuffer *framebuffer) framebuffer->internal_bpp = max_bpp; } -static void -compute_tile_size_for_framebuffer(struct v3dv_framebuffer *framebuffer) +void +v3dv_framebuffer_compute_tiling_params(struct v3dv_framebuffer *framebuffer) { static const uint8_t tile_sizes[] = { 64, 64, @@ -1395,7 +1395,7 @@ v3dv_CreateFramebuffer(VkDevice _device, } compute_internal_bpp_from_attachments(framebuffer); - compute_tile_size_for_framebuffer(framebuffer); + v3dv_framebuffer_compute_tiling_params(framebuffer); *pFramebuffer = v3dv_framebuffer_to_handle(framebuffer); diff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h index d9aeac3..3ef1d14 100644 --- a/src/broadcom/vulkan/v3dv_private.h +++ b/src/broadcom/vulkan/v3dv_private.h @@ -368,6 +368,8 @@ struct v3dv_framebuffer { struct v3dv_image_view *attachments[0]; }; +void v3dv_framebuffer_compute_tiling_params(struct v3dv_framebuffer *framebuffer); + struct v3dv_cmd_pool { VkAllocationCallbacks alloc; struct list_head cmd_buffers; -- 2.7.4