From a43b1566e666b8d9ef1931b8ff2cce9c2d934bea Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Thu, 21 Sep 2017 15:01:35 -0400 Subject: [PATCH] Make MetalBackend require BGRA8 swapchain --- src/utils/MetalBinding.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/MetalBinding.mm b/src/utils/MetalBinding.mm index a0119aacb6..36b3a58971 100644 --- a/src/utils/MetalBinding.mm +++ b/src/utils/MetalBinding.mm @@ -70,7 +70,7 @@ namespace utils { nxtSwapChainError Configure(nxtTextureFormat format, nxtTextureUsageBit, uint32_t width, uint32_t height) { - if (format != NXT_TEXTURE_FORMAT_R8_G8_B8_A8_UNORM) { + if (format != NXT_TEXTURE_FORMAT_B8_G8_R8_A8_UNORM) { return "unsupported format"; } ASSERT(width > 0); @@ -137,7 +137,7 @@ namespace utils { } nxtTextureFormat GetPreferredSwapChainTextureFormat() override { - return NXT_TEXTURE_FORMAT_R8_G8_B8_A8_UNORM; + return NXT_TEXTURE_FORMAT_B8_G8_R8_A8_UNORM; } private: