When loading a webgl water demo it has wrong colors

Bug #1591727 reported by geppo61
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When loading a webgl water demo it has wrong colors

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: firefox-launchpad-plugin (not installed)
ProcVersionSignature: Ubuntu 4.4.0-24.43-powerpc64-smp 4.4.10
Uname: Linux 4.4.0-24-powerpc64-smp ppc64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: powerpc
CurrentDesktop: MATE
Date: Sun Jun 12 19:13:36 2016
InstallationDate: Installed on 2016-04-08 (65 days ago)
InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Beta powerpc (20160323.1)
SourcePackage: firefox-launchpad-plugin
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

User Agent: Mozilla/5.0 (X11; Linux ppc64; rv:19.0) Gecko/20100101 Firefox/19.0 SeaMonkey/2.16
Build ID: 20130224111411

Steps to reproduce:

View a page with a WebGL canvas, using Firefox 19 on Linux/PPC.

Actual results:

The wrong colours appeard.

Example:

gl_FragColor = vec4(0.0,1.0,1.0,1.0); results in a transparent pixel (should be cyan)
gl_FragColor = vec4(1.0,0.0,1.0,1.0); results in a yellow pixel (should be purple)
gl_FragColor = vec4(1.0,1.0,0.0,1.0); results in a purple pixel (should be yellow)
gl_FragColor = vec4(1.0,1.0,1.0,0.5); results in a cyan pixel (should be semitransparent white)

