mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
vulkan: don't hold onto ImageData references after loading an image.
Reduces CPU memory usage.
This commit is contained in:
@@ -41,6 +41,10 @@ Texture::Texture(love::graphics::Graphics *gfx, const Settings &settings, const
|
||||
slices = *data;
|
||||
|
||||
loadVolatile();
|
||||
|
||||
// ImageData is referenced by the first loadVolatile call, but we don't
|
||||
// hang on to it after that so we can save memory.
|
||||
slices.clear();
|
||||
}
|
||||
|
||||
bool Texture::loadVolatile()
|
||||
|
||||
Reference in New Issue
Block a user