Open Bug 1366175 Opened 2 years ago Updated 2 years ago
Disable validation in ANGLE to enhance Web
GL performacne .
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.
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.
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.
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.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=364654f3b2da718e3b2b7d67855567fd7576d214 Pushed a try to check whether bypassing these validations will generate regressions or not.
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?
2 years ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.