Created attachment 570490 [details]
1) Use recent nightly
2) Go to: http://www.dinodday.com/?page_id=6
3) Click on a screenshot
When the screenshot the white area is expending you can see uninitialized video memory before the screenshot loads. It seems like it might be general memory.
The bug only happens when I'm on integrated on nightly. It doesn't happen on Aurora/Firefox when I force Integrated. The bug does not happen when forcing Discrete on nightly. Tested on 10.6.8.
Created attachment 570722 [details]
Reduce test case
This test case is a bit reduced but it needs to be reduced further. Obfuscated jquery code is making this difficult.
Regression started after this push:
Matt, with some patches that Jeff and I landed the integrated GPU will be used by default on dual GPU macbook pros (except for WebGL, non flash/quicktime plugins). This bug is worth fixing.
I should note that the artifacts are happening when the image is fading in. This points to a problem with alpha channels.
Created attachment 570837 [details] [diff] [review]
Initialize textures to blue
Debugging patch that initializes all ImageLayerOGL textures to solid blue to determine the source of uninitialized memory.
This gives us blue instead of uninitialized memory, so the problem is definitely that we're not uploading to the full area of the texture. I really can't see how this is possible since we pass the same size to InitTexture as we do to UploadSurfaceToTexture.
Interestingly enabling MOZ_GL_DEBUG fixes the problem, which suggests some sort of synchronization issues (since it calls glFinish with every normal GL command), I can't see anything we're doing here (uploading textures) that would be asynchronous though.
Created attachment 570838 [details] [diff] [review]
Let UploadSurfaceToTexture create the texture
Instead of calling InitTexture, we can just let UploadSurfaceToTexture create the texture (and do the upload via glTexImage2D, not glTexSubImage2D).
This fixes the bug, but doesn't get us any closer to figuring out what was actually wrong before.
I'm not particularly happy with wallpapering over this bug, but it might be worth doing this in the meantime.
So was this a Apple OpenGL bug? Or our bug?