<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 20, 2017 at 8:45 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">Blorp can deal with depth/stencil surfaces blits/copies without the<br>
render target requirement. Also having both render target and<br>
depth/stencil requirement is incompatible from isl's point of view.<br>
<br>
This fixes an image creation issue in the high level quality settings<br>
of the Unity3D player, which requires a depth texture with src/dst<br>
transfer & 4x multisampling.<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
---<br>
 src/intel/vulkan/anv_image.c | 8 ++++++--<br>
 1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index 9e5cebe188..8f738b2042 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -75,8 +75,12 @@ choose_isl_surf_usage(<wbr>VkImageUsageFlags vk_usage,<br>
       isl_usage |= ISL_SURF_USAGE_TEXTURE_BIT;<br>
    }<br>
<br>
-   if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_<wbr>BIT) {<br>
-      /* blorp implements transfers by rendering into the destination image. */<br>
+   if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_<wbr>BIT &&<br>
+       (aspect & (VK_IMAGE_ASPECT_DEPTH_BIT |<br>
+                  VK_IMAGE_ASPECT_STENCIL_BIT)) == 0) {<br></blockquote><div><br></div><div>How about just "aspect == VK_IMAGE_ASPECT_COLOR_BIT"?  That would be simpler.  Also, this should get CC'd to stable.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+      /* blorp implements transfers by rendering into the destination image.<br>
+       * Only request this with color images, as we deal with depth/stencil<br>
+       * formats differently. */<br>
       isl_usage |= ISL_SURF_USAGE_RENDER_TARGET_<wbr>BIT;<br>
    }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>