Add test demonstrating Metal codegen shortcoming.

If we have a const global variable containing a compile-time constant-
expression value (like `const int seven = 7;`), we should be able to
emit a global-scope compile-time constant in Metal like:

`constant const int seven = 7;`

Instead, we add a const int variable to the Globals struct and
initialize it to 7 in main(), which will either force the Metal
optimizer to work very hard, or lead to less-optimal generated code.

(We use several global values in the Graphite vertex module.)

Change-Id: Ia49b76a3834fe55ac76820c7eb8c5a307caac183
Bug: skia:13679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/571971
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
5 files changed