<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 27, 2017 at 8:10 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looks good to me :<br>
<br>
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
On 27/03/17 15:44, Jason Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cc: "13.0 17.0" <<a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop<wbr>.org</a>><br>
---<br>
  src/intel/vulkan/anv_blorp.c | 20 ++++++++++++--------<br>
  1 file changed, 12 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
index 9b3910f..0689142 100644<br>
--- a/src/intel/vulkan/anv_blorp.c<br>
+++ b/src/intel/vulkan/anv_blorp.c<br>
@@ -232,7 +232,8 @@ void anv_CmdCopyImage(<br>
           layer_count = pRegions[r].extent.depth;<br>
        } else {<br>
           dst_base_layer = pRegions[r].dstSubresource.bas<wbr>eArrayLayer;<br>
-         layer_count = pRegions[r].dstSubresource.lay<wbr>erCount;<br>
+         layer_count =<br>
+            anv_get_layerCount(dst_image, &pRegions[r].dstSubresource);<br>
        }<br>
          unsigned src_base_layer;<br>
@@ -240,7 +241,8 @@ void anv_CmdCopyImage(<br>
           src_base_layer = pRegions[r].srcOffset.z;<br>
        } else {<br>
           src_base_layer = pRegions[r].srcSubresource.bas<wbr>eArrayLayer;<br>
-         assert(pRegions[r].srcSubreso<wbr>urce.layerCount == layer_count);<br>
+         assert(layer_count ==<br>
+                anv_get_layerCount(src_image, &pRegions[r].srcSubresource));<br>
        }<br>
          assert(pRegions[r].srcSubresou<wbr>rce.aspectMask ==<br>
@@ -312,7 +314,8 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer,<br>
           anv_sanitize_image_extent(<wbr>anv_image->type, pRegions[r].imageExtent);<br>
        if (anv_image->type != VK_IMAGE_TYPE_3D) {<br>
           image.offset.z = pRegions[r].imageSubresource.b<wbr>aseArrayLayer;<br>
-         extent.depth = pRegions[r].imageSubresource.l<wbr>ayerCount;<br>
+         extent.depth =<br>
+            anv_get_layerCount(anv_image, &pRegions[r].imageSubresource)<wbr>;<br>
        }<br>
          const enum isl_format buffer_format =<br>
@@ -466,7 +469,7 @@ void anv_CmdBlitImage(<br>
           dst_end = pRegions[r].dstOffsets[1].z;<br>
        } else {<br>
           dst_start = dst_res->baseArrayLayer;<br>
-         dst_end = dst_start + dst_res->layerCount;<br>
+         dst_end = dst_start + anv_get_layerCount(dst_image, dst_res);<br>
        }<br>
          unsigned src_start, src_end;<br>
@@ -476,7 +479,7 @@ void anv_CmdBlitImage(<br>
           src_end = pRegions[r].srcOffsets[1].z;<br>
        } else {<br>
           src_start = src_res->baseArrayLayer;<br>
-         src_end = src_start + src_res->layerCount;<br>
+         src_end = src_start + anv_get_layerCount(src_image, src_res);<br>
        }<br>
          bool flip_z = flip_coords(&src_start, &src_end, &dst_start, &dst_end);<br>
@@ -1406,10 +1409,11 @@ void anv_CmdResolveImage(<br>
     for (uint32_t r = 0; r < regionCount; r++) {<br>
        assert(pRegions[r].srcSubresou<wbr>rce.aspectMask ==<br>
               pRegions[r].dstSubresource.as<wbr>pectMask);<br>
-      assert(pRegions[r].srcSubresou<wbr>rce.layerCount ==<br>
-             pRegions[r].dstSubresource.la<wbr>yerCount);<br>
+      assert(anv_get_layerCount(src_<wbr>image, &pRegions[r].srcSubresource) ==<br>
+             anv_get_layerCount(dst_image, &pRegions[r].dstSubresource));<br>
  -      const uint32_t layer_count = pRegions[r].dstSubresource.lay<wbr>erCount;<br>
+      const uint32_t layer_count =<br>
+         anv_get_layerCount(dst_image, &pRegions[r].dstSubresource);<br>
          for (uint32_t layer = 0; layer < layer_count; layer++) {<br>
           resolve_image(&batch,<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br></div></div>