mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #88205 from 0x0ACB/thread_safe_texture_rid
Make `RID_Owner<Texture>` threadsafe in `TextureStorage` for GLES3
This commit is contained in:
commit
5e58bcd793
@ -404,8 +404,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;
|
||||
|
||||
|
@ -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); };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user