diff options
author | bunnei <bunneidev@gmail.com> | 2022-12-18 10:11:14 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:28 +0200 |
commit | 6ed62a9f109ed7e09586f33777505132acb261df (patch) | |
tree | 1650cbc76deda6b025d307372d959ae5730df1e6 | |
parent | android: Minimize frontend & convert to yuzu. (diff) | |
download | yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar.gz yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar.bz2 yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar.lz yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar.xz yuzu-6ed62a9f109ed7e09586f33777505132acb261df.tar.zst yuzu-6ed62a9f109ed7e09586f33777505132acb261df.zip |
-rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 5 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index df948292f..e4c581a28 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -449,7 +449,12 @@ void BlitScreen::DrawToSwapchain(Frame* frame, const Tegra::FramebufferConfig& f if (const std::size_t swapchain_images = swapchain.GetImageCount(); swapchain_images != image_count || current_srgb != is_srgb) { current_srgb = is_srgb; +#ifdef ANDROID + // Android is already ordered the same as Switch. + image_view_format = current_srgb ? VK_FORMAT_R8G8B8A8_SRGB : VK_FORMAT_R8G8B8A8_UNORM; +#else image_view_format = current_srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM; +#endif image_count = swapchain_images; Recreate(); } diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 8c0dec590..e43a993f9 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -266,7 +266,12 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bo images = swapchain.GetImages(); image_count = static_cast<u32>(images.size()); +#ifdef ANDROID + // Android is already ordered the same as Switch. + image_view_format = srgb ? VK_FORMAT_R8G8B8A8_SRGB : VK_FORMAT_R8G8B8A8_UNORM; +#else image_view_format = srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM; +#endif } void Swapchain::CreateSemaphores() { |