skia2/tests/sksl
John Stiles 5186379e5e Disallow function calls to main().
In practice, calls to main are not meaningful:
- If main is called in live code, it's recursive
- If main is called in dead code, it's eliminated

However, if optimization/dead-stripping is turned off, the dead-code
case emits bad code in our GLSL/Metal backends. Rather than add a
special case to the backends to work around an error in a meaningless
edge case, we now reject the function call entirely.

Prototyping main() is, as far as I can tell, harmless, so this
continues to be allowed.

Change-Id: I69916840c06810cd948bd74ff168ada1c4fc74f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557578
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-07-11 20:55:12 +00:00
..
blend Add ReducedBlendModeInfo to shared code. 2022-04-22 17:18:31 +00:00
compute Added threadgroup modifier to compute shaders 2022-06-29 18:06:28 +00:00
errors Disallow function calls to main(). 2022-07-11 20:55:12 +00:00
folding Optimize away equality checks for structs with known values. 2022-06-06 20:59:15 +00:00
glsl Added range highlighting to SkSL error reports 2022-04-07 13:29:48 +00:00
inliner Optimize away field accesses to known structs. 2022-06-06 20:38:43 +00:00
intrinsics Optimize away self comparisons in SPIR-V. 2022-04-19 16:10:03 +00:00
metal Fix assertion failure with 'uniform texture2D' 2022-06-30 14:48:48 +00:00
runtime [sksl] Eliminate unreachable blocks inside switch cases 2022-07-07 21:23:54 +00:00
runtime_errors Runtime effects: Restrict uniform matrices to be square 2022-07-07 15:21:01 +00:00
shared Disallow function calls to main(). 2022-07-11 20:55:12 +00:00
spirv Eliminate redundant loads following stores. 2022-04-18 14:57:48 +00:00
wgsl Fix WGSL pipeline stage attributes 2022-06-10 18:08:51 +00:00
workarounds [sksl] Disallow boolean uniforms 2022-06-01 18:07:08 +00:00
README.txt

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.