vulkan: don't hold onto ImageData references after loading an image.

Reduces CPU memory usage.
This commit is contained in:
Sasha Szpakowski
2023-10-09 20:22:04 -03:00
parent 90cd0be392
commit 86eb6df05c
+4
View File
@@ -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()