skia2/tests/sksl/shared/VectorConstructors.sksl
John Stiles ab4ab20fcf Migrate most SkSL tests currently in /glsl/ to /shared/.
These tests will also be used for Metal and SPIR-V testing. A small
handful of GLSL-specific stragglers (#version-specific or type-precision
related) will remain in /glsl/.

Change-Id: I7f2b2bd92825c327922c8ce74e438d2daa440dff
Bug: skia:10649
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319408
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 17:13:53 +00:00

12 lines
289 B
Plaintext

float2 v1 = float2(1);
float2 v2 = float2(1, 2);
float2 v3 = float2(float2(1));
float3 v4 = float3(float2(1), 1.0);
int2 v5 = int2(1);
int2 v6 = int2(float2(1, 2));
float2 v7 = float2(int2(1, 2));
void main() {
sk_FragColor.r = half(v1.x + v2.x + v3.x + v4.x + v5.x + v6.x + v7.x);
}