Improve generation of constant global variables in Metal.
If we have a const global variable containing a compile-time constant-
expression value (like `const int seven = 7;`), we can now emit a
global-scope compile-time constant in Metal like this:
`constant const int seven = 7;`
Instead of adding a new variable into the Globals struct.
Change-Id: I6f930304676e114e8bae103ba0386968f7309cd6
Bug: skia:13679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/571995
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
4 files changed