[PR #933] [MERGED] Swapchain recreation and window resizing #1838

Closed
opened 2026-02-27 21:14:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/933
Author: @LNDF
Created: 9/15/2024
Status: Merged
Merged: 9/25/2024
Merged by: @georgemoralis

Base: mainHead: main


📝 Commits (9)

  • 7449846 Always present acquired swapchain images
  • 161e3fb Recreate swapchain if window is resized
  • 010ae4a Respect aspect ratio when blitting to frame
  • 31c4490 Make SDL window resizable
  • eb5c47e clang-format
  • 7f8ccf4 designator order (building with gcc)
  • d33b084 Clear frame before blitting
  • 4c486b7 clang-format
  • dc598e8 Revert "designator order (building with gcc)"

📊 Changes

4 files changed (+67 additions, -17 deletions)

View changed files

📝 src/sdl_window.cpp (+1 -0)
📝 src/video_core/renderer_vulkan/renderer_vulkan.cpp (+59 -14)
📝 src/video_core/renderer_vulkan/vk_swapchain.cpp (+4 -3)
📝 src/video_core/renderer_vulkan/vk_swapchain.h (+3 -0)

📄 Description

This PR makes the window resizable and fits the image inside the window without stretching (respecting the aspect ratio).

Acquired swapchain images are released even if recreation is needed so they can be acquired again, fixing #865.

There may be a better place than the present funcion to recreate the swapchain.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/933 **Author:** [@LNDF](https://github.com/LNDF) **Created:** 9/15/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (9) - [`7449846`](https://github.com/shadps4-emu/shadPS4/commit/74498463a3a19967f9db423685dcafe5a28a2d37) Always present acquired swapchain images - [`161e3fb`](https://github.com/shadps4-emu/shadPS4/commit/161e3fb785b5f88412aa8e6800fc5fa1ff7a1697) Recreate swapchain if window is resized - [`010ae4a`](https://github.com/shadps4-emu/shadPS4/commit/010ae4a1d4e68abfdfe74955f8e854007f1ad98b) Respect aspect ratio when blitting to frame - [`31c4490`](https://github.com/shadps4-emu/shadPS4/commit/31c44909dd5b5721514999ca091ba133a9cf011b) Make SDL window resizable - [`eb5c47e`](https://github.com/shadps4-emu/shadPS4/commit/eb5c47e2285ee4416c3f5db9ef8d88e70d9b8f93) clang-format - [`7f8ccf4`](https://github.com/shadps4-emu/shadPS4/commit/7f8ccf4b1e37a5c45d56f06474103f100d66fbf7) designator order (building with gcc) - [`d33b084`](https://github.com/shadps4-emu/shadPS4/commit/d33b0847c078de3b0f86d51690197e93327d850f) Clear frame before blitting - [`4c486b7`](https://github.com/shadps4-emu/shadPS4/commit/4c486b7445a40340ae394dc26c728d952f1b5ec3) clang-format - [`dc598e8`](https://github.com/shadps4-emu/shadPS4/commit/dc598e89e469bcd2379b926540cc8a0bafb148c0) Revert "designator order (building with gcc)" ### 📊 Changes **4 files changed** (+67 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/sdl_window.cpp` (+1 -0) 📝 `src/video_core/renderer_vulkan/renderer_vulkan.cpp` (+59 -14) 📝 `src/video_core/renderer_vulkan/vk_swapchain.cpp` (+4 -3) 📝 `src/video_core/renderer_vulkan/vk_swapchain.h` (+3 -0) </details> ### 📄 Description This PR makes the window resizable and fits the image inside the window without stretching (respecting the aspect ratio). Acquired swapchain images are released even if recreation is needed so they can be acquired again, fixing #865. There may be a better place than the present funcion to recreate the swapchain. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1838
No description provided.