perf(rendering): reduce GPU cull buffer and add CPU fallback for overflow

Halve MAX_CULL_INSTANCES to 32768 and iterate all instances in render,
falling back to CPU frustum culling for any beyond the GPU buffer.
This commit is contained in:
Kelsi Davis 2026-04-05 03:25:27 -07:00
parent b62df70d09
commit 8bb3702af4
2 changed files with 7 additions and 6 deletions

View file

@ -478,7 +478,7 @@ private:
uint32_t instanceCount;
uint32_t _pad[3] = {};
};
static constexpr uint32_t MAX_CULL_INSTANCES = 65536;
static constexpr uint32_t MAX_CULL_INSTANCES = 32768;
VkPipeline cullPipeline_ = VK_NULL_HANDLE;
VkPipelineLayout cullPipelineLayout_ = VK_NULL_HANDLE;
VkDescriptorSetLayout cullSetLayout_ = VK_NULL_HANDLE;