Metal updates for MacSDK 14.4

Add MTLResource::setOwnerWithIdentity to ObjCBridgeMTLTexture and ObjCBridgeMTLBuffer
This commit is contained in:
Jake Turner
2024-04-13 16:17:57 +01:00
parent 1a85fcffba
commit bea0621625
3 changed files with 24 additions and 2 deletions
+10 -1
View File
@@ -63,7 +63,7 @@
}
// MTLResource : based on the protocol defined in
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
- (nullable NSString *)label
{
@@ -132,6 +132,15 @@
return [self.real isAliasable];
}
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_14_4
- (kern_return_t)setOwnerWithIdentity:(task_id_token_t)task_id_token
API_AVAILABLE(ios(17.4), watchos(10.4), tvos(17.4), macos(14.4))
{
METAL_NOT_HOOKED();
return [self.real setOwnerWithIdentity:task_id_token];
}
#endif
// MTLBuffer : based on the protocol defined in
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h
+10 -1
View File
@@ -63,7 +63,7 @@
}
// MTLResource : based on the protocol defined in
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
- (nullable NSString *)label
{
@@ -132,6 +132,15 @@
return [self.real isAliasable];
}
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_14_4
- (kern_return_t)setOwnerWithIdentity:(task_id_token_t)task_id_token
API_AVAILABLE(ios(17.4), watchos(10.4), tvos(17.4), macos(14.4))
{
METAL_NOT_HOOKED();
return [self.real setOwnerWithIdentity:task_id_token];
}
#endif
// MTLTexture : based on the protocol defined in
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
@@ -71,3 +71,7 @@ inline WrappedMTLResource *GetWrapped(id<MTLResource> objC)
#ifndef __MAC_14_0
#define __MAC_14_0 140000
#endif
#ifndef __MAC_14_4
#define __MAC_14_4 140400
#endif