mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Fix compile error when building on SDK 11.1
SDK 11.1 and SDK 12 have different declaration for MTLDevice::supportsBCTextureCompression. On SDK 11.1 it is marked as API_AVAILABLE for ios and on SDK 12 is marked as API_UNAVAILABLE ios. Guard the API_UNAVAILABLE(ios) declaration to only be included when compiling for SDK 12.0 or above. The compile error message before the fix: renderdoc/driver/metal/metal_device_bridge.mm:158:64: error: method cannot be unavailable on iOS when the protocol method it implements is available [-Werror,-Wavailability] 69 - (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))API_UNAVAILABLE(ios)
This commit is contained in:
committed by
Baldur Karlsson
parent
58f6061bdb
commit
0173671fde
@@ -161,7 +161,11 @@
|
||||
return self.real.supportsQueryTextureLOD;
|
||||
}
|
||||
|
||||
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))API_UNAVAILABLE(ios)
|
||||
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))
|
||||
// It is available for ios in SDK 11.1 and it is marked as unavailable in SDK 12
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_12_0
|
||||
API_UNAVAILABLE(ios)
|
||||
#endif // #if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_12_0
|
||||
{
|
||||
return self.real.supportsBCTextureCompression;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user