Commit 0afc3323db3c452145619b3011f5c6a13644574c

Roman Lavrov 2025-01-21T12:46:28

Add fast path to ValidCap for most frequent cases glEnable/Disable are commonly called with the ones that are now on the fast path. GL_POLYGON_OFFSET_FILL seems slightly less common but still frequent enough to be inlined. This noticeably reduces the number of function calls in DO2 trace as well as branch predictor load (confirmed by cpu counter stats from a mobile device), and just this change appears to improve wall_time a bit. Bug: b/383305597 Change-Id: I8fa42de64d79f6638b312891f440d796dd95c57c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6184086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>