Open Bug 1805056 Opened 2 years ago Updated 1 year ago

Firefox extremly slow with Canvas in motionmark

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 107
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: amine.chelghaf, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0

Steps to reproduce:

on bionic ubuntu 64 bits
radeon video card
Run https://browserbench.org/MotionMark1.2/
FIREFOX 107.0.1
GOOGLE-CHROME 70.0.3538.77 as a comparison

Actual results:

Google has this :
canvas arcs 160
canvas lines 1770

Firefox has this :
canvas arcs 1
canvas lines 1

Expected results:

Canvas very fast in firefox

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: Canvas2D
Product: Firefox → Core

Please Girls and Guys, a question, how can I hide my email and my name, and only show my nickname ? Thanks in advance.

Severity: -- → S3

Mimine, thank you for reporting. Can you attach about:support to this bug? And can you test also with latest nightly?

Flags: needinfo?(amine.chelghaf)

Sotaro, it is a performance bug with high severity.
Firefox is slow in drawing canvas , it draws the 2D objects very slow.
It has to do with WEBGL or Canvas2D API.
Performance bug with high severity, maybe a regression ?

about:support as an attachement

Flags: needinfo?(amine.chelghaf)
Attached file about:support (deleted) β€”

So it seems there is no hardware acceleration.
about:support
Compositing WebRender (Software)

Does it come from my old video card being not supported or from firefox ?

glxinfo | grep "profile version"

Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0

OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.2
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.2.2

Flags: needinfo?(sotaro.ikeda.g)

:stransky, :rmader, do you know why hardware WebRender is blocked?

Flags: needinfo?(stransky)
Flags: needinfo?(robert.mader)

Mesa from 2018 :)

Flags: needinfo?(robert.mader)
Flags: needinfo?(stransky)
Flags: needinfo?(sotaro.ikeda.g)

Hi Robert,

I don't think the problem comes from the mesa version.
I also use google chrome, and with the same mesa from 2018, hardware acceleration works.

Chrome shows me this :

Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Disabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Disabled

Flags: needinfo?(robert.mader)

Hi. What Chrome does is not relevant for Firefox - it's a different project with a different rendering engine, they run into different driver issues and handle them differently.

But you're still right that I was wrong in comment 8. Your setup is likely running into the rule in https://searchfox.org/mozilla-central/source/widget/gtk/GfxInfo.cpp#764-771, pointing to bug 1673939 and more importantly https://gitlab.freedesktop.org/mesa/mesa/-/issues/3720 (and https://gitlab.freedesktop.org/mesa/mesa/-/issues/7010). https://gitlab.freedesktop.org/mesa/mesa/-/issues/3720#note_1498961 suggests that once NIR is enabled by default for R600 we might be able to allow hardware webrender for the respective Mesa version on.

So maybe Mesa >= 23.0.

Flags: needinfo?(robert.mader)

I can confirm the bug comes from mesa not supporting old Radeon cards.
I tried on an Intel video card and the canevas are working normally.
So maybe Mesa >= 23.0 ?

I can confirm the bug comes from mesa not supporting old Radeon cards.

To be precise, it's not Mesa not supporting the cards, but rather that the Mesa r600 driver has a bug affecting Firefox Webrender forcing us to fall back to software rendering. And unfortunately nobody had/took the time to fix it so far. But now a fix is on the way, hopefully landing in time for 23.0.

Hello,
is it solved in mesa or in firefox ?
Do you have a link where this bug is ?
Thanks in advance

Flags: needinfo?(robert.mader)

See comment 10 :)

Unfortunately it doesn't appear to be solved yet, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/3720#note_1818979

Flags: needinfo?(robert.mader)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: