<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 8, 2016 at 1:46 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 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 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>
</span>The user isn't allowed to make such a call. Does this fix a CTS test?<span class=""><br></span></blockquote><div><br></div><div>Heh, so they aren't. It doesn't fix anything, it just ensures that you never hit the ioctl with a size of zero. How about I replace it with an assert?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> + *ppData = NULL;<br>
> + return VK_SUCCESS;<br>
> + }<br>
> +<br>
> /* FIXME: Is this supposed to be thread safe? Since vkUnmapMemory() only<br>
> * takes a VkDeviceMemory pointer, it seems like only one map of the memory<br>
> * at a time is valid. We could just mmap up front and return an offset<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</span>> ______________________________<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>
</blockquote></div><br></div></div>