QRhiMetal: Replace deprecated supportsFeatureSet with supportsFamily
https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf Change-Id: Ic1d2f6056fb1eff8652d91d63c7db7cc5c6ed005 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit cdcbed3bd63bcf5bc842c3b44a555193b98df5a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b07932fb66
commit
7d2e67b1b3
@ -610,23 +610,17 @@ bool QRhiMetal::create(QRhi::Flags flags)
|
|||||||
caps.maxThreadGroupSize = 1024;
|
caps.maxThreadGroupSize = 1024;
|
||||||
caps.multiView = true;
|
caps.multiView = true;
|
||||||
#elif defined(Q_OS_TVOS)
|
#elif defined(Q_OS_TVOS)
|
||||||
if ([d->dev supportsFeatureSet: MTLFeatureSet(30003)]) // MTLFeatureSet_tvOS_GPUFamily2_v1
|
if ([d->dev supportsFamily:MTLGPUFamilyApple3])
|
||||||
caps.maxTextureSize = 16384;
|
caps.maxTextureSize = 16384;
|
||||||
else
|
else
|
||||||
caps.maxTextureSize = 8192;
|
caps.maxTextureSize = 8192;
|
||||||
caps.baseVertexAndInstance = false;
|
caps.baseVertexAndInstance = false;
|
||||||
caps.isAppleGPU = true;
|
caps.isAppleGPU = true;
|
||||||
#elif defined(Q_OS_IOS)
|
#elif defined(Q_OS_IOS)
|
||||||
// welcome to feature set hell
|
if ([d->dev supportsFamily:MTLGPUFamilyApple3]) {
|
||||||
if ([d->dev supportsFeatureSet: MTLFeatureSet(16)] // MTLFeatureSet_iOS_GPUFamily5_v1
|
|
||||||
|| [d->dev supportsFeatureSet: MTLFeatureSet(11)] // MTLFeatureSet_iOS_GPUFamily4_v1
|
|
||||||
|| [d->dev supportsFeatureSet: MTLFeatureSet(4)]) // MTLFeatureSet_iOS_GPUFamily3_v1
|
|
||||||
{
|
|
||||||
caps.maxTextureSize = 16384;
|
caps.maxTextureSize = 16384;
|
||||||
caps.baseVertexAndInstance = true;
|
caps.baseVertexAndInstance = true;
|
||||||
} else if ([d->dev supportsFeatureSet: MTLFeatureSet(3)] // MTLFeatureSet_iOS_GPUFamily2_v2
|
} else if ([d->dev supportsFamily:MTLGPUFamilyApple2]) {
|
||||||
|| [d->dev supportsFeatureSet: MTLFeatureSet(2)]) // MTLFeatureSet_iOS_GPUFamily1_v2
|
|
||||||
{
|
|
||||||
caps.maxTextureSize = 8192;
|
caps.maxTextureSize = 8192;
|
||||||
caps.baseVertexAndInstance = false;
|
caps.baseVertexAndInstance = false;
|
||||||
} else {
|
} else {
|
||||||
@ -635,9 +629,9 @@ bool QRhiMetal::create(QRhi::Flags flags)
|
|||||||
}
|
}
|
||||||
caps.isAppleGPU = true;
|
caps.isAppleGPU = true;
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if ([d->dev supportsFamily: MTLGPUFamilyApple4])
|
if ([d->dev supportsFamily:MTLGPUFamilyApple4])
|
||||||
caps.maxThreadGroupSize = 1024;
|
caps.maxThreadGroupSize = 1024;
|
||||||
if ([d->dev supportsFamily: MTLGPUFamilyApple5])
|
if ([d->dev supportsFamily:MTLGPUFamilyApple5])
|
||||||
caps.multiView = true;
|
caps.multiView = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user