netkas.org forum
November 19, 2017, 12:25:19 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Information for registering users http://forum.netkas.org/index.php/topic,2246.0.html
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Is metal graphics rendering used by OSX  (Read 23611 times)
netkas
Administrator
Hero Member
*****
Offline Offline

Posts: 809



« on: June 11, 2015, 07:18:45 PM »

That guy in WWDC keynote said OSX now renders it's UI using metal, but is it true?

Update at post #3

Lets find out what are evidences of an app using Metal to render an image, a simple MetalTest application based on xcode7 template which you can find here - http://netkas.org/?p=1405

Using gtx670 for tests.

Lets run it, open IORegistryExplorer and use some terminal magic (lsof -p pid_of_process)



we can see it uses metal by looking at IORegistryExplorer - new child of NVAccelerator was created - IOAccelCommandQueue, used by MetalTest

also lsof shows nvidia driver created some temp files in folder:

/private/var/folders/tb/cm5t5v4x1jzg7tgrhxkzlcz40000gn/C/org.netkas.MetalTest/com.apple.metal/

That's enough to say this application uses Metal.

Now let's check WindowServer:



no IOAccelCommandQueue created, but instead WindowServer uses nvFermiGLContext, hm?

temp files created in folder /private/var/folders/zz/zyxvpxvq6csfxvn_n00000b000002r/C/com.nvidia.OpenGL

even tho WindowServer is linked against both opengl and Metal drivers

/System/Library/Extensions/GeForceMTLDriver.bundle/Contents/MacOS/GeForceMTLDriver
/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver

Evidences indicate WindowServer uses openGL for rendering, not Metal

Lets check Preview:



again no IOAccelCOmmandQueue and temp files in folder
/private/var/folders/tb/cm5t5v4x1jzg7tgrhxkzlcz40000gn/C/com.apple.Preview/com.nvidia.OpenGL

Looks like no Metal again.

So far I haven't found an app from OSX 10.11 that uses Metal to render, maybe I wasn't looking good enough.
« Last Edit: June 15, 2015, 07:34:31 PM by netkas » Logged
cmf
Newbie

Offline Offline

Posts: 8


« Reply #1 on: June 11, 2015, 11:59:17 PM »

yeah, still opengl everywhere. but i'm guessing this will be enabled in a future beta. metal instruments tools are also lacking on os x.
CoreImage has a check (getenv call) for CI_ENABLE_METAL_DEFAULT, but so far no observable changes.
Logged
netkas
Administrator
Hero Member
*****
Offline Offline

Posts: 809



« Reply #2 on: June 15, 2015, 07:23:30 PM »

Okay guys. I must admit I was a little bit wrong. Now tested intel HD Graphics 5000 and it seems it utilizes Metal there for both WindowServer and Preview apps.

RC1 seems to be intel-only metal gui.



Presence of both default.metallib in used resources and IGAccelCommandQueue is a good evidence.

It looks like currently gui uses both Metal and OpenGL, because removing openGL driver ( file /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver ) leads to no HW acceleration for GUI, WindowServer stops using Metal (not even loads HD5000MTLDriver), but little cube Metal app still works HW accelerated.
« Last Edit: June 15, 2015, 07:33:44 PM by netkas » Logged
fiatlux
Newbie

Offline Offline

Posts: 11


« Reply #3 on: June 17, 2015, 10:05:59 PM »

RC1 seems to be intel-only metal gui.

I must admit being a bit confused about the benefits that Metal would bring over OpenGL and/or OpenCL on the desktop.

I understood Metal as a modern API that better suited SOCs where the CPU and GPU cores share memory etc...

This made a lot of sense on mobile iOS platforms, probably some sense on Intel CPUs with integrated graphics, but is Metal really tuned for discrete PCIe graphic cards?
Logged
Asgorath
Sr. Member
****
Offline Offline

Posts: 277


« Reply #4 on: June 18, 2015, 04:38:09 AM »

This made a lot of sense on mobile iOS platforms, probably some sense on Intel CPUs with integrated graphics, but is Metal really tuned for discrete PCIe graphic cards?

Yes, just like DX12 and Vulkan are better than older APIs, the low-overhead nature of Metal helps with the widening gap between CPU performance and GPU performance.  That is, the lower overhead will mean the CPU will be able to feed enough work to the GPU to actually stress it, unlike what we have today with OpenGL.
Logged
mysticalos
Hero Member
*****
Offline Offline

Posts: 611


