anv/meta: Set depth to 0 for buffer image in CopyBufferToImage()
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 27 Jan 2016 00:19:33 +0000 (16:19 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Jan 2016 23:12:42 +0000 (15:12 -0800)
The buffer image is a flat 2D surface. Each surface represents an
array/depth layer, therefore, the Z-offset is 0 when blitting.

src/vulkan/anv_meta.c

index 6680ef9c20df6ff980cf4773aaf4587fb75323d3..cbdb2fa188908b15c8e69975fc14c23cca116ca2 100644 (file)
@@ -1350,7 +1350,6 @@ void anv_CmdCopyBufferToImage(
             },
             cmd_buffer);
 
-         VkOffset3D src_offset = { 0, 0, slice };
          VkOffset3D dest_offset_el = meta_region_offset_el(dest_image,
                                                       &pRegions[r].imageOffset);
          dest_offset_el.z = 0;
@@ -1360,7 +1359,7 @@ void anv_CmdCopyBufferToImage(
          meta_emit_blit(cmd_buffer,
                         src_image,
                         &src_iview,
-                        src_offset,
+                        (VkOffset3D){0, 0, 0},
                         img_extent_el,
                         dest_image,
                         &dest_iview,