You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Validate triviality of the InstanceData and RenderElementInfo structs in Mobile and Forward+ renderers.
This is needed to avoid overhead that results from calling the constructor during calls to LocalVector.resize()
This commit is contained in:
@@ -328,6 +328,9 @@ private:
|
||||
float uv_scale[4];
|
||||
};
|
||||
|
||||
static_assert(std::is_trivially_destructible_v<InstanceData>);
|
||||
static_assert(std::is_trivially_constructible_v<InstanceData>);
|
||||
|
||||
UBO ubo;
|
||||
|
||||
LocalVector<RID> uniform_buffers;
|
||||
@@ -392,6 +395,9 @@ private:
|
||||
uint32_t lod_index : 8;
|
||||
};
|
||||
|
||||
static_assert(std::is_trivially_destructible_v<RenderElementInfo>);
|
||||
static_assert(std::is_trivially_constructible_v<RenderElementInfo>);
|
||||
|
||||
template <PassMode p_pass_mode, uint32_t p_color_pass_flags = 0>
|
||||
_FORCE_INLINE_ void _render_list_template(RenderingDevice::DrawListID p_draw_list, RenderingDevice::FramebufferFormatID p_framebuffer_Format, RenderListParameters *p_params, uint32_t p_from_element, uint32_t p_to_element);
|
||||
void _render_list(RenderingDevice::DrawListID p_draw_list, RenderingDevice::FramebufferFormatID p_framebuffer_Format, RenderListParameters *p_params, uint32_t p_from_element, uint32_t p_to_element);
|
||||
|
||||
Reference in New Issue
Block a user