Update Metal wrapped objects to match MacOS13.3

MTLDevice changes

Change API availability:

supportsBCTextureCompression : API_AVAILABLE(macos(11.0), ios(16.4))

Added protocols:

- (BOOL)shouldMaximizeConcurrentCompilation API_AVAILABLE(macos(13.3)) API_UNAVAILABLE(ios)

- (void)setShouldMaximizeConcurrentCompilation:(BOOL)value API_AVAILABLE(macos(13.3))API_UNAVAILABLE(ios)

-(NSUInteger)maximumConcurrentCompilationTaskCount API_AVAILABLE(macos(13.3)) API_UNAVAILABLE(ios)

MTLFunction changes

Change API availability:

newArgumentEncoderWithBufferIndex : API_DEPRECATED("Use MTLDevice's newArgumentEncoderWithBufferBinding: instead", macos(10.13, 13.0), ios(11.0, 16.0))

Added:

bool WrappedMTLDevice::shouldMaximizeConcurrentCompilation();
NS::UInteger WrappedMTLDevice::maximumConcurrentCompilationTaskCount();
This commit is contained in:
Jake Turner
2023-04-10 07:15:37 +01:00
committed by Baldur Karlsson
parent 4ae4116f85
commit 6f5b849f45
5 changed files with 42 additions and 2 deletions
+10
View File
@@ -647,6 +647,16 @@ bool WrappedMTLDevice::supportsPrimitiveMotionBlur()
return Unwrap(this)->supportsPrimitiveMotionBlur();
}
bool WrappedMTLDevice::shouldMaximizeConcurrentCompilation()
{
return Unwrap(this)->shouldMaximizeConcurrentCompilation();
}
NS::UInteger WrappedMTLDevice::maximumConcurrentCompilationTaskCount()
{
return Unwrap(this)->maximumConcurrentCompilationTaskCount();
}
// End of MTLDevice APIs
WrappedMTLTexture *WrappedMTLDevice::Common_NewTexture(RDMTL::TextureDescriptor &descriptor,
+2
View File
@@ -105,6 +105,8 @@ public:
bool supportsFunctionPointersFromRender();
bool supportsRaytracingFromRender();
bool supportsPrimitiveMotionBlur();
bool shouldMaximizeConcurrentCompilation();
NS::UInteger maximumConcurrentCompilationTaskCount();
// End of MTLDevice APIs
CaptureState &GetStateRef() { return m_State; }
+24 -1
View File
@@ -160,7 +160,7 @@
return GetWrapped(self)->supportsQueryTextureLOD();
}
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))API_UNAVAILABLE(ios)
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0), ios(16.4))
{
return GetWrapped(self)->supportsBCTextureCompression();
}
@@ -889,4 +889,27 @@ newIndirectCommandBufferWithDescriptor:(MTLIndirectCommandBufferDescriptor *)des
return GetWrapped(self)->supportsPrimitiveMotionBlur();
}
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_3
- (BOOL)shouldMaximizeConcurrentCompilation API_AVAILABLE(macos(13.3))API_UNAVAILABLE(ios)
{
return GetWrapped(self)->shouldMaximizeConcurrentCompilation();
}
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_3
- (void)setShouldMaximizeConcurrentCompilation:(BOOL)value API_AVAILABLE(macos(13.3))
API_UNAVAILABLE(ios)
{
METAL_NOT_HOOKED();
return [self.real setShouldMaximizeConcurrentCompilation:value];
}
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_3
- (NSUInteger)maximumConcurrentCompilationTaskCount API_AVAILABLE(macos(13.3))API_UNAVAILABLE(ios)
{
return GetWrapped(self)->maximumConcurrentCompilationTaskCount();
}
#endif
@end
@@ -117,7 +117,8 @@
}
- (id<MTLArgumentEncoder>)newArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex
API_AVAILABLE(macos(10.13), ios(11.0))
API_DEPRECATED("Use MTLDevice's newArgumentEncoderWithBufferBinding: instead",
macos(10.13, 13.0), ios(11.0, 16.0))
{
METAL_NOT_HOOKED();
return [self.real newArgumentEncoderWithBufferIndex:bufferIndex];
@@ -63,3 +63,7 @@ inline WrappedMTLResource *GetWrapped(id<MTLResource> objC)
#ifndef __MAC_13_0
#define __MAC_13_0 130000
#endif
#ifndef __MAC_13_3
#define __MAC_13_3 130300
#endif