<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 8, 2016 at 2:11 PM, 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"><span class="">On Tue, Nov 08, 2016 at 02:01:17PM -0800, Nanley Chery wrote:<br>
> On Tue, Nov 08, 2016 at 01:50:01PM -0800, Jason Ekstrand wrote:<br>
> > On Tue, Nov 8, 2016 at 1:46 PM, Nanley Chery <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br>
> ><br>
> > > On Mon, Nov 07, 2016 at 05:28:12PM -0800, Jason Ekstrand wrote:<br>
> > > > Signed-off-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > > > Cc: "12.0 13.0" <<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.<wbr>org</a>><br>
> > > > ---<br>
> > > >  src/intel/vulkan/anv_device.c | 5 +++++<br>
> > > >  1 file changed, 5 insertions(+)<br>
> > > ><br>
> > > > diff --git a/src/intel/vulkan/anv_device.<wbr>c<br>
> > > b/src/intel/vulkan/anv_device.<wbr>c<br>
> > > > index 5393144..8055893 100644<br>
> > > > --- a/src/intel/vulkan/anv_device.<wbr>c<br>
> > > > +++ b/src/intel/vulkan/anv_device.<wbr>c<br>
> > > > @@ -1258,6 +1258,11 @@ VkResult anv_MapMemory(<br>
> > > >     if (size == VK_WHOLE_SIZE)<br>
> > > >        size = mem->bo.size - offset;<br>
> > > ><br>
> > > > +   if (size == 0) {<br>
> > ><br>
> > > The user isn't allowed to make such a call. Does this fix a CTS test?<br>
> > ><br>
> ><br>
> > Heh, so they aren't.  It doesn't fix anything, it just ensures that you<br>
> > never hit the ioctl with a size of zero.  How about I replace it with an<br>
> > assert?<br>
> ><br>
><br>
> An assert or no assert is fine. The validation layers technically should<br>
> catch this for us.<br></span></blockquote><div><br></div><div>They should, but this is more for my confidence in subsequent code than to try and fix apps.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
><br>
<br>
</span>With patch 1 fixed or omitted, this series is:<br>
Reviewed-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br></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">
> ><br>
> > > > +      *ppData = NULL;<br>
> > > > +      return VK_SUCCESS;<br>
> > > > +   }<br>
> > > > +<br>
> > > >     /* FIXME: Is this supposed to be thread safe? Since vkUnmapMemory()<br>
> > > only<br>
> > > >      * takes a VkDeviceMemory pointer, it seems like only one map of the<br>
> > > memory<br>
> > > >      * at a time is valid. We could just mmap up front and return an<br>
> > > offset<br>
> > > > --<br>
> > > > 2.5.0.400.gff86faf<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>
> > ><br>
</div></div></blockquote></div><br></div></div>