Mesa (master): anv: change BLOCK_POOL_MEMFD_SIZE to exactly 2GB

Tapani Pälli tpalli at kemper.freedesktop.org
Wed Mar 8 06:03:35 UTC 2017


Module: Mesa
Branch: master
Commit: db5f9c31774691df9239bcbbbf52075a63c08c25
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=db5f9c31774691df9239bcbbbf52075a63c08c25

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Tue Mar  7 11:17:42 2017 +0200

anv: change BLOCK_POOL_MEMFD_SIZE to exactly 2GB

This is what comment above definition says and change fixes issue with
32bit build where BLOCK_POOL_MEMFD_SIZE is used as ftruncate parameter
and constant currently gets converted from 4294967296 to 0.

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/vulkan/anv_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index b53d3d8..27c1923 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -378,7 +378,7 @@ struct anv_block_pool {
 };
 
 /* Block pools are backed by a fixed-size 2GB memfd */
-#define BLOCK_POOL_MEMFD_SIZE (1ull << 32)
+#define BLOCK_POOL_MEMFD_SIZE (1ul << 31)
 
 /* 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.




More information about the mesa-commit mailing list