Commit 6f08dcd3 authored by Dave Airlie's avatar Dave Airlie
Browse files

radv/meta: split copyimage api into api and meta function



This make it easier to add multiple queues later.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan's avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0689b8f4
......@@ -306,18 +306,13 @@ void radv_CmdCopyImageToBuffer(
regionCount, pRegions);
}
void radv_CmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
VkImageLayout destImageLayout,
uint32_t regionCount,
const VkImageCopy* pRegions)
static void
meta_copy_image(struct radv_cmd_buffer *cmd_buffer,
struct radv_image *src_image,
struct radv_image *dest_image,
uint32_t regionCount,
const VkImageCopy *pRegions)
{
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
RADV_FROM_HANDLE(radv_image, src_image, srcImage);
RADV_FROM_HANDLE(radv_image, dest_image, destImage);
struct radv_meta_saved_state saved_state;
/* From the Vulkan 1.0 spec:
......@@ -397,3 +392,20 @@ void radv_CmdCopyImage(
radv_meta_restore(&saved_state, cmd_buffer);
}
void radv_CmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
VkImageLayout destImageLayout,
uint32_t regionCount,
const VkImageCopy* pRegions)
{
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
RADV_FROM_HANDLE(radv_image, src_image, srcImage);
RADV_FROM_HANDLE(radv_image, dest_image, destImage);
meta_copy_image(cmd_buffer, src_image, dest_image,
regionCount, pRegions);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment