src/libGLESv2/global_state.cpp


Log

Author Commit Date CI Message
Jamie Madill 77db6f4a 2018-09-23T17:28:55 Use global Context lookup in single-threaded cases. In single-threaded cases we don't need to use a TLS lookup for the current Context. Assume a global context has 3 states: unset, set, and multi-threaded: * global context unset -> set the global context * global context set, matches TLS context -> set the global context * global context set, doesn't match TLS -> set multi-threaded * global context multi-threaded -> leave it This also inlines the global context/TLS check into global_state.h. Increases performance of the binding perf overhead test by up to 25% and the draw call perf test by up to 3%. Bug: angleproject:2824 Change-Id: Ib95953ca918f2408fe72ca83061f4e2d1bd1adad Reviewed-on: https://chromium-review.googlesource.com/1231993 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang b02fc662 2018-08-21T09:48:01 Lock around all EGL and GL calls with a global mutex. BUG=angleproject:2464 Change-Id: I0231cc84777272f9cf26298c6a137f1ad3fd51d6 Reviewed-on: https://chromium-review.googlesource.com/1183441 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 75359664 2018-04-11T01:42:27 Implement EGL_KHR_debug. BUG=angleproject:1618 Change-Id: I790944b49badc910b6c72266469fcb8e86ac4252 Reviewed-on: https://chromium-review.googlesource.com/1019387 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 7b8f3c9b 2016-11-10T10:42:48 Encapsulate the thread local storage into an egl::Thread class. Instead of having separate GetGlobal* functions, interact with the global objects through a single Thread object. This reduces the number of TLS lookups in many EGL functions and allows the Thread object to be passed down to other objects if needed. BUG=angleproject:1618 Change-Id: I1f9a89e8899d637633f4e91fda0e38ac308dd020 Reviewed-on: https://chromium-review.googlesource.com/409637 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 437fa654 2016-05-03T15:13:24 Add a ContextImpl class. This class can contain impl-specific functionality for a Context. This will eventually replace the Renderer class, and we can then start passing around a gl::Context instead of gl::ContextState. In D3D11, the ContextImpl could hold a DeferredContext, which would enable multi-thread rendering. In GL, we can implement non-virtual (native) Contexts. In Vulkan it might store the logical device. BUG=angleproject:1363 Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec Reviewed-on: https://chromium-review.googlesource.com/340745 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
hendrikw f3586994 2015-10-14T18:27:07 angle: move DeallocateCurrent into windows only code DeallocateCurrent is only called from within DllMain, which means it's only called on windows. On the mac, the warning unused-function may be triggered. Move DeallocateCurrent to windows only code. Change-Id: I61ba602af78d546a91cf009ae7350cf03eaa84dd Reviewed-on: https://chromium-review.googlesource.com/305880 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e7c6e43c 2014-12-03T14:48:07 Implement all entry points in libGLES and have libEGL act as a shim. This allows libANGLE to only be included in libGLESv2 and moves all TLS data to libGLESv2.dll. BUG=angle:733 Change-Id: I34f0b47987a5efbe906c290d3ca656142e69ea9a Reviewed-on: https://chromium-review.googlesource.com/232962 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>