Closed
Bug 1363436
Opened 8 years ago
Closed 5 years ago
Remove WebGLContext::ValidateBufferFetching() for improving the performance
Categories
(Core :: Graphics: CanvasWebGL, enhancement, P3)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: daoshengmu, Unassigned)
References
Details
Attachments
(2 files)
According to Bug 1358977 Comment 7, we have a performance issue at WebGLContext::ValidateBufferFetching, and it seems to be unnecessary for us.
Comment hidden (mozreview-request) |
Reporter | ||
Comment 2•8 years ago
|
||
After applying this patch, the FPS will be increased to 59 from 53. It gains 11.3% improvement.
Comment 3•8 years ago
|
||
Daosheng, there is a 'override' type[1] of gfx preferences in gfxPrefs.h.
I think you can create a validationbypass pref that depends on another gfxPrefs::OverrideBase_ANGLE(). Then we can bypass validation only when ANGLE is enabled.
Jeff, do you have any concern about this approach? I think it doesn't add overhead to maintain validation flow and we can gain extra fps in comment 2 easily.
[1]http://searchfox.org/mozilla-central/source/gfx/thebes/gfxPrefs.h#497
Flags: needinfo?(jgilbert)
Comment 4•8 years ago
|
||
We should first try to redo this validation so that we don't need to skip it. It's really hard to tell when ANGLE changes something, and some of these validations have poor test coverage. We also need this validation to be fast on all non-ANGLE platforms, so there's value to first trying to do validation fast everywhere.
For ANGLE, we're actually more interested in skipping ANGLE's validation, not our own. It looks like ANGLE has support for this, but it doesn't seem to be being used by us yet. I thought we tried to opt into this, but at the very least, it's not being done presently.
If someone could take a look at opting in to ANGLE's skip-validation mode, that would likely be more worth our time.
Flags: needinfo?(jgilbert)
Comment 5•8 years ago
|
||
ANGLE does have some mechanism which can bypass part of its validations without changing it, if we pushed (0x31b3, LOCAL_GL_TRUE) in attribute map when we are creating the context, ANGLE will bypass some of its validation.
However, it can only bypass some validation which are not that significant, result in little performance gain.
Do we need to modify AGNLE? I think it would need more effort when we are integrating newer ANGLE.
In addition, WebGLContext::ValidateBufferFetching is not needed only when we are using ANGLE on Windows, maybe we should try just bypass it only if we are using ANGLE on Windows, I think it should be easier to implement.
Comment hidden (mozreview-request) |
Comment 7•8 years ago
|
||
(In reply to Michael Leu[:Lenzak](UTC+8) from comment #5)
> ANGLE does have some mechanism which can bypass part of its validations
> without changing it, if we pushed (0x31b3, LOCAL_GL_TRUE) in attribute map
> when we are creating the context, ANGLE will bypass some of its validation.
>
> However, it can only bypass some validation which are not that significant,
> result in little performance gain.
>
> Do we need to modify AGNLE? I think it would need more effort when we are
> integrating newer ANGLE.
>
> In addition, WebGLContext::ValidateBufferFetching is not needed only when we
> are using ANGLE on Windows, maybe we should try just bypass it only if we
> are using ANGLE on Windows, I think it should be easier to implement.
Again, we should optimize our buffer fetching validation, not disable it. We need to run it on all platforms, and it should therefore be fast regardless of if we can skip it on Windows.
Comment 8•8 years ago
|
||
I have tested the running time difference between bypass or not bypass WebGLContext::ValidateBufferFetching().
The test benchmark is Epic ZenGarden-wasm, and my GFX card is GTX1070.
w/o bypassing: 82210ms
w/ bypassing: 81097ms
The performance gain is not significant.
Updated•6 years ago
|
Severity: normal → enhancement
Priority: -- → P3
Comment 9•5 years ago
|
||
Let's WONTFIX unless we see this showing up hot in profiles.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Resolution: WONTFIX → WORKSFORME
Comment 10•5 years ago
|
||
WORKSFORME is better than WONTFIX for "this doesn't seem like a problem".
We can always re-open bugs!
You need to log in
before you can comment on or make changes to this bug.
Description
•