Fix Stockades crash: suppress area triggers on initial login, handle VK_ERROR_DEVICE_LOST

Root cause: LOGIN_VERIFY_WORLD path did not set areaTriggerCheckTimer_ or
areaTriggerSuppressFirst_, so the Stockades exit portal (AT 503) fired
immediately on login, teleporting the player back to Stormwind and crashing
the GPU during the unexpected map transition.

Fixes:
- Set 5s area trigger cooldown + suppress-first in handleLoginVerifyWorld
  (same as SMSG_NEW_WORLD handler already did for teleports)
- Add deviceLost_ flag to VkContext so beginFrame returns immediately once
  VK_ERROR_DEVICE_LOST is detected, preventing infinite retry loops
- Track device lost from both fence wait and queue submit paths
This commit is contained in:
Kelsi 2026-03-02 08:19:14 -08:00
parent 3c55b09a3f
commit f1caf8c03e
4 changed files with 18 additions and 0 deletions

View file

@ -73,6 +73,8 @@ public:
bool isSwapchainDirty() const { return swapchainDirty; }
void markSwapchainDirty() { swapchainDirty = true; }
bool isDeviceLost() const { return deviceLost_; }
// MSAA
VkSampleCountFlagBits getMsaaSamples() const { return msaaSamples_; }
void setMsaaSamples(VkSampleCountFlagBits samples);
@ -131,6 +133,7 @@ private:
std::vector<VkImageView> swapchainImageViews;
std::vector<VkFramebuffer> swapchainFramebuffers;
bool swapchainDirty = false;
bool deviceLost_ = false;
// Per-frame resources
FrameData frames[MAX_FRAMES_IN_FLIGHT];