« Reply #5 on: July 09, 2015, 10:25:42 AM »

just curious, as this info was all from DP1. Any changes in Dp2 and DP3?
Logged
netkas
Administrator
Hero Member
*****
Offline Offline

Posts: 809



« Reply #6 on: July 09, 2015, 12:56:37 PM »

No changes
Logged
DreamSeason
Newbie

Offline Offline

Posts: 3

p.H indeed :D


« Reply #7 on: July 30, 2015, 02:57:33 AM »

How is it going with DP5 or PB3? Is OpenGL for Intel cards completely gone?
Logged

ATI HD5650M
Asgorath
Sr. Member
****
Offline Offline

Posts: 277


« Reply #8 on: July 30, 2015, 05:10:10 PM »

How is it going with DP5 or PB3? Is OpenGL for Intel cards completely gone?

Apple won't be removing OpenGL any time soon, there are too many apps/components that require it (even if they've switched the UI to use Metal for the Intel GPUs).
Logged
mysticalos
Hero Member
*****
Offline Offline

Posts: 611


« Reply #9 on: September 23, 2015, 08:09:59 PM »

BTW, did apple ever enable metal for AMD/nvidia GPUs?
Logged
Ferazel
Newbie

Offline Offline

Posts: 6


« Reply #10 on: September 28, 2015, 12:39:49 AM »

BTW, did apple ever enable metal for AMD/nvidia GPUs?

I'm not positive, but I wouldn't be surprised if it was not enabled for these 3rd-party cards. Blizzard has said that 3D performance is "fair" for the GM release of El Capitan and they hope that subsequent releases will improve the performance. So, the Nvidia and AMD drivers for Metal may be lacking with Intel being the primary focus for Apple. Or Apple may be writing the drivers themselves for Intel hardware while relying on AMD and NVIDIA to provide the hard work work for Metal on their end. Who I'm sure are thrilled since they not only have to do the same for Direct3D 12 but also Vulkan, so their driver teams might be stretched a little thin supporting all of these new APIs and likely putting Metal on the low-end of the priority.
Logged
mysticalos
Hero Member
*****
Offline Offline

Posts: 611


« Reply #11 on: October 01, 2015, 10:56:38 PM »

Now if only I could do a heaven metal vs heaven GL. But alas I can't find anything to even TEST metal anywhere on web. Seems despite 10.11 being public now.
Two things simply don't exist anywhere:
1. Anything that uses metal
2. A single content blocker for safari 9.0 DESKTOP
Logged
jeanlain
Full Member
***
Offline Offline

Posts: 238


« Reply #12 on: October 02, 2015, 12:45:33 PM »

I had the dock crash a few times, and here's what the console says.

Quote
Process:               Dock [2178]
Path:                  /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
Identifier:            com.apple.dock
Version:               1.8 (1617)
Build Info:            Dock-1617000000000000~19
Code Type:             X86-64 (Native)
Parent Process:        Huh [1]
Responsible:           Dock [2178]
User ID:               501

Date/Time:             2015-10-02 13:21:31.626 +0200
OS Version:            Mac OS X 10.11 (15A284)
Report Version:        11
Anonymous UUID:        903C81A0-02AC-1243-D54F-957648FB270C

Sleep/Wake UUID:       ADD2D8B3-11E3-43EC-A94B-C24085EDD6D5

Time Awake Since Boot: 1300 seconds
Time Since Wake:       840 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000695de5894870
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x695de5894870:
    __LINKEDIT             00001234500b5000-00001234500bd000 [   32K] r--/rwx SM=COW  /System/Library/Extensions/GeForceMTLDriverWeb.bundle/Contents/MacOS/GeForceMTLDriverWeb
-->
    STACK GUARD            0000700000000000-0000700000001000 [    4K] ---/rwx SM=NUL  stack guard for thread 4
... (snip)
Bolding mine.
Dose it means that the dock somehow uses the Metal driver?
Logged
netkas
Administrator
Hero Member
*****
Offline Offline

Posts: 809



« Reply #13 on: October 02, 2015, 05:31:50 PM »

Doesn't mean anything
Logged
mysticalos
Hero Member
*****
Offline Offline

Posts: 611


« Reply #14 on: October 02, 2015, 06:18:36 PM »

BTW netkas i tried that metal test app from the RU site you linked a while back to test the geforce web drivers and that app just crashes on launch. Is this because app needs updating, or because the geforce driver metal is not quite working yet?
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!