glFinish needed before CGLFlushDrawable to rMBP using Intel GPU

Originator:ccameron
Number:rdar://15682617 Date Originated:2013-12-17
Status:Open Resolved:
Product:OS X Product Version:10.9
Classification:UI/Usability Reproducible:Sometimes
 
Chrome uses a NSOpenGLContext drawing to an NSView to draw its content. On a Retina Macbook Pro, when using the integrated GPU, animated pages will sometimes shake and stutter.

I've narrowed this down to a system synchronization issue. In particular, if I add glFinish before calling CGLFlushDrawable/flushBuffer, then the correct contents appear.

This issue is new on 10.9, and only happens when using the Intel GPU (it goes away when switched to the discrete GPU). I have only seen this on the retina Macbook Pro.

The issue reproduces more easily with lots of GL windows open. I've attached a program to help in this.

Steps to Reproduce:
1. Install Google Chrome
2. Compile and run the attached lots_of_gl_windows.mm (instructions are in the source file).
    - This is not strictly necessary, but make it will make the repro happen more often.
3. Run Chrome from the command line with the flag --disable-gpu-driver-bug-workarounds (so, the line "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-gpu-driver-bug-workarounds" will do it).
4. Open 5 Chrome windows, and navigate to http://www.webkit.org/blog-files/3d-transforms/poster-circle.html in each of them
5. Make sure that the Chrome windows are on top of the other OpenGL windows (cycles through the windows a few times)

Expected Results:
The animations should be smooth (if perhaps slow).

Actual Results:
The animations shudder and flicker as the front and back buffers are swapped inappropriately.

Version:
OS X 10.9, Build 13A603

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!