Severe glterrain / msaa performance regression on Intel Mac with Metal ANGLE
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
People
(Reporter: jnicol, Assigned: jnicol)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxpe])
Attachments
(1 obsolete file)
With Metal ANGLE we see a severe performance regression on the MSAA subtests of glterrain on Intel Mac.
| 1.WebGL-terrain-alpha-no-AA-yes | 1.51 frame interval < 4 frame interval | 196.503 % | Regression
| 3.WebGL-terrain-alpha-yes-AA-yes | 1.47 frame interval < 3.14 frame interval | 127.273 % | Regression
In the non-AA subtests we get a small (single digit percent) improvement. And on arm we get a single digit percent improvement in all 4 subtests.
I still need to figure out the cause for this. Presumably we are unable to hit some resolve fast path or something like that.
One actionable thing I have found is that the device doesn't support the MTLPixelFormat.depth24Unorm_stencil8 format, so even though we request GL_DEPTH24_STENCIL8 for the depth/stencil attachment, we get given MTLPixelFormat.depth32Float_stencil8, which will require more bandwidth. The test in question doesn't request a stencil buffer, but our webgl code always creates a combined attachment. If we switch to just a depth buffer and use MTLPixelFormat.depth32Float we can recover a modest (5-10%) improvement.
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
On Metal ANGLE we have observed a requested GL_DEPTH24_STENCIL8 format
actually results in MTLPixelFormat.depth32Float_Stencil8 being used,
rather than MTLPixelFormat.depth24Unorm_Stencil8. This is because
MTLDevice.isDepth24Stencil8PixelFormatSupported returns false on both
the Intel and Apple silicon GPUs that were tested.
This results in more memory being used, even in cases where no stencil
buffer was actually requested. To avoid this, only use the combined
depth stencil format when both a depth and stencil buffer are actually
requested.
Updated•3 months ago
|
Comment 2•3 months ago
|
||
Comment on attachment 9616566 [details]
Bug 2057475 - Avoid using combined depth stencil buffer if only depth or stencil buffer is requested. r?#gfx-reviewers
Revision D314319 was moved to bug 2058080. Setting attachment 9616566 [details] to obsolete.
| Assignee | ||
Comment 3•3 months ago
|
||
This regression is definitely genuine, but appears to be a metal/angle limitation rather than something we're doing wrong.
I can't run glterrain in chrome or safari without vsync to get comparable numbers. But if we open this testcase on an Intel Macbook: animate on, 65.5M pixels per view. then toggle antialiasing off and on
Firefox CGL: Antialiasing: 60FPS, No antialising: 60FPS
Firefox ANGLE: Antialiasing: 25FPS, No antialising: 60FPS
Chrome: Antialiasing: 25FPS, No antialising: 60FPS
Safari: Antialiasing: 24FPS, No antialising: 60FPS
So CGL is certainly faster than ANGLE with antialiasing enabled, but it's definitely an ANGLE/Metal limitation shared by all browsers which use it, not an issue with our implementation on top of ANGLE.
I think the route forward here is to file an upstream ANGLE issue, and that since our numbers are still on par with chrome and safari, it shouldn't block shipping webgl on angle.
Description
•