diff options
author | SaracenOne <SaracenOne@gmail.com> | 2021-12-21 22:04:37 +0000 |
---|---|---|
committer | SaracenOne <SaracenOne@gmail.com> | 2022-01-06 16:05:07 +0000 |
commit | cd842b65bf9844ea50d516c5854dd7ff3628870d (patch) | |
tree | d817c935db83ccfe681fbd8a1a087920ebf27903 /servers | |
parent | f57bdf13af3e99b0f0235909eecc428d913c9b01 (diff) |
Fix queueing a texture and regular uniform update in RD backend in succession.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 6cce51cfaf..5507f206b5 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -1639,14 +1639,14 @@ void RendererStorageRD::material_initialize(RID p_rid) { } void RendererStorageRD::_material_queue_update(Material *material, bool p_uniform, bool p_texture) { + material->uniform_dirty = material->uniform_dirty || p_uniform; + material->texture_dirty = material->texture_dirty || p_texture; + if (material->update_element.in_list()) { return; } material_update_list.add(&material->update_element); - - material->uniform_dirty = material->uniform_dirty || p_uniform; - material->texture_dirty = material->texture_dirty || p_texture; } void RendererStorageRD::material_set_shader(RID p_material, RID p_shader) { |