2630ea3312
It's not legal to use identifiers like "int" or "sampler" to name your variables (or enums, or structs, etc.). SkSL will now report this as an error instead of relying on the driver to catch this. (Note that in some contexts, it might be legal by the spec to reuse a name that you introduced yourself, depending on the scope. In practice, this confuses Apple GLSL, so we shouldn't support it anyway.) This caught several existing places in our code where we used the name "sampler." These were never exposed to the driver (they were intrinsics that we would replace during compilation) so they were harmless before. Change-Id: Ia6dcfca8c500d02e1eb5f9427bed8727e114dfc2 Bug: skia:11036 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340758 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
16 lines
146 B
Plaintext
16 lines
146 B
Plaintext
struct S { int i; };
|
|
|
|
int x;
|
|
int x;
|
|
float4x4 x;
|
|
bool2 x[2];
|
|
S x;
|
|
|
|
void main() {
|
|
float2 y;
|
|
float2 y;
|
|
int y;
|
|
float y[4];
|
|
S y;
|
|
}
|