Closed Bug 977963 Opened 10 years ago Closed 10 years ago

[Linux] Black layers after enabling texture_from_pixmap support

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: johns, Assigned: johns)

References

Details

Attachments

(2 files, 1 obsolete file)

With texture_from_pixmap support (bug 973227) enabled, we end up with black layers all over.

Possibly related to the same issue from the previous (now-gone) texture_from_pixmap implementation: bug 777170
I assumed this was just caused by component alpha, so I disabled the TextureClient for everything, but B8G8R8X8 and this still happens. Otherwise this would have been a good compromise for now.
Component alpha uses B8G8R8X8 format textures! Instead of creating one B8G8R8A8 texture, we create two B8G8R8X8 ones, and paint one black and one white.
Ok let's just disable this code until somebody who understands how this stuff works can take a look.
Attached patch disabled (obsolete) — Splinter Review
Attachment #8388174 - Flags: review?(matt.woodrow)
(In reply to Tom Schuster [:evilpie] from comment #4)
> Created attachment 8388174 [details] [diff] [review]
> disabled

For the benefit of those playing along at home, this code segment was moved from CompositableClient.cpp to TextureClient.cpp by Bug 963073.
(In reply to Tom Schuster [:evilpie] from comment #4)
> Created attachment 8388174 [details] [diff] [review]
> disabled

-#ifdef GL_PROVIDER_GLX
+#if 0

I think it would be better to leave the #ifdef here and nest an #if 0, #endif inside of it.
This would make it easier for others to figure out how to revert this change.
Blocks: 973035
Blocks: 978282
Attached patch updatedSplinter Review
Thanks for the tip
Attachment #8388174 - Attachment is obsolete: true
Attachment #8388174 - Flags: review?(matt.woodrow)
Attachment #8388208 - Flags: review?(matt.woodrow)
Attachment #8388208 - Flags: review?(matt.woodrow) → review+
Whiteboard: [leave open]
Depends on: 982400
Depends on: 1000542
No longer depends on: 1000542
So I tried re-enabling this to discover that it has regressed further: now the browser window is 100% black. I bisected that to:

> Bug 971914 - Make TextureSourceOGL responsible for tracking filter state. r=nical
> https://hg.mozilla.org/mozilla-central/rev/badf9a3d3f79

I'm not sure if the full-black screen is just this bug being aggravated by the immediate GL call, or a new issue :(
So changing this filter to operate on LOCAL_GL_TEXTURE_2D fixes the all-black-screen issue, but I have *no idea* if that's the right thing to be doing here!

Additionally, I can't reproduce the black texture issue anymore, so it's possible the TextureSourceOGL changes have fixed it, or I didn't test for long enough. I'm going to stick this patch in my local build for a while and see if my textures remain full of color or not.
Attachment #8413085 - Flags: review?(matt.woodrow)
Attachment #8413085 - Flags: review?(matt.woodrow) → review+
(In reply to John Schoenick [:johns] from comment #11)
> Created attachment 8413085 [details] [diff] [review]
> Fix and re-enable linux glX texture_from_pixmap support
> 
> So changing this filter to operate on LOCAL_GL_TEXTURE_2D fixes the
> all-black-screen issue, but I have *no idea* if that's the right thing to be
> doing here!
> 
> Additionally, I can't reproduce the black texture issue anymore, so it's
> possible the TextureSourceOGL changes have fixed it, or I didn't test for
> long enough. I'm going to stick this patch in my local build for a while and
> see if my textures remain full of color or not.

This seems to work for me.  It fixes the Black texture issues for me.  I used to be able to reproduce this with ease either by scrolling my inbox in Gmail, or by opening and closing the notification display in Facebook.  This also fixes the issue I reported in Bug 1000542.
I have tested this with the xorg drivers with multiple AMD/ATI graphics systems as well as Intel graphics and Nvidia graphics.  This seems to fix the original black layers issues in this bug but also fixes the issue I raised in bug 1000542.

Additionally, since running with this new patch included in my bu8lds I no longer see the random scrolling issues under Linux (but that might be wishful thinking).

I think we should get this landed before tomorrows uplift since we always have the initial patch on this bug to just enable textures from pixmaps under Linux in our back pocket if it proves later to create a new issue.
(In reply to Bill Gianopoulos [:WG9s] from comment #13)

> have the initial patch on this bug to just enable textures from pixmaps
                                             ^^^^^^
                                             disable
I also haven't seen the black layer issue in a few days of using this, so it seems some other OGL compositing fixes resolved this in the meantime:

https://hg.mozilla.org/integration/mozilla-inbound/rev/d762dfa90990
Whiteboard: [leave open]
https://hg.mozilla.org/mozilla-central/rev/d762dfa90990
Assignee: nobody → jschoenick
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Target Milestone: mozilla32 → mozilla31
Nice. \o/ Thanks for fixing this!
You need to log in before you can comment on or make changes to this bug.