diff options
author | Fernando S <fsahmkow27@gmail.com> | 2022-11-04 01:25:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 01:25:34 +0100 |
commit | 3794851f7f46d2112cffc146e4c788beef56bf38 (patch) | |
tree | 689e7c73fc8a3cca3da08f28eaffc895e871c773 /src | |
parent | Merge pull request #9097 from liamwhite/intel-spv-compiler (diff) | |
parent | vk_blit_screen: recreate swapchain images on guest format change (diff) | |
download | yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar.gz yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar.bz2 yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar.lz yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar.xz yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.tar.zst yuzu-3794851f7f46d2112cffc146e4c788beef56bf38.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 6 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index cb7fa2078..89426121f 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -480,11 +480,15 @@ void BlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) { fsr.reset(); } - if (framebuffer.width == raw_width && framebuffer.height == raw_height && !raw_images.empty()) { + if (framebuffer.width == raw_width && framebuffer.height == raw_height && + framebuffer.pixel_format == pixel_format && !raw_images.empty()) { return; } + raw_width = framebuffer.width; raw_height = framebuffer.height; + pixel_format = framebuffer.pixel_format; + ReleaseRawImages(); CreateStagingBuffer(framebuffer); diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.h b/src/video_core/renderer_vulkan/vk_blit_screen.h index 29e2ea925..a2b73ec54 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.h +++ b/src/video_core/renderer_vulkan/vk_blit_screen.h @@ -28,6 +28,10 @@ namespace VideoCore { class RasterizerInterface; } +namespace Service::android { +enum class PixelFormat : u32; +} + namespace Vulkan { struct ScreenInfo; @@ -156,6 +160,7 @@ private: u32 raw_width = 0; u32 raw_height = 0; + Service::android::PixelFormat pixel_format{}; std::unique_ptr<FSR> fsr; }; |