Open Bug 1366175 Opened 2 years ago Updated 2 years ago

Disable validation in ANGLE to enhance WebGL performacne.


(Core :: Canvas: WebGL, enhancement, P3)





(Reporter: cleu, Unassigned)


(Whiteboard: [gfx-noted])


(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.
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.

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.
Whiteboard: [gfx-noted]
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.

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?
You need to log in before you can comment on or make changes to this bug.