[Mesa-dev] [PATCH] anv/blorp: Handle zero width/height copying in copy_buffer_to_image

Anuj Phogat anuj.phogat at gmail.com
Wed Sep 21 18:17:08 UTC 2016


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/intel/vulkan/anv_blorp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index cb61070..de33dce 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -273,6 +273,10 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer,
 
       VkExtent3D extent =
          anv_sanitize_image_extent(anv_image->type, pRegions[r].imageExtent);
+
+      if (extent.width == 0 || extent.height == 0)
+         return;
+
       if (anv_image->type != VK_IMAGE_TYPE_3D) {
          image.offset.z = pRegions[r].imageSubresource.baseArrayLayer;
          extent.depth = pRegions[r].imageSubresource.layerCount;
-- 
2.5.5



More information about the mesa-dev mailing list