Uninitialized video memory with 10.6 Integrated GPU on certain pages

RESOLVED FIXED in mozilla10



6 years ago
6 years ago


(Reporter: BenWa, Assigned: mattwoodrow)


Mac OS X

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [inbound])


(4 attachments)



6 years ago
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.

Comment 1

6 years ago
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.

Comment 2

6 years ago
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.

Comment 3

6 years ago
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.
Blocks: 695275

Comment 4

6 years ago
I should note that the artifacts are happening when the image is fading in. This points to a problem with alpha channels.

Comment 5

6 years ago
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.

Comment 6

6 years ago
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.

Suggestions appreciated.
Attachment #570838 - Flags: review?(bgirard)


6 years ago
Attachment #570838 - Flags: review?(bgirard) → review+

Comment 7

6 years ago
Assignee: nobody → matt.woodrow
Whiteboard: [inbound]

Comment 8

6 years ago
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
So was this a Apple OpenGL bug? Or our bug?
You need to log in before you can comment on or make changes to this bug.