v3dv: rename and make compute_tile_size_for_framebuffer() public
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 7 Jan 2020 07:46:12 +0000 (08:46 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:26 +0000 (21:21 +0000)
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>

src/broadcom/vulkan/v3dv_device.c
src/broadcom/vulkan/v3dv_private.h

index b83ac70..26543a2 100644 (file)
@@ -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);
 
index d9aeac3..3ef1d14 100644 (file)
@@ -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;