fix bug in deallocate tex
This commit is contained in:
@@ -36,7 +36,7 @@ class RendererCoreGS {
|
|||||||
constexpr static float gsCenter = 4096.0F;
|
constexpr static float gsCenter = 4096.0F;
|
||||||
constexpr static float screenCenter = gsCenter / 2.0F;
|
constexpr static float screenCenter = gsCenter / 2.0F;
|
||||||
constexpr static float vramMargin =
|
constexpr static float vramMargin =
|
||||||
0.01F; // We don't have perfectly 4MB of VRAM
|
0.003F; // We don't have perfectly 4MB of VRAM
|
||||||
|
|
||||||
float spaceOccupiedByFrameBuffers, spaceOccupiedByZBuffer;
|
float spaceOccupiedByFrameBuffers, spaceOccupiedByZBuffer;
|
||||||
RendererSettings* settings;
|
RendererSettings* settings;
|
||||||
|
|||||||
@@ -52,9 +52,12 @@ void RendererCoreTextureSender::deallocate(
|
|||||||
}
|
}
|
||||||
|
|
||||||
graph_vram_free(texBuffers.core->address);
|
graph_vram_free(texBuffers.core->address);
|
||||||
|
|
||||||
|
float deallocateSize = getSizeInMB(texBuffers.core);
|
||||||
|
|
||||||
delete texBuffers.core;
|
delete texBuffers.core;
|
||||||
|
|
||||||
allocatedVRamMemForTextures -= getSizeInMB(texBuffers.core);
|
allocatedVRamMemForTextures -= deallocateSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
texbuffer_t* RendererCoreTextureSender::allocateTextureCore(
|
texbuffer_t* RendererCoreTextureSender::allocateTextureCore(
|
||||||
|
|||||||
Reference in New Issue
Block a user