Fix water descriptor pool leak and add water rendering diagnostics

- Add VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT to water material
  descriptor pool so individual sets can be freed when tiles are unloaded
- Free descriptor sets in destroyWaterMesh() instead of leaking them
- Add terrain manager unloadAll() during logout to properly clear stale
  tiles, water surfaces, and queues between sessions
- Add diagnostic logging for water surface loading, material allocation
  failures, and render skip reasons to investigate missing water
This commit is contained in:
Kelsi 2026-02-25 13:26:08 -08:00
parent 94e4a0bdb3
commit 872b10fe68
4 changed files with 38 additions and 5 deletions

View file

@ -661,7 +661,10 @@ void Application::logoutToLogin() {
if (auto* m2 = renderer->getM2Renderer()) {
m2->clear();
}
// TerrainManager will be re-initialized on next world entry
// Unload all terrain tiles + water surfaces so next world entry starts fresh
if (auto* terrain = renderer->getTerrainManager()) {
terrain->unloadAll();
}
if (auto* questMarkers = renderer->getQuestMarkerRenderer()) {
questMarkers->clear();
}