Since the order of the components have been completely reversed, this looks like an endianness issue, and I saw several places in the code which seemed to assume that gfxASurface::ImageFormatARGB32 actually meant BGRA (not necessarily true, since it's supposed to use native endianness).

Expected results:

The actual colours requested by the fragment shader should have been displayed.

Revision history for this message
In , Steve-c (steve-c) wrote :

This is a duplicate of bug 817356

Revision history for this message
In , Steve-c (steve-c) wrote :

ignore my previous comment

Revision history for this message
In , Tiziana-sel (tiziana-sel) wrote :

Marcus, can you still reproduce this?
Can you provide a testcase or a URL to better reproduce it?

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

Alas, it seems like WebGL is completely broken in Firefox 23.0, all I get is

"It doesn't appear your computer can support WebGL.
Click here for more information."

With Seamonkey 2.17.1 though my testpage

http://mc.pp.se/webgl/webgltest.html

seems to work correctly (cube is yellow). So maybe the actual colour bug was fixed in Firefox too, although I can't verify due to the other issue...

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

Seamonkey 2.20 also displays correct colours.

Revision history for this message
In , Tiziana-sel (tiziana-sel) wrote :

Running your testpage on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0 I see the yellow cube.

But it should be tested on a Linux platform, too.

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

Um, testing on Intel doesn't really make any sense though...

Revision history for this message
In , Steve-c (steve-c) wrote :

Marcus, try setting webgl.force-enabled=true in about:config

If I set webgl.force-enabled = true in about:config
I can see the yellow cube

I have tested this on ppc32 with a firefox build that is between ff28 and ff29 (ff29+ is currently broken on ppc32 )

I have also tested this with mozilla-central on a ppc64 machine.
I get very poor framerates but that is what one expects with software rendering.

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

Hi Steve.

Alas, any WebGL attempts give me a crash with

ATTENTION: default value of option force_s3tc_enable overridden by environment.
LLVM ERROR: Do not know how to split the result of this operator!

right now. This happens both in Firefox and Seamonkey. It seems to be related to
Mesa using the llvmpipe driver. It used to use DRM acceleration with my Radeon HD
card, but that seems to have broken in some Mesa update... :-(

Revision history for this message
In , Marcus Comstedt (marcus-mc) wrote :

Also tried on the Mac Mini G4, which still seems to have working HW acceleration. There I get the "It doesn't appear your computer can support WebGL." message though, even with webgl.force-enabled set to true... (FF28, Ubuntu 14.04) Weird.

Revision history for this message
geppo61 (icjtqr-gmail) wrote :
Revision history for this message
Rolf Leggewie (r0lf) wrote :

http://madebyevan.com/webgl-water/ works fine here in trusty.

Why do yo think this would be a bug in firefox-launchpad-plugin? I think if there is a bug, it's in Firefox itself or move likely in the driver of your graphics card. Do you use an Nvidia card?

affects: firefox-launchpad-plugin (Ubuntu) → firefox (Ubuntu)
Revision history for this message
Rolf Leggewie (r0lf) wrote :

"more likely"

Revision history for this message
geppo61 (icjtqr-gmail) wrote : Re: [Bug 1591727] Re: When loading a webgl water demo it has wrong colors

On Mon, Jul 25, 2016 at 5:53 PM, Rolf Leggewie <email address hidden>
wrote:

> "more likely"
>
> ** Attachment added: "WFM.jpg"
>
> https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1591727/+attachment/4707222/+files/WFM.jpg
>
>
No. I am using a ATI Radeon HD4670 1GB DDR3 PCI-X Card

> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1591727
>
> Title:
> When loading a webgl water demo it has wrong colors
>
> Status in firefox package in Ubuntu:
> New
>
> Bug description:
> When loading a webgl water demo it has wrong colors
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: firefox-launchpad-plugin (not installed)
> ProcVersionSignature: Ubuntu 4.4.0-24.43-powerpc64-smp 4.4.10
> Uname: Linux 4.4.0-24-powerpc64-smp ppc64
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: powerpc
> CurrentDesktop: MATE
> Date: Sun Jun 12 19:13:36 2016
> InstallationDate: Installed on 2016-04-08 (65 days ago)
> InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Beta powerpc
> (20160323.1)
> SourcePackage: firefox-launchpad-plugin
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1591727/+subscriptions
>

On the 32bit PowerPC Machine Apple PowerBook G4 i(with Jessie Debian) it is
working. Slowly but working.

In both machines opengl is working, as the quake screenshot.
--
Ciao e buona giornata.

"GP! In mezzo al campo stai proprio schifoso!"
Coach M.Russo

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

What graphic card are you using?

When answered please set status back to "confirmed".

Changed in firefox (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Medium
Revision history for this message
geppo61 (icjtqr-gmail) wrote :

Ati radeon hd 4670, but opengl is working good. I suppose the issue is a
abgr rgba endiannes in big endian machine in webgl implementation...

Il 14/set/2016 12:56 AM, "Alberto Salvia Novella" <email address hidden>
ha scritto:

> What graphic card are you using?
>
> When answered please set status back to "confirmed".
>
> ** Changed in: firefox (Ubuntu)
> Status: Confirmed => Incomplete
>
> ** Changed in: firefox (Ubuntu)
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1591727
>
> Title:
> When loading a webgl water demo it has wrong colors
>
> Status in firefox package in Ubuntu:
> Incomplete
>
> Bug description:
> When loading a webgl water demo it has wrong colors
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: firefox-launchpad-plugin (not installed)
> ProcVersionSignature: Ubuntu 4.4.0-24.43-powerpc64-smp 4.4.10
> Uname: Linux 4.4.0-24-powerpc64-smp ppc64
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: powerpc
> CurrentDesktop: MATE
> Date: Sun Jun 12 19:13:36 2016
> InstallationDate: Installed on 2016-04-08 (65 days ago)
> InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Beta powerpc
> (20160323.1)
> SourcePackage: firefox-launchpad-plugin
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/
> 1591727/+subscriptions
>

Revision history for this message
K1773R (k1773r) wrote :

im using nouveau and i see the same, so its not a driver issue.

Changed in firefox (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
K1773R (k1773r) wrote :

nvm, it was radeon (switched my g5's). chromium-bsu has the same problem for example.

Revision history for this message
Paul White (paulw2u) wrote :

We are sorry that we do not always have the capacity to review all reported bugs in a timely manner. You reported this bug some time ago and there have been many changes in Ubuntu since that time.

Do you still see a problem related to the one that you reported in a currently supported version of Ubuntu? Please let us know if you do and in which version of Ubuntu otherwise this report can be left to expire in approximately 60 days time.

Thank you for helping make Ubuntu better.

Paul White
[Ubuntu Bug Squad]

Changed in firefox (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
K1773R (k1773r) wrote :

Still an issue.

Changed in firefox (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
geppo61 (icjtqr-gmail) wrote :

The bug still persists in Firefox (47.0 powerpc in Ubuntu 16.04) but it
works fine using ArcticFox browser in the same system. Apart from the
endianness issue for colors RGBA <---> ABGR..

On Sat, Jan 12, 2019 at 3:59 PM K1773R <email address hidden> wrote:

> Still an issue.
>
> ** Changed in: firefox (Ubuntu)
> Status: Incomplete => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1591727
>
> Title:
> When loading a webgl water demo it has wrong colors
>
> Status in firefox package in Ubuntu:
> Confirmed
>
> Bug description:
> When loading a webgl water demo it has wrong colors
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: firefox-launchpad-plugin (not installed)
> ProcVersionSignature: Ubuntu 4.4.0-24.43-powerpc64-smp 4.4.10
> Uname: Linux 4.4.0-24-powerpc64-smp ppc64
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: powerpc
> CurrentDesktop: MATE
> Date: Sun Jun 12 19:13:36 2016
> InstallationDate: Installed on 2016-04-08 (65 days ago)
> InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Beta powerpc
> (20160323.1)
> SourcePackage: firefox-launchpad-plugin
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1591727/+subscriptions
>

--
Ciao e buona giornata.

"GP! In mezzo al campo stai proprio schifoso!"
Coach M.Russo

Revision history for this message
Paul White (paulw2u) wrote :

Thanks for confirming
Reported upstream in 2013 but no activity since 2014
https://bugzilla.mozilla.org/show_bug.cgi?id=849632

Revision history for this message
In , Paul White (paulw2u) wrote :

Also reported at https://bugs.launchpad.net/bugs/1591727
with http://madebyevan.com/webgl-water/ as an example of the issue.

Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Msirringhaus (msirringhaus) wrote :

Created attachment 9108439
mozilla-bmo849632.patch

So, I think this is skia once again. Skia can only handle little endian. Workarounds for other things were to swizzle skias input.

I have a preliminary patch that fixes some of the color-issues for the webgl-water-example and
http://mc.pp.se/webgl/webgltest.html

It swizzles pixels read from webgl right at the source.
Water-surface is still too blue and other webgl-examples are not working yet (e.g. firstpersontetris.com )

Any more hints would be welcome

Revision history for this message
In , Msirringhaus (msirringhaus) wrote :

Created attachment 9108732
mozilla-bmo849632.patch

Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.