From 3c5f715053cd782397434f70ca03de6798c48d3c Mon Sep 17 00:00:00 2001 From: bitsawer Date: Mon, 21 Aug 2023 12:46:15 +0300 Subject: [PATCH] Fix Vulkan crash with many Omni/SpotLights, Decals or ReflectionProbes (cherry picked from commit d6f45e4f1429f4867f02e1070c7609b34e90f4bd) --- servers/rendering/renderer_rd/cluster_builder_rd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/renderer_rd/cluster_builder_rd.cpp b/servers/rendering/renderer_rd/cluster_builder_rd.cpp index d2a1a5ab9c3..64950c6991a 100644 --- a/servers/rendering/renderer_rd/cluster_builder_rd.cpp +++ b/servers/rendering/renderer_rd/cluster_builder_rd.cpp @@ -285,7 +285,7 @@ void ClusterBuilderRD::setup(Size2i p_screen_size, uint32_t p_max_elements, RID cluster_render_buffer = RD::get_singleton()->storage_buffer_create(cluster_render_buffer_size); cluster_buffer = RD::get_singleton()->storage_buffer_create(cluster_buffer_size); - render_elements = static_cast(memalloc(sizeof(RenderElementData *) * render_element_max)); + render_elements = static_cast(memalloc(sizeof(RenderElementData) * render_element_max)); render_element_count = 0; element_buffer = RD::get_singleton()->storage_buffer_create(sizeof(RenderElementData) * render_element_max);