<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to the Linux kernel sources, the ioctl in anv_gem_mmap() will<br>
not fail if the size isn't a multiple of 4KB.<br></blockquote><div><br></div><div>I skimmed through the mmap code and I believe you are correct<br><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
 src/intel/vulkan/anv_image.c | 5 ++---<br>
 1 file changed, 2 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index 8d946e8e93..9f3eb52a37 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -413,11 +413,10 @@ VkResult anv_BindImageMemory(<br>
<br>
    if (image->aux_surface.isl.size > 0) {<br>
<br>
-      /* The offset and size must be a multiple of 4K or else the<br>
-       * anv_gem_mmap call below will return NULL.<br>
+      /* The offset must be a multiple of 4K or else the anv_gem_mmap call<br>
+       * below will return NULL.<br>
        */<br>
       assert((image->offset + image->aux_surface.offset) % 4096 == 0);<br>
-      assert(image->aux_surface.isl.<wbr>size % 4096 == 0);<br>
<br>
       /* Auxiliary surfaces need to have their memory cleared to 0 before they<br>
        * can be used.  For CCS surfaces, this puts them in the "resolved"<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.12.2<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>