Make MetalBackend require BGRA8 swapchain

This commit is contained in:
Corentin Wallez 2017-09-21 15:01:35 -04:00 committed by Corentin Wallez
parent e862a33dac
commit a43b1566e6
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ namespace utils {
nxtSwapChainError Configure(nxtTextureFormat format, nxtTextureUsageBit, nxtSwapChainError Configure(nxtTextureFormat format, nxtTextureUsageBit,
uint32_t width, uint32_t height) { 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"; return "unsupported format";
} }
ASSERT(width > 0); ASSERT(width > 0);
@ -137,7 +137,7 @@ namespace utils {
} }
nxtTextureFormat GetPreferredSwapChainTextureFormat() override { nxtTextureFormat GetPreferredSwapChainTextureFormat() override {
return NXT_TEXTURE_FORMAT_R8_G8_B8_A8_UNORM; return NXT_TEXTURE_FORMAT_B8_G8_R8_A8_UNORM;
} }
private: private: