diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-07-29 12:59:18 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 11:53:29 +0100 |
commit | c613ead5fa2361296cf8d9a80d4648492ff4e16f (patch) | |
tree | 974356b6840ecf764415d43277ef78ad3c6b6373 /servers/visual/rasterizer_rd/rasterizer_storage_rd.h | |
parent | 4fe3ee1730167b90ec8ae70c871c1dad032981d5 (diff) |
Added a spinlock template as well as a thread work pool class.
Also, optimized shader compilation to happen on threads.
Diffstat (limited to 'servers/visual/rasterizer_rd/rasterizer_storage_rd.h')
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_storage_rd.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h index c2f60c08b3..c05d9a41f6 100644 --- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h +++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h @@ -4,8 +4,8 @@ #include "core/rid_owner.h" #include "servers/visual/rasterizer.h" #include "servers/visual/rasterizer_rd/effects_rd.h" -#include "servers/visual/rendering_device.h" #include "servers/visual/rasterizer_rd/shader_compiler_rd.h" +#include "servers/visual/rendering_device.h" class RasterizerStorageRD : public RasterizerStorage { public: @@ -109,7 +109,8 @@ private: } }; - mutable RID_Owner<Texture> texture_owner; + //textures can be created from threads, so this RID_Owner is thread safe + mutable RID_Owner<Texture, true> texture_owner; Ref<Image> _validate_texture_format(const Ref<Image> &p_image, TextureToRDFormat &r_format); |