mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Vulkan: Fix crash when a replaced texture fails to allocate
The out-of-VRAM retry path cleared plan.replaced but left plan.doReplace set. GetMipSize() dereferences plan.replaced when doReplace is true, so the fallback crashed instead of recovering. The common code sets both together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
This commit is contained in:
1 parent
050cacbbdf
commit
79a48c7dbe
1 file changed
+3
-1
@@ -740,8 +740,10 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, err->T("Warning: Video memory FULL, switching to slow caching mode"), 2.0f);
|
||||
}
|
||||
|
||||
// Turn off texture replacement for this texture.
|
||||
// Turn off texture replacement for this texture. Both of these need to be reset, GetMipSize
|
||||
// dereferences plan.replaced if doReplace is still set.
|
||||
plan.replaced = nullptr;
|
||||
plan.doReplace = false;
|
||||
|
||||
plan.createW /= plan.scaleFactor;
|
||||
plan.createH /= plan.scaleFactor;
|
||||
|
||||
Reference in new issue
Block a user