Open
Bug 1366175
Opened 7 years ago
Updated 2 years ago
Disable validation in ANGLE to enhance WebGL performacne.
Categories
(Core :: Graphics: CanvasWebGL, enhancement, P3)
Tracking
()
NEW
People
(Reporter: cleu, Unassigned)
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files)
In gecko's code, we have done validations for WebGL calls, which makes ANGLE's internal validation somewhat redundant, we should try to disable ANGLE's validations.
Comment hidden (mozreview-request) |
Reporter | ||
Comment 2•7 years ago
|
||
We can skip ANGLE's validations in its gl call entrypoints by passing special attribute.
However, skipping these validations has no significant performance improvement.
I am now investigating if ANGLE has other options to disable more validations.
Reporter | ||
Comment 3•7 years ago
|
||
I have found that ANGLE has some mandatory validation functions like ValidateDrawElements and ValidateDrawArrays occupied a small but more noticeable time than other validation functions.
https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp#762
https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp#785
The reason why they cannot be skipped is because they also take charge of calculating the index range of the vertex set for further operations.
I think we will have more noticeable performance gain if we can hack ANGLE to bypass them.
However, it would not be good for further ANGLE update and integration.
Updated•7 years ago
|
Whiteboard: [gfx-noted]
Reporter | ||
Comment 4•7 years ago
|
||
Here is some test about the performance difference among different validation skipping schemes.
It appears that the performance difference is not very significant.
I doubt how much can we improve the performance via disabling these validations even with ANGLE modified.
Reporter | ||
Comment 5•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=364654f3b2da718e3b2b7d67855567fd7576d214
Pushed a try to check whether bypassing these validations will generate regressions or not.
Reporter | ||
Comment 6•7 years ago
|
||
It seems that mochitest-gl has no issue after removing these validations,
I think we can disable these validation without harm, maybe land the skip validation attribute patch first since it does not need to modify ANGLE?
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•