Wednesday, December 03, 2008

Fun With Menubars

My Mac Pro has just gotten weirder - I put a Radeon HD 3870 into the second PCIe x16 slot. (The machine comes with  a GeForce 8800.)  I now have one monitor in each.

So here's where things get fun:
  • Start X-Plane.  60 fps.
  • Drag the window to the second monitor.  30 fps.
  • Quit, move the menu bar to the second monitor, restart.  (X-Plane is now on the right.)  160 fps.
  • Drag the window back to the primary monitor on the left.  100 fps.
What's going on?  Two things:
  • On OS X, X-Plane's graphics are rendered by one video card, and that video card (in 921) is the card that has the menu on one of its monitors.
  • When an OpenGL window is displayed on a monitor that is not attached to the video card that is doing the rendering, OS X will copy the image from one video card to another, at a cost of some framerate.
So what's going on above?  Well, the 60 fps is my 8800.  When I drag the window, the OS starts copying the graphics, slowing fps.  When I move the menu bar, the 3870 does the rendering, and we get much higher fps.  Once again, put the window on the monitor that is not attached to the video card, and fps hit.

Final note: fps tests of the 8800 vs 3870 with X-Plane 921:

Fps test 2, 8800: 46,49,51
Fps test 2, 3870: 70,75,80
Fps test 3, 8800: 24,25,25
Fps test 3, 3870: 40,41,43

In other words, the 3870 is significantly faster.  I believe that this is due to the OS X drivers, not the cards themselves.  Note that the 3870 is in a PCIe 1.0 slot and the 8800 is in a PCIe 2.0 slot.

9 comments:

Anonymous said...

Thx, Ben for this!
I am using the same MacPro as you, 8-core, 6GB and 8800 with 512MB. I ordered that after my 20" iMac for best results at the frames. But according to the hardware I was not so happy with the framerate. I thought I should have been more. Even when there are a lot of clouds around my frames still drop down to the lowest. I never tried it out in WindowsXP, wich is also installed here on a second harddrive.
Andreas

Benjamin Supnik said...

You should try windows or linux and see if the fps are better - for a GeForce 8 card, they will be.

Anonymous said...

Could we get Apple/Nvidia to improve the GF8 drivers somehow?

Benjamin Supnik said...

You could file another radar bug - I've already done that, as have other developers.

Anonymous said...

Can you tell me if you use last ATI drivers Ben? No problem at all with that?

Benjamin Supnik said...

The only setup that will use BOTH cards is OS X. Since the NV card is primary, the only ATI drivers I used in this setup are theones that ship with the latest OS X patch - and they are fine!

Anonymous said...

Thanks Ben. Does it look like they'll do anything about it?

Anonymous said...

I'm sure that this is posted somewhere, but I'm not even sure where to start looking--Ben, it looks from your post that you are using a standardized FPS test. May I know the specs so that I may run it on my system? Thanks.

Benjamin Supnik said...

Hi Dave,

Take a look here

http://wiki.x-plane.com/Timedemo_and_Framerate_Test

I think I used 921 with --fps_test=1, --fps_test=2 and --fps_test=3.