-
Make Constants a singleton instead of a global · eb597ff5Alexis Hetu authored
This cl changes Constants into a singleton. The constructor of Constants previously ran at library load time, and this implementation of the singleton pattern achieves running the construction on first use. This saves startup time, and omits the construction entirely when no draw call or compute invocation is made. Bug: b/175073772 Change-Id: I58727c6e5b8cf9a17d548707222d39cad92fb4c1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50849 Commit-Queue: Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
eb597ff5
×