summaryrefslogtreecommitdiff
path: root/src/amd
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-11-30 02:03:33 +0000
committerDave Airlie <airlied@redhat.com>2016-12-08 23:06:02 +0000
commit6f08dcd398f8c93d050c4781a1bf119a38f86f75 (patch)
tree0b611c8af83b8b8f0198ff40ee4bea3e6f19075c /src/amd
parent0689b8f4851dcaa447b4a71345557b224af8793a (diff)
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 <funfunctor@folklore1984.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_meta_copy.c34
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 4c01eb7acb..6333e5c083 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);
+}