Performance Inspector Show GPU/CPU Execution?

toneburst's picture

Would it be possible for Performance Inspector to be able to show if CIFilter and/or GLSL patches were being executed on the GPU, or were falling-back to software-rendering? I have a feeling this is a pretty complex issue, but it would be good to know if a particular chunk of CIKernel/GLSL code was causing software-fallback or not.

Any thoughts, guys?

a|x http://machinesdontcare.wordpress.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
no need

To see if CoreImage executes in software mode or not, simply look for lines like this in Console.app:

2/25/09 11:51:00 AM [0x0-0x466466].com.apple.QuartzComposer.editor[53251] CoreImage: multiplyEffect: falling back to software 
2/25/09 11:51:02 AM [0x0-0x466466].com.apple.QuartzComposer.editor[53251] CoreImage: multiplyEffect: fragment program exceeds native limits: 
2/25/09 11:51:02 AM [0x0-0x466466].com.apple.QuartzComposer.editor[53251]   7/11 attrs, 16/16 temps, 17/32 params 106/96 insns 
2/25/09 11:51:02 AM [0x0-0x466466].com.apple.QuartzComposer.editor[53251]   76/64 alu insns, 30/32 tex insns, 2/4 tex indirections 

To see if GLSL executes on the GPU, inspect the output -- if you see what you expect, it's working on the GPU, otherwise, it fails (fragment shaders are tricky to virtualize in software -- vertex shaders not as difficult). The graphics card drivers can silently drop to software, but no one has access to when that happens -- when compiling GLSL shaders, you simply get a pass/fail result, and possibly a descriptive string saying why it failed ("Parse Error on line 42", or "76/64 alu insns, 30/32 tex insns, 2/4 tex indirections" or similar).