skia2/resources/sksl/runtime/GlobalVariables.rts
John Stiles 83b5237b53 Fix assertion when debug-tracing a void-return function.
The debug-slot code didn't expect to encounter a void type.

Change-Id: Ied452b51e1cf90a0c0bc24770f82e711105b8e82
Bug: skia:12708
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482461
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-10 14:39:05 +00:00

15 lines
322 B
Plaintext

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