Completed the support for MSL 3.1 enum
This commit adds some extra code that was needed to define to MSL 3.1 enum that was not included in the first commit. Based on PR: #1940
This commit is contained in:
parent
6bca44c612
commit
056dec80e6
@ -1780,6 +1780,12 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MVK_XCODE_15
|
||||
if ( mvkOSVersionIsAtLeast(17.0) ) {
|
||||
_metalFeatures.mslVersionEnum = MTLLanguageVersion3_1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if MVK_IOS
|
||||
@ -1897,6 +1903,11 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.mslVersionEnum = MTLLanguageVersion3_0;
|
||||
}
|
||||
#endif
|
||||
#if MVK_XCODE_15
|
||||
if ( mvkOSVersionIsAtLeast(17.0) ) {
|
||||
_metalFeatures.mslVersionEnum = MTLLanguageVersion3_1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -1982,6 +1993,11 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.mslVersionEnum = MTLLanguageVersion3_0;
|
||||
}
|
||||
#endif
|
||||
#if MVK_XCODE_15
|
||||
if ( mvkOSVersionIsAtLeast(14.0) ) {
|
||||
_metalFeatures.mslVersionEnum = MTLLanguageVersion3_1;
|
||||
}
|
||||
#endif
|
||||
|
||||
// This is an Apple GPU--treat it accordingly.
|
||||
if (supportsMTLGPUFamily(Apple1)) {
|
||||
|
@ -71,6 +71,11 @@ bool mvk::compile(const string& mslSourceCode,
|
||||
#define mslVer(MJ, MN, PT) mslVersionMajor == MJ && mslVersionMinor == MN && mslVersionPoint == PT
|
||||
|
||||
MTLLanguageVersion mslVerEnum = (MTLLanguageVersion)0;
|
||||
#if MVK_XCODE_15
|
||||
if (mslVer(3, 1, 0)) {
|
||||
mslVerEnum = MTLLanguageVersion3_1;
|
||||
} else
|
||||
#endif
|
||||
#if MVK_XCODE_14
|
||||
if (mslVer(3, 0, 0)) {
|
||||
mslVerEnum = MTLLanguageVersion3_0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user