Skip to content

Commit 71faf1c

Browse files
committed
GPU (macOS): detect Metal 4 support
1 parent d182f3f commit 71faf1c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/detection/gpu/gpu_apple.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#import <Metal/MTLDevice.h>
44
#import <IOKit/kext/KextManager.h>
55

6+
#ifndef MAC_OS_VERSION_26_0
7+
#define MTLGPUFamilyMetal4 ((MTLGPUFamily) 5002)
8+
#endif
69
#ifndef MAC_OS_VERSION_13_0
710
#define MTLGPUFamilyMetal3 ((MTLGPUFamily) 5001)
811
#endif
@@ -57,7 +60,9 @@
5760
else if ([device supportsFeatureSet:MTLFeatureSet_macOS_GPUFamily1_v1])
5861
ffStrbufSetStatic(&gpu->platformApi, "Metal Feature Set 1");
5962
#else // MAC_OS_X_VERSION_10_15
60-
if ([device supportsFamily:MTLGPUFamilyMetal3])
63+
if ([device supportsFamily:MTLGPUFamilyMetal4])
64+
ffStrbufSetStatic(&gpu->platformApi, "Metal 4");
65+
else if ([device supportsFamily:MTLGPUFamilyMetal3])
6166
ffStrbufSetStatic(&gpu->platformApi, "Metal 3");
6267
else if ([device supportsFamily:MTLGPUFamilyCommon3])
6368
ffStrbufSetStatic(&gpu->platformApi, "Metal Common 3");

0 commit comments

Comments
 (0)