Closed Bug 698212 Opened 8 years ago Closed 8 years ago

Uninitialized video memory with 10.6 Integrated GPU on certain pages


(Core :: Graphics, defect)

Not set





(Reporter: BenWa, Assigned: mattwoodrow)



(Whiteboard: [inbound])


(4 files)

Attached image screenshot
1) Use recent nightly
2) Go to:
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.
Attached file 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.
Blocks: 695275
I should note that the artifacts are happening when the image is fading in. This points to a problem with alpha channels.
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.
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)
Attachment #570838 - Flags: review?(bgirard) → review+
Assignee: nobody → matt.woodrow
Whiteboard: [inbound]
Closed: 8 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.