diff options
author | reduz <reduzio@gmail.com> | 2022-03-06 12:57:09 +0100 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-03-06 13:03:33 +0100 |
commit | b0ca03b0a24116976e0859d7766e2ca5eb18cb88 (patch) | |
tree | 9b6f023ba0c50dbad9edbcd7e2d7481ba527f6fa /servers/rendering/renderer_rd/renderer_storage_rd.h | |
parent | 272b35595474e02b640dcd51201bc07424d43bae (diff) |
Add a UniformSet cache
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.
This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_storage_rd.h')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h index cb35c2bf65..95aa547a02 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.h +++ b/servers/rendering/renderer_rd/renderer_storage_rd.h @@ -1765,7 +1765,7 @@ public: RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; u.binding = 0; - u.ids.push_back(multimesh->buffer); + u.append_id(multimesh->buffer); uniforms.push_back(u); multimesh->uniform_set_3d = RD::get_singleton()->uniform_set_create(uniforms, p_shader, p_set); } @@ -1780,7 +1780,7 @@ public: RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; u.binding = 0; - u.ids.push_back(multimesh->buffer); + u.append_id(multimesh->buffer); uniforms.push_back(u); multimesh->uniform_set_2d = RD::get_singleton()->uniform_set_create(uniforms, p_shader, p_set); } @@ -1818,7 +1818,7 @@ public: RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; u.binding = 0; - u.ids.push_back(skeleton->buffer); + u.append_id(skeleton->buffer); uniforms.push_back(u); skeleton->uniform_set_3d = RD::get_singleton()->uniform_set_create(uniforms, p_shader, p_set); } @@ -2276,7 +2276,7 @@ public: RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; u.binding = 0; - u.ids.push_back(particles->particle_instance_buffer); + u.append_id(particles->particle_instance_buffer); uniforms.push_back(u); } |