Further fixes to Xcode 12.5 support.
Indicate that MacCatalyst does not support BC compression.
diff --git a/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h b/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
index 86e46f5..f332168 100644
--- a/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
+++ b/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
@@ -43,7 +43,7 @@
bool isDirty = true;
} MVKMTLSamplerStateBinding;
-/** Describes a MTLBuffer resource binding. */
+/** Describes a MTLBuffer resource binding. */
typedef struct MVKMTLBufferBinding {
union { id<MTLBuffer> mtlBuffer = nil; id<MTLBuffer> mtlResource; const void* mtlBytes; }; // aliases
VkDeviceSize offset = 0;
diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
index 167395d..2a4fd6e 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
@@ -4166,16 +4166,20 @@
return [mtlDevice respondsToSelector: @selector(registryID)] ? mtlDevice.registryID : 0;
}
+// Since MacCatalyst does not support supportsBCTextureCompression, it is not possible
+// for Apple Silicon to indicate a lack of support for BCn when running MacCatalyst.
+// Therefore, assume for now that this means MacCatalyst does not actually support BCn.
+// Further evidence may change this approach.
bool mvkSupportsBCTextureCompression(id<MTLDevice> mtlDevice) {
-#if MVK_MACOS
-#if MVK_XCODE_12 && !MVK_MACCAT
+#if MVK_IOS || MVK_TVOS || MVK_MACCAT
+ return false;
+#endif
+#if MVK_MACOS && !MVK_MACCAT
+#if MVK_XCODE_12
if ([mtlDevice respondsToSelector: @selector(supportsBCTextureCompression)]) {
return mtlDevice.supportsBCTextureCompression;
}
#endif
return true;
#endif
-#if MVK_IOS_OR_TVOS
- return false;
-#endif
}