Commit
eb597ff5
authored
by
Committed by
swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com
Make Constants a singleton instead of a global
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>
Showing
Please
register
or
sign in
to comment