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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-01-07 08:46:12 +01:00 committed by Marge Bot
parent 00cefce3ca
commit 94b4e1869c
2 changed files with 5 additions and 3 deletions

View 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);

View 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;