mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-02 12:32:03 +01:00
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
515b497f91
commit
e32e558aab
1 file changed
-13
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user