STORM-IRIT / Radium-Engine

Research 3D Engine for rendering, animation and processing
https://storm-irit.github.io/Radium-Engine/
Apache License 2.0
100 stars 50 forks source link

Refactor Texture #1012

Closed dlyr closed 11 months ago

dlyr commented 1 year ago

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...