mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
video_core: vk_swapchain: Fix image format for Android.
This commit is contained in:
parent
5e198d1421
commit
6ed62a9f10
2 changed files with 10 additions and 0 deletions
|
@ -449,7 +449,12 @@ void BlitScreen::DrawToSwapchain(Frame* frame, const Tegra::FramebufferConfig& f
|
||||||
if (const std::size_t swapchain_images = swapchain.GetImageCount();
|
if (const std::size_t swapchain_images = swapchain.GetImageCount();
|
||||||
swapchain_images != image_count || current_srgb != is_srgb) {
|
swapchain_images != image_count || current_srgb != is_srgb) {
|
||||||
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;
|
image_view_format = current_srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM;
|
||||||
|
#endif
|
||||||
image_count = swapchain_images;
|
image_count = swapchain_images;
|
||||||
Recreate();
|
Recreate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,12 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bo
|
||||||
|
|
||||||
images = swapchain.GetImages();
|
images = swapchain.GetImages();
|
||||||
image_count = static_cast<u32>(images.size());
|
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;
|
image_view_format = srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Swapchain::CreateSemaphores() {
|
void Swapchain::CreateSemaphores() {
|
||||||
|
|
Loading…
Reference in a new issue