@@ -9,6 +9,43 @@ int main()
99
1010 id <MTLDevice > device = MTLCreateSystemDefaultDevice ();
1111
12+ // Log Metal device capabilities
13+ NSLog (@" Metal Device Capabilities:" );
14+ NSLog (@" Name: %@ " , device.name);
15+ NSLog (@" Low Power: %@ " , device.isLowPower ? @" YES" : @" NO" );
16+ NSLog (@" Headless: %@ " , device.isHeadless ? @" YES" : @" NO" );
17+ NSLog (@" Removable: %@ " , device.isRemovable ? @" YES" : @" NO" );
18+ NSLog (@" Registry ID: %llu " , device.registryID);
19+ NSLog (@" Max Threads Per Threadgroup: %lu " , (unsigned long )device.maxThreadsPerThreadgroup.width);
20+ NSLog (@" Max Buffer Length: %llu " , device.maxBufferLength);
21+ NSLog (@" Max Texture 2D Size: %lu " , (unsigned long )device.maxTextureSize2D);
22+ NSLog (@" Max Texture 3D Size: %lu " , (unsigned long )device.maxTextureSize3D);
23+ NSLog (@" Supports Family Apple7: %@ " , [device supportsFamily: MTLGPUFamilyApple7] ? @" YES" : @" NO" );
24+ NSLog (@" Supports Family Apple8: %@ " , [device supportsFamily: MTLGPUFamilyApple8] ? @" YES" : @" NO" );
25+ NSLog (@" Supports Family Apple9: %@ " , [device supportsFamily: MTLGPUFamilyApple9] ? @" YES" : @" NO" );
26+ NSLog (@" Supports Family Mac2: %@ " , [device supportsFamily: MTLGPUFamilyMac2 ] ? @" YES" : @" NO" );
27+ NSLog (@" Supports Family Common3: %@ " , [device supportsFamily: MTLGPUFamilyCommon3 ] ? @" YES" : @" NO" );
28+ NSLog (@" Supports Family Metal3: %@ " , [device supportsFamily: MTLGPUFamilyMetal3] ? @" YES" : @" NO" );
29+ NSLog (@" Argument Buffers Tier: %lu " , (unsigned long )device.argumentBuffersSupport);
30+ NSLog (@" Read-Write Texture Tier: %lu " , (unsigned long )device.readWriteTextureSupport);
31+
32+ // Log texture format capabilities
33+ NSLog (@" Texture Format Support:" );
34+ NSLog (@" Depth24Unorm_Stencil8: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatDepth24Unorm_Stencil8 ] ? @" YES" : @" NO" );
35+ NSLog (@" Depth32Float: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatDepth32Float ] ? @" YES" : @" NO" );
36+ NSLog (@" Depth32Float_Stencil8: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatDepth32Float_Stencil8 ] ? @" YES" : @" NO" );
37+ NSLog (@" BC1_RGBA: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatBC1_RGBA ] ? @" YES" : @" NO" );
38+ NSLog (@" BC2_RGBA: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatBC2_RGBA ] ? @" YES" : @" NO" );
39+ NSLog (@" BC3_RGBA: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatBC3_RGBA ] ? @" YES" : @" NO" );
40+ NSLog (@" BC7_RGBAUnorm: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatBC7_RGBAUnorm ] ? @" YES" : @" NO" );
41+ NSLog (@" PVRTC_RGBA_2BPP: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatPVRTC_RGBA_2BPP] ? @" YES" : @" NO" );
42+ NSLog (@" PVRTC_RGBA_4BPP: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatPVRTC_RGBA_4BPP] ? @" YES" : @" NO" );
43+ NSLog (@" ETC2_RGB8: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatETC2_RGB8] ? @" YES" : @" NO" );
44+ NSLog (@" ASTC_4x4_LDR: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatASTC_4x4_LDR] ? @" YES" : @" NO" );
45+ NSLog (@" ASTC_4x4_HDR: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatASTC_4x4_HDR] ? @" YES" : @" NO" );
46+ NSLog (@" RGBA16Float: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatRGBA16Float ] ? @" YES" : @" NO" );
47+ NSLog (@" RGBA32Float: %@ " , [device supportsTextureSampleCount: 1 pixelFormat: MTLPixelFormatRGBA32Float ] ? @" YES" : @" NO" );
48+
1249 Babylon::Graphics::Configuration config{};
1350 config.Device = device;
1451 config.Width = 600 ;
0 commit comments