summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/vulkan/vulkan.h17
-rw-r--r--src/vulkan/anv_meta.c19
2 files changed, 26 insertions, 10 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h
index c7b7f47c3c3..cec176f3bf9 100644
--- a/include/vulkan/vulkan.h
+++ b/include/vulkan/vulkan.h
@@ -1949,18 +1949,25 @@ typedef struct {
} VkBufferCopy;
typedef struct {
- VkImageSubresource srcSubresource;
+ VkImageAspect aspect;
+ uint32_t mipLevel;
+ uint32_t arrayLayer;
+ uint32_t arraySize;
+} VkImageSubresourceCopy;
+
+typedef struct {
+ VkImageSubresourceCopy srcSubresource;
VkOffset3D srcOffset;
- VkImageSubresource destSubresource;
+ VkImageSubresourceCopy destSubresource;
VkOffset3D destOffset;
VkExtent3D extent;
} VkImageCopy;
typedef struct {
- VkImageSubresource srcSubresource;
+ VkImageSubresourceCopy srcSubresource;
VkOffset3D srcOffset;
VkExtent3D srcExtent;
- VkImageSubresource destSubresource;
+ VkImageSubresourceCopy destSubresource;
VkOffset3D destOffset;
VkExtent3D destExtent;
} VkImageBlit;
@@ -1969,7 +1976,7 @@ typedef struct {
VkDeviceSize bufferOffset;
uint32_t bufferRowLength;
uint32_t bufferImageHeight;
- VkImageSubresource imageSubresource;
+ VkImageSubresourceCopy imageSubresource;
VkOffset3D imageOffset;
VkExtent3D imageExtent;
} VkBufferImageCopy;
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
},
},