Allow configuring vulkan renderer max descriptor sets per frame (#3461)

This commit is contained in:
Nuno Silva
2025-09-18 15:25:06 +01:00
committed by GitHub
parent 0c4e7e2283
commit 735f6233de
2 changed files with 6 additions and 1 deletions

View File

@@ -170,6 +170,11 @@
# define BGFX_CONFIG_RENDERER_DIRECT3D11_USE_STAGING_BUFFER 0
#endif // BGFX_CONFIG_RENDERER_DIRECT3D11_USE_STAGING_BUFFER
/// Configure the amount of max descriptor sets per frame for Vulkan
#ifndef BGFX_CONFIG_RENDERER_VULKAN_MAX_DESCRIPTOR_SETS_PER_FRAME
# define BGFX_CONFIG_RENDERER_VULKAN_MAX_DESCRIPTOR_SETS_PER_FRAME 1024
#endif // BGFX_CONFIG_RENDERER_VULKAN_MAX_DESCRIPTOR_SETS_PER_FRAME
/// Enable use of tinystl.
#ifndef BGFX_CONFIG_USE_TINYSTL
# define BGFX_CONFIG_USE_TINYSTL 1

View File

@@ -1130,7 +1130,7 @@ VK_IMPORT_DEVICE
);
}
#define MAX_DESCRIPTOR_SETS (1024 * BGFX_CONFIG_MAX_FRAME_LATENCY)
#define MAX_DESCRIPTOR_SETS (BGFX_CONFIG_RENDERER_VULKAN_MAX_DESCRIPTOR_SETS_PER_FRAME * BGFX_CONFIG_MAX_FRAME_LATENCY)
struct RendererContextVK : public RendererContextI
{