Skip to content

Commit

Permalink
Add: Recognize Apple9
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Dec 28, 2023
1 parent 22427b8 commit 1cbfd0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2926,6 +2926,9 @@ static uint32_t mvkGetEntryProperty(io_registry_entry_t entry, CFStringRef prope
#if MVK_XCODE_14 || (MVK_IOS && MVK_XCODE_13)
if (supportsMTLGPUFamily(Apple8)) { gpuFam = MTLGPUFamilyApple8; }
#endif
#if MVK_XCODE_15 && (MVK_IOS || MVK_MACOS)
if (supportsMTLGPUFamily(Apple9)) { gpuFam = MTLGPUFamilyApple9; }
#endif

// Combine OS major (8 bits), OS minor (8 bits), and GPU family (16 bits)
// into one 32-bit value summarizing highest GPU capability.
Expand Down Expand Up @@ -3326,6 +3329,9 @@ static uint32_t mvkGetEntryProperty(io_registry_entry_t entry, CFStringRef prope
logMsg += "\n\tsupports the following Metal Versions, GPU's and Feature Sets:";
logMsg += "\n\t\tMetal Shading Language %s";

#if MVK_XCODE_15 && (MVK_IOS || MVK_MACOS)
if (supportsMTLGPUFamily(Apple9)) { logMsg += "\n\t\tGPU Family Apple 9"; }
#endif
#if MVK_XCODE_14 || (MVK_IOS && MVK_XCODE_13)
if (supportsMTLGPUFamily(Apple8)) { logMsg += "\n\t\tGPU Family Apple 8"; }
#endif
Expand Down
12 changes: 12 additions & 0 deletions MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,12 @@
addGPUOSMTLPixFmtCaps( Apple5, 11.0, BGR10_XR, All );
addGPUOSMTLPixFmtCaps( Apple5, 11.0, BGR10_XR_sRGB, All );
#endif

#if MVK_XCODE_15
addGPUOSMTLPixFmtCaps( Apple9, 14.0, R32Float, All );
addGPUOSMTLPixFmtCaps( Apple9, 14.0, RG32Float, All );
addGPUOSMTLPixFmtCaps( Apple9, 14.0, RGBA32Float, All );
#endif

addFeatSetMTLVtxFmtCaps( macOS_GPUFamily1_v3, UCharNormalized, Vertex );
addFeatSetMTLVtxFmtCaps( macOS_GPUFamily1_v3, CharNormalized, Vertex );
Expand Down Expand Up @@ -1941,6 +1947,12 @@

addGPUOSMTLPixFmtCaps( Apple1, 13.0, Depth16Unorm, DRFM );
addGPUOSMTLPixFmtCaps( Apple3, 13.0, Depth16Unorm, DRFMR );

#if MVK_XCODE_15
addGPUOSMTLPixFmtCaps( Apple9, 14.0, R32Float, All );
addGPUOSMTLPixFmtCaps( Apple9, 14.0, RG32Float, All );
addGPUOSMTLPixFmtCaps( Apple9, 14.0, RGBA32Float, All );
#endif

// Vertex formats
addFeatSetMTLVtxFmtCaps( iOS_GPUFamily1_v4, UCharNormalized, Vertex );
Expand Down

0 comments on commit 1cbfd0a

Please sign in to comment.