Avoid using combined depth stencil buffer if context only requests depth or stencil
Categories
(Core :: Graphics: CanvasWebGL, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: jnicol, Assigned: jnicol)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert, Whiteboard: [fxpe])
Attachments
(1 external file)
If either a depth or stencil buffer is requested, WebGL context creation will create a combined GL_DEPTH24_STENCIL8 buffer (if supported).
On Metal ANGLE, we have observed that this actually results in a Metal buffer of format MTLPixelFormatDepth32Float_Stencil8 rather than MTLPixelFormatDepth24Unorm_Stencil8. (The latter of which is deprecated, and MTLDevice.isDepth24Stencil8PixelFormatSupported returns false on both the Intel and Apple silicon GPUs I tested).
In cases where only a depth buffer or only a stencil buffer is requested, we should avoid using the combined format. This gives us an ~8% performance improvement on glterrain with Metal ANGLE on an Intel Mac. (But still a huge regression versus not using Metal ANGLE)
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 3•3 months ago
|
||
| bugherder | ||
Comment 4•3 months ago
|
||
| perf-alert | ||
Perfherder has detected a talos performance change from push 61b025a529d31c346c23d64e3569fe669407ab60.
No action is required from the author; this comment is provided for informational purposes only.
| Improvement | Test | Platform | Options | Absolute values [old vs new] |
|---|---|---|---|---|
| 9% | glterrain (doc) | macosx1470-64-shippable | e10s fission stylo webrender | 1.09 -> 0.99 |
| 9% | glterrain (doc) | macosx1470-64-shippable | e10s fission stylo webrender-sw | 0.98 -> 0.89 |
| 9% | glterrain (doc) | macosx1470-64-shippable | e10s fission stylo webrender | 1.08 -> 0.99 |
Need Help or Information?
If you have any questions, please reach out to fbilt@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
Updated•3 months ago
|
| Assignee | ||
Comment 5•3 months ago
|
||
Presumably on native GL the driver also didn't support a 24+8 combined depth+stencil buffer, so was silently using 32+8 too. hence the performance improvement on native GL too
Updated•2 months ago
|
Description
•