[Mesa-dev] [PATCH] anv: change BLOCK_POOL_MEMFD_SIZE to 1GB

Jason Ekstrand jason at jlekstrand.net
Thu Mar 30 15:34:32 UTC 2017


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

On Thu, Mar 30, 2017 at 3:56 AM, Tapani Pälli <tapani.palli at intel.com>
wrote:

> This allows us to run 32bit Vulkan apps on Android, ftruncate
> call would fail on 2GB (max size being 2GB - 1).
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> history: we had some discussion about this some weeks back and Jason
> proposed to simply set the size to 1GB:
>
> https://lists.freedesktop.org/archives/mesa-dev/2017-March/147396.html
>
>  src/intel/vulkan/anv_private.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_
> private.h
> index 27c887c..85029da 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -377,8 +377,8 @@ struct anv_block_pool {
>     struct anv_block_state back_state;
>  };
>
> -/* Block pools are backed by a fixed-size 2GB memfd */
> -#define BLOCK_POOL_MEMFD_SIZE (1ul << 31)
> +/* Block pools are backed by a fixed-size 1GB memfd */
> +#define BLOCK_POOL_MEMFD_SIZE (1ul << 30)
>
>  /* The center of the block pool is also the middle of the memfd.  This may
>   * change in the future if we decide differently for some reason.
> --
> 2.9.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170330/5c315057/attachment.html>


More information about the mesa-dev mailing list