summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_meta.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-17 14:24:50 -0700
committerJason Ekstrand <[email protected]>2015-09-17 18:21:05 -0700
commit595e6cacf1ca953dfa41e497255a4c3c21b0e14d (patch)
tree168cdbd6f6196b6d587205edd77acb1ba62d95d8 /src/vulkan/anv_meta.c
parentd616493953da7e349967a78c6fc671d35c1b788e (diff)
meta: Initial support for packing parameters
Probably incomplete but it should do for now
Diffstat (limited to 'src/vulkan/anv_meta.c')
-rw-r--r--src/vulkan/anv_meta.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c
index 4f70e573008..b850305913a 100644
--- a/src/vulkan/anv_meta.c
+++ b/src/vulkan/anv_meta.c
@@ -1219,10 +1219,12 @@ make_image_for_buffer(VkDevice vk_device, VkBuffer vk_buffer, VkFormat format,
{
ANV_FROM_HANDLE(anv_buffer, buffer, vk_buffer);
- if (copy->bufferRowLength != 0)
- anv_finishme("bufferRowLength not supported in CopyBufferToImage");
- if (copy->bufferImageHeight != 0)
- anv_finishme("bufferImageHeight not supported in CopyBufferToImage");
+ VkExtent3D extent = copy->imageExtent;
+ if (copy->bufferRowLength)
+ extent.width = copy->bufferRowLength;
+ if (copy->bufferImageHeight)
+ extent.height = copy->bufferImageHeight;
+ extent.depth = 1;
VkImage vk_image;
VkResult result = anv_CreateImage(vk_device,
@@ -1230,11 +1232,7 @@ make_image_for_buffer(VkDevice vk_device, VkBuffer vk_buffer, VkFormat format,
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
.imageType = VK_IMAGE_TYPE_2D,
.format = format,
- .extent = {
- .width = copy->imageExtent.width,
- .height = copy->imageExtent.height,
- .depth = 1,
- },
+ .extent = extent,
.mipLevels = 1,
.arraySize = 1,
.samples = 1,