skia2/tests/sksl/errors/VectorIndexOutOfRange.glsl
John Stiles d92f9c2f8d Add tests for matrix constant-expressions.
We should support constant-expressions involving matrices (GLSL ES2
does, WebGL does). We currently don't. We do properly report out-of-
range indexing, but we don't optimize away valid matrix index
expressions or allow matrices to be indexed in a constant-expression
context.

Change-Id: If58aa4c5f15abef421a412957072f3617b4176df
Bug: skia:12472
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469818
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-11-10 20:59:36 +00:00

25 lines
1015 B
GLSL

### Compilation failed:
error: 1: index -1 out of range for 'half4'
error: 6: index 4 out of range for 'half4'
error: 7: index 1000000000 out of range for 'half4'
error: 9: index -1 out of range for 'half3'
error: 13: index 3 out of range for 'half3'
error: 14: index 4 out of range for 'half3'
error: 15: index 1000000000 out of range for 'half3'
error: 17: index -1 out of range for 'half2'
error: 20: index 2 out of range for 'half2'
error: 21: index 3 out of range for 'half2'
error: 22: index 4 out of range for 'half2'
error: 23: index 1000000000 out of range for 'half2'
error: 25: index -1 out of range for 'half2'
error: 28: index 2 out of range for 'half2'
error: 29: index 1000000000 out of range for 'half2'
error: 31: index -1 out of range for 'half3'
error: 35: index 3 out of range for 'half3'
error: 36: index 1000000000 out of range for 'half3'
error: 38: index -1 out of range for 'half4'
error: 43: index 4 out of range for 'half4'
error: 44: index 1000000000 out of range for 'half4'
21 errors