Test that Runtime Effects cannot use non-ES2 types.

Surprisingly, we didn't actually have a preexisting test covering this.
Error reporting is lackluster in this CL but will be improved in the
followup.

Change-Id: I0b1cdb5a82f066af6b9d3fd9c39748080c2e18c0
Bug: skia:12348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439996
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2021-08-16 23:00:04 -04:00 committed by SkCQ
parent 3dbd159d09
commit 059798f40e
3 changed files with 28 additions and 0 deletions

View File

@ -535,6 +535,7 @@ sksl_rte_tests = [
sksl_rte_error_tests = [
"/sksl/runtime_errors/DerivativesES2.rts",
"/sksl/runtime_errors/ES3Types.rts",
"/sksl/runtime_errors/FirstClassArrays.rts",
"/sksl/runtime_errors/IllegalArrayOps.rts",
"/sksl/runtime_errors/IllegalIndexing.rts",

View File

@ -0,0 +1,23 @@
void f23() { float2x3 x; }
void f24() { float2x4 x; }
void f32() { float3x2 x; }
void f34() { float3x4 x; }
void f42() { float4x2 x; }
void f43() { float4x3 x; }
void h23() { half2x3 x; }
void h24() { half2x4 x; }
void h32() { half3x2 x; }
void h34() { half3x4 x; }
void h42() { half4x2 x; }
void h43() { half4x3 x; }
void u() { uint x; }
void u2() { uint2 x; }
void u3() { uint3 x; }
void u4() { uint4 x; }
void us() { ushort x; }
void us2() { ushort2 x; }
void us3() { ushort3 x; }
void us4() { ushort4 x; }

View File

@ -0,0 +1,4 @@
### Compilation failed:
error: 1: expected ';', but found 'x'
1 error