From e32e558aabab29af3cf747c030bbaa80d33dd63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 18 Oct 2026 01:47:07 +0200 Subject: [PATCH] Android Vulkan: Drop the stale surface extent workaround The transposed extents f7ec86c5d5 worked around came from the size race the previous commit fixed: with the size now applied between frames, the workaround didn't fire once in 38 rotations on the Galaxy S8+ that hit it in about one in four. Co-Authored-By: Claude Opus 5.5 (1M context) --- Common/GPU/Vulkan/VulkanContext.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanContext.cpp b/Common/GPU/Vulkan/VulkanContext.cpp index ba988a2f40..08e7398961 100644 --- a/Common/GPU/Vulkan/VulkanContext.cpp +++ b/Common/GPU/Vulkan/VulkanContext.cpp @@ -1532,19 +1532,6 @@ bool VulkanContext::InitSwapchain(VkPresentModeKHR desiredPresentMode) { } } -#if PPSSPP_PLATFORM(ANDROID) - // Right after an in-place rotation, the surface can still report the previous orientation's extent (seen - // on a Mali Galaxy S8+, when queried within a few ms of surfaceChanged). That leaves a portrait swapchain - // on a landscape window or the other way around, until the next rotation. The window size we were told - // about is current, so if the extent is exactly that transposed, it's stale. - if (g_display.pixel_xres > 0 && g_display.pixel_yres > 0 && g_display.pixel_xres != g_display.pixel_yres && - currentExtent.width == (uint32_t)g_display.pixel_yres && currentExtent.height == (uint32_t)g_display.pixel_xres) { - WARN_LOG(Log::G3D, "Surface extent %dx%d is the window transposed, probably stale after a rotation. Using %dx%d.", - currentExtent.width, currentExtent.height, g_display.pixel_xres, g_display.pixel_yres); - std::swap(currentExtent.width, currentExtent.height); - } -#endif - swapChainExtent_.width = clamp(currentExtent.width, surfCapabilities_.minImageExtent.width, surfCapabilities_.maxImageExtent.width); swapChainExtent_.height = clamp(currentExtent.height, surfCapabilities_.minImageExtent.height, surfCapabilities_.maxImageExtent.height);