mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add Persistent Buffers
This work is a heavily refactored and rewritten from TheForge's initial code. TheForge's original code had too many race conditions and was fundamentally flawed as it was too easy to incur into those data races by accident. However they identified the proper places that needed changes, and the idea was sound. I used their work as a blueprint to design this work. This PR implements: - Introduction of UMA buffers used by a few buffers (most notably the ones filled by _fill_instance_data). Ironically this change seems to positively affect PC more than it does on Mobile. Updates D3D12 Memory Allocator to get GPU_UPLOAD heap support. Metal implementation by Stuart Carnie. Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com> Co-authored-by: TheForge team
This commit is contained in:
parent
5950fca36c
commit
230adb7511
38 changed files with 2848 additions and 1466 deletions
|
|
@ -489,6 +489,7 @@ private:
|
|||
RDD::ShaderID shader;
|
||||
uint32_t first_set_index = 0;
|
||||
uint32_t set_count = 0;
|
||||
uint32_t dynamic_offsets_mask = 0u;
|
||||
|
||||
_FORCE_INLINE_ RDD::UniformSetID *uniform_set_ids() {
|
||||
return reinterpret_cast<RDD::UniformSetID *>(&this[1]);
|
||||
|
|
@ -620,6 +621,7 @@ private:
|
|||
RDD::ShaderID shader;
|
||||
uint32_t first_set_index = 0;
|
||||
uint32_t set_count = 0;
|
||||
uint32_t dynamic_offsets_mask = 0u;
|
||||
|
||||
_FORCE_INLINE_ RDD::UniformSetID *uniform_set_ids() {
|
||||
return reinterpret_cast<RDD::UniformSetID *>(&this[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue