From 4a88c14d9565c76aceb96bdd3be23831ac99253d Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 6 Jun 2025 16:02:47 +0200 Subject: [PATCH] Fix #139917: Vulkan: Increase number of render frames The number of render frames influences how long discarded memory will be kept. There are platforms that require 5 frames to work succesfully. Pull Request: https://projects.blender.org/blender/blender/pulls/139934 --- intern/ghost/intern/GHOST_ContextVK.hh | 2 +- source/blender/gpu/vulkan/vk_device.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/ghost/intern/GHOST_ContextVK.hh b/intern/ghost/intern/GHOST_ContextVK.hh index e1081e71e55..73dccfd30ea 100644 --- a/intern/ghost/intern/GHOST_ContextVK.hh +++ b/intern/ghost/intern/GHOST_ContextVK.hh @@ -98,7 +98,7 @@ struct GHOST_Frame { * Vulkan backend. Notably, VKThreadData::resource_pools_count must * match this value. */ -constexpr static uint32_t GHOST_FRAMES_IN_FLIGHT = 4; +constexpr static uint32_t GHOST_FRAMES_IN_FLIGHT = 5; class GHOST_ContextVK : public GHOST_Context { friend class GHOST_XrGraphicsBindingVulkan; diff --git a/source/blender/gpu/vulkan/vk_device.hh b/source/blender/gpu/vulkan/vk_device.hh index fc3d85932d0..51cfeac2667 100644 --- a/source/blender/gpu/vulkan/vk_device.hh +++ b/source/blender/gpu/vulkan/vk_device.hh @@ -102,7 +102,7 @@ class VKThreadData : public NonCopyable, NonMovable { * in flight used by GHOST. Therefore, this constant *must* always * match GHOST_ContextVK's GHOST_FRAMES_IN_FLIGHT. */ - static constexpr uint32_t resource_pools_count = 4; + static constexpr uint32_t resource_pools_count = 5; public: /** Thread ID this instance belongs to. */