skia2/resources/sksl/runtime/GlobalVariables.rte
Brian Osman a5ab63a062 Tweak GlobalVariables.rte test, and adjust .stage output
Adds trivial name mangling to the .stage output, so we can verify that
it's working in all places (declarations, references, etc). Also added
another global variable whose initializer is - in turn - another global.

Bug: skia:11295
Change-Id: Ic220bfae0a6d1eeeba66ade30d3d781af15c5dea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371477
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-17 22:13:19 +00:00

15 lines
292 B
Plaintext

/*#pragma settings NoInline*/
float gInitialized = -1.0;
float gInitializedFromOther = -gInitialized;
float gUninitialized;
void init_globals() {
gUninitialized = gInitialized + 2;
}
float4 main() {
init_globals();
return float4(0, gInitializedFromOther, 0, gUninitialized);
}