mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Fix terrain loss after map transition and GPU crash on WMO-only maps
Three fixes: 1. Water captureSceneHistory gated on hasSurfaces() — the image layout transitions (PRESENT_SRC→TRANSFER_SRC→PRESENT_SRC) were running every frame even on WMO-only maps with no water, causing VK_ERROR_DEVICE_LOST. 2. Tile cache invalidation: softReset() now clears tileCache_ since cache keys are (x,y) without map name — prevents stale cross-map cache hits. 3. Copy terrain/mesh into TerrainTile instead of std::move — the moved-from PendingTile was cached with empty data, so subsequent map loads returned tiles with 0 valid chunks from cache. Also adds diagnostic skip env vars (WOWEE_SKIP_TERRAIN, WOWEE_SKIP_SKY, WOWEE_SKIP_PREPASSES) and a 0-chunk warning in loadTerrain.
This commit is contained in:
parent
5519c73f5c
commit
335b1b1c3a
3 changed files with 34 additions and 12 deletions
|
|
@ -320,6 +320,10 @@ void TerrainRenderer::shutdown() {
|
|||
bool TerrainRenderer::loadTerrain(const pipeline::TerrainMesh& mesh,
|
||||
const std::vector<std::string>& texturePaths,
|
||||
int tileX, int tileY) {
|
||||
if (mesh.validChunkCount == 0) {
|
||||
LOG_WARNING("loadTerrain[", tileX, ",", tileY, "]: mesh has 0 valid chunks (", texturePaths.size(), " textures)");
|
||||
return false;
|
||||
}
|
||||
LOG_DEBUG("Loading terrain mesh: ", mesh.validChunkCount, " chunks");
|
||||
|
||||
for (int y = 0; y < 16; y++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue