diff options
author | Dave Airlie <[email protected]> | 2016-11-30 02:03:33 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-12-08 23:06:02 +0000 |
commit | 6f08dcd398f8c93d050c4781a1bf119a38f86f75 (patch) | |
tree | 0b611c8af83b8b8f0198ff40ee4bea3e6f19075c /src/amd/vulkan/radv_meta_copy.c | |
parent | 0689b8f4851dcaa447b4a71345557b224af8793a (diff) |
radv/meta: split copyimage api into api and meta function
This make it easier to add multiple queues later.
Reviewed by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_copy.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_copy.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c index 4c01eb7acbb..6333e5c0830 100644 --- a/src/amd/vulkan/radv_meta_copy.c +++ b/src/amd/vulkan/radv_meta_copy.c @@ -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); +} |