[Mesa-dev] [PATCH 06/22] anv/image: Remove incorrect assertion in anv_BindImage

Jason Ekstrand jason at jlekstrand.net
Tue May 2 22:45:59 UTC 2017


On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <nanleychery at gmail.com>
wrote:

> According to the Linux kernel sources, the ioctl in anv_gem_mmap() will
> not fail if the size isn't a multiple of 4KB.
>

I skimmed through the mmap code and I believe you are correct

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/intel/vulkan/anv_image.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> index 8d946e8e93..9f3eb52a37 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -413,11 +413,10 @@ VkResult anv_BindImageMemory(
>
>     if (image->aux_surface.isl.size > 0) {
>
> -      /* The offset and size must be a multiple of 4K or else the
> -       * anv_gem_mmap call below will return NULL.
> +      /* The offset must be a multiple of 4K or else the anv_gem_mmap call
> +       * below will return NULL.
>         */
>        assert((image->offset + image->aux_surface.offset) % 4096 == 0);
> -      assert(image->aux_surface.isl.size % 4096 == 0);
>
>        /* Auxiliary surfaces need to have their memory cleared to 0 before
> they
>         * can be used.  For CCS surfaces, this puts them in the "resolved"
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170502/ff0861fd/attachment.html>


More information about the mesa-dev mailing list