Further fixes to Xcode 12.5 support.
Test for [MTLDevice supportsBCTextureCompression] only when using Xcode 12 and above.
Use Xcode 12.5 in GitHub Actions CI.
Fix typos in comments.
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index af46642..0a66e13 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -13,7 +13,7 @@
build:
strategy:
matrix:
- xcode: [ "12.4" ]
+ xcode: [ "12.5" ]
platform: [ "macos", "maccat", "ios", "tvos" ]
os: [ "macos-latest" ]
upload_artifacts: [ true ]
diff --git a/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h b/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
index 7431871..86e46f5 100644
--- a/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
+++ b/MoltenVK/MoltenVK/Commands/MVKMTLResourceBindings.h
@@ -36,14 +36,14 @@
bool isDirty = true;
} MVKMTLTextureBinding;
-/** Describes a MTLSamplerState resource bindi MVKMTLSamplerStateBindingng. */
+/** Describes a MTLSamplerState resource binding. */
typedef struct MVKMTLSamplerStateBinding {
union { id<MTLSamplerState> mtlSamplerState = nil; id<MTLSamplerState> mtlResource; }; // aliases
uint16_t index = 0;
bool isDirty = true;
} MVKMTLSamplerStateBinding;
-/** Describes MVKMTLBufferBindinga 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 5a3b8f0..ac2ddff 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
@@ -4167,10 +4167,12 @@
}
bool mvkSupportsBCTextureCompression(id<MTLDevice> mtlDevice) {
-#if MVK_MACOS && !MVK_MACCAT
+#if MVK_MACOS
+#if MVK_XCODE_12 && !MVK_MACCAT
if ([mtlDevice respondsToSelector: @selector(supportsBCTextureCompression)]) {
return mtlDevice.supportsBCTextureCompression;
}
+#endif
return true;
#endif
return false;