Skip hasMappedBuffer check in draw validations in WebGL contexts
MapBufferRange, FlushMappedBufferRange, and UnmapBuffer entry points
are removed from the WebGL 2.0 API[1], so we don't need to validate
if a vertex array buffer or an index buffer is mapped or not in draw
validations (ValidateDrawBase and ValidateDrawElementsCommon) in a
WebGL context.
According to profiling data, hasMappedBuffer weights over 1% (1.12%)
CPU times in WebGL Acquarium benchmark (10K fishes, Intel HD630).
With this patch, this hot spot has disappeared and no new hot spots
are introduced.
This optimization can also slightly improve FPS on WebGL benchmarks,
or keep the same at least.
[1] https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14
BUG=angleproject:1671
Change-Id: I96e770b19b691e81774cc8e0c1b66b65dcc3cc83
Reviewed-on: https://chromium-review.googlesource.com/753281
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Corentin Wallez <cwallez@chromium.org>
Showing
Please
register
or
sign in
to comment