#10473·filament

Vulkan handle arena size is not configurable from CMake (OpenGL and Metal are)

Author: jwinarskeCreated Sep 24, 2026Updated Sep 24, 2026

FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB and FILAMENT_METAL_HANDLE_ARENA_SIZE_IN_MB are CMake cache variables turned into compile definitions (filament/CMakeLists.txt:379-380). The Vulkan equivalent is only an #ifndef in VulkanConstants.h:174:

c
#ifndef FVK_HANDLE_ARENA_SIZE_IN_MB
#define FVK_HANDLE_ARENA_SIZE_IN_MB 8
#endif

so the only way to change it is editing the header.

Secondary: when the arena is exhausted the warning names the OpenGL constant unconditionally (HandleAllocator.cpp:162 and :172), which on a Vulkan build points at the one setting that cannot help:

... Please increase FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB
... the appropriate constant (e.g. FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB).

Hit with a ~6900-entity scene on the Vulkan backend: the 8 MB default is exhausted and Filament falls back to the system heap.

Unchanged on main at 9bf96999e (rc/1.75.1-cut-197).

Patch we carry downstream, plumbed the same way as the other two. Default unchanged at 8, so it adds the knob and nothing else:

diff
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,6 +123,10 @@ set(FILAMENT_METAL_HANDLE_ARENA_SIZE_IN_MB "8" CACHE STRING
     "Size of the Metal handle arena, default 8."
 )
 
+set(FILAMENT_VULKAN_HANDLE_ARENA_SIZE_IN_MB "8" CACHE STRING
+    "Size of the Vulkan handle arena, default 8."
+)
+
 set(FILAMENT_BACKEND_DEBUG_FLAG "" CACHE STRING
     "A debug flag meant for enabling/disabling backend debugging paths"
 )
--- a/filament/CMakeLists.txt
+++ b/filament/CMakeLists.txt
@@ -378,6 +378,7 @@ add_definitions(
     -DFILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB=${FILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB}
     -DFILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB=${FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB}
     -DFILAMENT_METAL_HANDLE_ARENA_SIZE_IN_MB=${FILAMENT_METAL_HANDLE_ARENA_SIZE_IN_MB}
+    -DFVK_HANDLE_ARENA_SIZE_IN_MB=${FILAMENT_VULKAN_HANDLE_ARENA_SIZE_IN_MB}
 )

Happy to open it as a PR if that is easier. It does not address the warning text.