diff options
author | Dario <dariosamo@gmail.com> | 2024-03-15 14:13:31 -0300 |
---|---|---|
committer | Dario <dariosamo@gmail.com> | 2024-10-02 15:11:58 -0300 |
commit | e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231 (patch) | |
tree | d37262a01ec645c1e150f6f4612226303b0a9705 /servers/rendering/renderer_rd/storage_rd/mesh_storage.h | |
parent | 1917bc3454e58fc56750b00e04aa25cb94d8d266 (diff) | |
download | redot-engine-e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231.tar.gz |
Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590.
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd/mesh_storage.h')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index f811314fb6..6784520d17 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -199,6 +199,7 @@ private: weight_update_list(this), array_update_list(this) {} }; + RD::VertexFormatID _mesh_surface_generate_vertex_format(uint64_t p_surface_format, uint64_t p_input_mask, bool p_instanced_surface, bool p_input_motion_vectors, uint32_t &r_position_stride); void _mesh_surface_generate_version_for_input_mask(Mesh::Surface::Version &v, Mesh::Surface *s, uint64_t p_input_mask, bool p_input_motion_vectors, MeshInstance::Surface *mis = nullptr, uint32_t p_current_buffer = 0, uint32_t p_previous_buffer = 0); void _mesh_instance_clear(MeshInstance *mi); @@ -605,6 +606,12 @@ public: return s->particles_render_index; } + _FORCE_INLINE_ RD::VertexFormatID mesh_surface_get_vertex_format(void *p_surface, uint64_t p_input_mask, bool p_instanced_surface, bool p_input_motion_vectors) { + Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface); + uint32_t position_stride = 0; + return _mesh_surface_generate_vertex_format(s->format, p_input_mask, p_instanced_surface, p_input_motion_vectors, position_stride); + } + Dependency *mesh_get_dependency(RID p_mesh) const; /* MESH INSTANCE API */ |