diff options
author | reduz <reduzio@gmail.com> | 2021-02-09 13:19:03 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-02-10 13:21:46 -0300 |
commit | 8b19ffd810a1471ab870b7229047ad2101341330 (patch) | |
tree | 19bf66787e48cebd86b494846d147db1f163f87c /servers/rendering_server.h | |
parent | f3d15771bf33e68b26058806f9310ac074c56e5c (diff) |
Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
Diffstat (limited to 'servers/rendering_server.h')
-rw-r--r-- | servers/rendering_server.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 72ee2587b3..65065841a6 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -367,7 +367,7 @@ public: MULTIMESH_TRANSFORM_3D, }; - virtual void multimesh_allocate(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0; + virtual void multimesh_allocate_data(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0; virtual int multimesh_get_instance_count(RID p_multimesh) const = 0; virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh) = 0; @@ -409,7 +409,7 @@ public: /* SKELETON API */ virtual RID skeleton_create() = 0; - virtual void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0; + virtual void skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0; virtual int skeleton_get_bone_count(RID p_skeleton) const = 0; virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) = 0; virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const = 0; @@ -552,7 +552,7 @@ public: virtual RID gi_probe_create() = 0; - virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; + virtual void gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0; virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0; |