Current Engine/Data/Texture implementation have some flaws.
This issue is to track/discuss solution, in continuation of the modification proposed in #982
Concurrent multi-thread access might cause data inconsistency, between texture parameters and texture data.
Current implementation use texture parameters for multiples usage, and is a bit hacky.
Textures do not own its data, but may represent gpu data that was available on cpu side, but has been deleted afterward.
Proposed guidelines:
split sampler parameters and image data
make texture the owner of image data
then methods can use class own mutex, be re-entrant...
Current Engine/Data/Texture implementation have some flaws. This issue is to track/discuss solution, in continuation of the modification proposed in #982
Concurrent multi-thread access might cause data inconsistency, between texture parameters and texture data. Current implementation use texture parameters for multiples usage, and is a bit hacky. Textures do not own its data, but may represent gpu data that was available on cpu side, but has been deleted afterward.
Proposed guidelines: split sampler parameters and image data make texture the owner of image data then methods can use class own mutex, be re-entrant...