Make `RID_Owner<Texture>` threadsafe in `TextureStorage` for gles3

(cherry picked from commit 09d2c09434)
This commit is contained in:
ACB 2024-02-11 13:12:21 +01:00 committed by Rémi Verschelde
parent 9547818cc0
commit f4ac543b99
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 3 additions and 3 deletions

View File

@ -402,8 +402,8 @@ private:
RID_Owner<CanvasTexture, true> canvas_texture_owner;
/* Texture API */
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> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool p_force_decompress) const;

View File

@ -172,7 +172,7 @@ private:
void cleanup();
};
//textures can be created from threads, so this RID_Owner is thread safe
// Textures can be created from threads, so this RID_Owner is thread safe.
mutable RID_Owner<Texture, true> texture_owner;
Texture *get_texture(RID p_rid) { return texture_owner.get_or_null(p_rid); };