Uninitialized video memory with 10.6 Integrated GPU on certain pages

RESOLVED FIXED in mozilla10

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: BenWa, Assigned: mattwoodrow)

Tracking

unspecified
mozilla10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(4 attachments)

(Reporter)

Description

6 years ago
Created attachment 570490 [details]
screenshot

STR:
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.
(Reporter)

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.
(Reporter)

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.
(Reporter)

Comment 3

6 years ago
Regression started after this push:
https://hg.mozilla.org/integration/mozilla-inbound/log/d7f3bfc7cd46

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
(Reporter)

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.
(Assignee)

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.
(Assignee)

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)
(Reporter)

Updated

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

Comment 7

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/26d38dea2c7c
Assignee: nobody → matt.woodrow
Whiteboard: [inbound]

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/26d38dea2c7c
Status: NEW → RESOLVED
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.