[GPU] Add texture surface cache eviction

Implemented as a simple ring buffer evicting the oldest entry for now.
This commit is contained in:
Sky 2023-07-06 08:42:34 -07:00
parent 5835069a9d
commit 255947b2fc
3 changed files with 19 additions and 7 deletions

View file

@ -35,8 +35,9 @@ void Texture::setNewConfig(u32 cfg) {
void Texture::free() {
valid = false;
if (texture.exists())
Helpers::panic("Make this texture free itself");
if (texture.exists()){
glDeleteTextures(1, &texture.m_handle);
}
}
u64 Texture::sizeInBytes() {