<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">Wouldn't be a bad idea to do this for all compressed formats.  It doesn't really matter though since blorp will nuke the format the moment it cones into blorp_copy anyway.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Nov 2, 2016 4:56 PM, "Nanley Chery" <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Such a surface is not possible on our hardware. Without this change, ISL<br>
surface creation would fail with the next patch.<br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
<br>
This series requires the following extra patch, seemingly due to the<br>
recent changes with blorp.<br>
<br>
 src/intel/vulkan/anv_blorp.c | 16 ++++++++++++++++<br>
 1 file changed, 16 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
index 87f242c..0feb5d5 100644<br>
--- a/src/intel/vulkan/anv_blorp.c<br>
+++ b/src/intel/vulkan/anv_blorp.c<br>
@@ -126,6 +126,22 @@ get_blorp_surf_for_anv_buffer(<wbr>struct anv_device *device,<br>
                               struct blorp_surf *blorp_surf,<br>
                               struct isl_surf *isl_surf)<br>
 {<br>
+   const struct isl_format_layout *fmtl =<br>
+      isl_format_get_layout(format);<br>
+<br>
+   /* ASTC is the only format which doesn't support linear layouts.<br>
+    * Create an equivalently sized surface with ISL to get around this.<br>
+    */<br>
+   if (fmtl->txc == ISL_TXC_ASTC) {<br>
+      /* Use an equivalently sized format */<br>
+      format = ISL_FORMAT_R32G32B32A32_UINT;<br>
+      assert(fmtl->bpb == isl_format_get_layout(format)-<wbr>>bpb);<br>
+<br>
+      /* Shrink the dimensions for the new format */<br>
+      width = DIV_ROUND_UP(width, fmtl->bw);<br>
+      height = DIV_ROUND_UP(height, fmtl->bh);<br>
+   }<br>
+<br>
    *blorp_surf = (struct blorp_surf) {<br>
       .surf = isl_surf,<br>
       .addr = {<br>
--<br>
2.10.2<br>
<br>
</blockquote></div></div>