From 13b1840ad0b85be3ce5aeb7e824f9594b878fd6f Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Fri, 4 Dec 2020 02:32:14 -0600 Subject: [PATCH] MVKImage: Fix compilation with Xcode 11. We can't rely on those enums not being re-`#define`d, because they're only re-`#define`d like that in MVKPixelFormats.mm. Signed-off-by: Chip Davis --- MoltenVK/MoltenVK/GPUObjects/MVKImage.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm index 35bd99e68..16771aff6 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm @@ -1669,7 +1669,7 @@ switch (mtlPixFmt) { case MTLPixelFormatR8Unorm: -#ifndef MTLPixelFormatR8Unorm_sRGB +#if MVK_MACOS_APPLE_SILICON || MVK_IOS_OR_TVOS case MTLPixelFormatR8Unorm_sRGB: #endif case MTLPixelFormatR8Snorm: @@ -1689,7 +1689,7 @@ break; case MTLPixelFormatRG8Unorm: -#ifndef MTLPixelFormatRG8Unorm_sRGB +#if MVK_MACOS_APPLE_SILICON || MVK_IOS_OR_TVOS case MTLPixelFormatRG8Unorm_sRGB: #endif case MTLPixelFormatRG8Snorm: