skia2/tests/sksl/shared/Operators.sksl
John Stiles d8ca6b608e Replace SPIR-V assertion with mixed-types error message.
This is very unlikely to occur in real-world code, as it's somewhat
nonsense to use the comma operator in this way. However, it's better to
fail cleanly than to assert.

Change-Id: I76481cd8a993cb1a798ee16956400a512efd4c15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337636
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-25 15:13:27 +00:00

21 lines
412 B
Plaintext

void main() {
float x = 1, y = 2;
int z = 3;
x = x - x + y * z * x * (y - z);
y = x / y / z;
z = (z / 2 % 3 << 4) >> 2 << 1;
bool b = (x > 4) == x < 2 || 2 >= sqrt(2) && y <= z;
x += 12;
x -= 12;
x *= y /= z = 10;
z |= 0;
z &= -1;
z ^= 0;
z >>= 2;
z <<= 4;
z %= 5;
x = (float2(sqrt(1)), 6);
y = (float(b), 6.0);
z = (float2(sqrt(1)), 6);
}