summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_meta.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-06 10:04:04 -0700
committerJason Ekstrand <[email protected]>2015-10-06 10:04:04 -0700
commit81c7fa877274b5767657497699f1d46981784fc9 (patch)
tree00ba09a77bb7f1484170380ed9c3959b9e6213ac /src/vulkan/anv_meta.c
parentba2254aa79af76cabad921538b70c0bd1943c4c0 (diff)
vk/0.170.2: Rework blits to use ImageSubresourceCopy
Diffstat (limited to 'src/vulkan/anv_meta.c')
-rw-r--r--src/vulkan/anv_meta.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c
index 4e6ddf49f76..ad65403b100 100644
--- a/src/vulkan/anv_meta.c
+++ b/src/vulkan/anv_meta.c
@@ -502,13 +502,13 @@ meta_blit_get_src_image_view_type(const struct anv_image *src_image)
static uint32_t
meta_blit_get_dest_view_base_array_slice(const struct anv_image *dest_image,
- const VkImageSubresource *dest_subresource,
+ const VkImageSubresourceCopy *dest_subresource,
const VkOffset3D *dest_offset)
{
switch (dest_image->type) {
case VK_IMAGE_TYPE_1D:
case VK_IMAGE_TYPE_2D:
- return dest_subresource->arraySlice;
+ return dest_subresource->arrayLayer;
case VK_IMAGE_TYPE_3D:
/* HACK: Vulkan does not allow attaching a 3D image to a framebuffer,
* but meta does it anyway. When doing so, we translate the
@@ -1163,7 +1163,7 @@ void anv_CmdCopyImage(
.aspectMask = 1 << pRegions[r].srcSubresource.aspect,
.baseMipLevel = pRegions[r].srcSubresource.mipLevel,
.mipLevels = 1,
- .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
+ .baseArraySlice = pRegions[r].srcSubresource.arrayLayer,
.arraySize = 1
},
},
@@ -1180,6 +1180,9 @@ void anv_CmdCopyImage(
&pRegions[r].destSubresource,
&pRegions[r].destOffset);
+ if (pRegions[r].srcSubresource.arraySize > 1)
+ anv_finishme("FINISHME: copy multiple array layers");
+
if (pRegions[r].extent.depth > 1)
anv_finishme("FINISHME: copy multiple depth layers");
@@ -1249,7 +1252,7 @@ void anv_CmdBlitImage(
.aspectMask = 1 << pRegions[r].srcSubresource.aspect,
.baseMipLevel = pRegions[r].srcSubresource.mipLevel,
.mipLevels = 1,
- .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
+ .baseArraySlice = pRegions[r].srcSubresource.arrayLayer,
.arraySize = 1
},
},
@@ -1266,6 +1269,9 @@ void anv_CmdBlitImage(
&pRegions[r].destSubresource,
&pRegions[r].destOffset);
+ if (pRegions[r].srcSubresource.arraySize > 1)
+ anv_finishme("FINISHME: copy multiple array layers");
+
if (pRegions[r].destExtent.depth > 1)
anv_finishme("FINISHME: copy multiple depth layers");
@@ -1446,6 +1452,9 @@ void anv_CmdCopyImageToBuffer(
meta_prepare_blit(cmd_buffer, &saved_state);
for (unsigned r = 0; r < regionCount; r++) {
+ if (pRegions[r].imageSubresource.arraySize > 1)
+ anv_finishme("FINISHME: copy multiple array layers");
+
if (pRegions[r].imageExtent.depth > 1)
anv_finishme("FINISHME: copy multiple depth layers");
@@ -1466,7 +1475,7 @@ void anv_CmdCopyImageToBuffer(
.aspectMask = 1 << pRegions[r].imageSubresource.aspect,
.baseMipLevel = pRegions[r].imageSubresource.mipLevel,
.mipLevels = 1,
- .baseArraySlice = pRegions[r].imageSubresource.arraySlice,
+ .baseArraySlice = pRegions[r].imageSubresource.arrayLayer,
.arraySize = 1
},
},