skia2/tests/sksl/runtime_errors/IllegalShaderSampling.skvm
Brian Osman f8a550491e SkSL: Use type-specific sampling intrinsics, rather than fn-call syntax
After further discussion, using intrinsics with signatures similar to
sample keeps us looking like GLSL. However, using "sample" is still
misleading, so this adds explicit "shade", "filter", and "blend"
intrinsics. After migrating clients, the "sample" versions will be
removed.

Bug: skia:12302
Change-Id: Ia03e4b3794fc1fc5ae3c3099a7a350343ec7702e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441457
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-24 18:18:46 +00:00

40 lines
1.9 KiB
Plaintext

### Compilation failed:
error: 10: no match for sample(shader, float2, half4)
error: 11: no match for sample(shader, half4)
error: 12: no match for sample(shader, half4, float2)
error: 13: no match for sample(shader)
error: 14: no match for sample(shader, float3x3)
error: 16: no match for sample(colorFilter)
error: 17: no match for sample(colorFilter, float2)
error: 18: no match for sample(colorFilter, float2, half4)
error: 20: no match for sample(blender)
error: 21: no match for sample(blender, half4)
error: 22: no match for sample(blender, float2)
error: 23: no match for sample(blender, float2, half4)
error: 27: call to 'shade' expected 2 arguments, but found 3
error: 28: expected 'float2', but found 'half4'
error: 29: call to 'shade' expected 2 arguments, but found 3
error: 30: call to 'shade' expected 2 arguments, but found 1
error: 31: expected 'float2', but found 'float3x3'
error: 33: call to 'filter' expected 2 arguments, but found 1
error: 34: expected 'half4', but found 'float2'
error: 35: call to 'filter' expected 2 arguments, but found 3
error: 37: call to 'blend' expected 3 arguments, but found 1
error: 38: call to 'blend' expected 3 arguments, but found 2
error: 39: call to 'blend' expected 3 arguments, but found 2
error: 40: expected 'half4', but found 'float2'
error: 45: expected 'blender', but found 'shader'
error: 46: call to 'blend' expected 3 arguments, but found 2
error: 47: expected 'colorFilter', but found 'shader'
error: 48: expected 'colorFilter', but found 'shader'
error: 50: expected 'blender', but found 'colorFilter'
error: 51: call to 'blend' expected 3 arguments, but found 2
error: 52: expected 'shader', but found 'colorFilter'
error: 53: expected 'shader', but found 'colorFilter'
error: 55: expected 'colorFilter', but found 'blender'
error: 56: call to 'filter' expected 2 arguments, but found 3
error: 57: expected 'shader', but found 'blender'
error: 58: call to 'shade' expected 2 arguments, but found 3
36 errors