Reenable DSLParser

Change-Id: I1819b2c40902611d7e86245bff73ad8c2bd7629c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449060
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
Ethan Nicholas 2021-09-16 10:42:24 -04:00 committed by SkCQ
parent 5b1ae4b285
commit 2280058446
35 changed files with 91 additions and 57 deletions

View File

@ -20,7 +20,7 @@
#include "include/sksl/DSLWrapper.h"
#include "include/sksl/SkSLErrorReporter.h"
#define SKSL_DSL_PARSER 0
#define SKSL_DSL_PARSER 1
namespace SkSL {

View File

@ -8,14 +8,14 @@ error: 5: array size is too large
error: 6: expected 'int', but found 'bool'
error: 7: expected 'int', but found 'bool'
error: 8: expected 'int', but found 'int2'
error: 9: array must have a size
error: 9: missing index in '[]'
error: 10: array size must be positive
error: 11: array size must be positive
error: 12: array size must be positive
error: 13: expected 'int', but found 'float'
error: 14: array size is too large
error: 15: expected 'int', but found 'bool'
error: 16: expected 'int', but found 'bool'
error: 17: expected 'int', but found 'int2'
error: 18: array must have a size
error: 13: expected int literal
error: 14: array size out of bounds
error: 15: expected int literal
error: 16: expected int literal
error: 17: expected int literal
error: 18: expected array dimension
18 errors

View File

@ -1,9 +1,9 @@
### Compilation failed:
error: 3: type 'void' not allowed in this context
error: 4: type 'void' not allowed in this context
error: 3: type 'void' may not be used in an array
error: 4: type 'void' may not be used in an array
error: 6: type 'void' may not be used in an array
error: 7: type 'void' not allowed in this context
error: 8: type 'void' not allowed in this context
error: 7: type 'void' may not be used in an array
error: 8: type 'void' may not be used in an array
error: 9: type 'void' may not be used in an array
6 errors

View File

@ -1,6 +1,6 @@
### Compilation failed:
error: 4: opaque type 'void' is not permitted in a struct
error: 5: opaque type 'void' is not permitted in a struct
error: 6: multi-dimensional arrays are not supported
error: 4: type 'void' may not be used in an array
error: 5: type 'void' may not be used in an array
error: 6: type 'void' may not be used in an array
3 errors

View File

@ -1,4 +1,4 @@
### Compilation failed:
error: 1: expected ';', but found 'x'
error: 1: multi-dimensional arrays are not supported
1 error

View File

@ -1,7 +1,7 @@
### Compilation failed:
error: 1: array must have a size
error: 2: expected 'int', but found 'float'
error: 3: expected 'int', but found 'bool'
error: 5: array must have a size
error: 1: expected array dimension
error: 2: expected int literal
error: 3: expected int literal
error: 5: missing index in '[]'
4 errors

View File

@ -11,4 +11,7 @@ error: 21: layout qualifier 'index' appears more than once
error: 22: layout qualifier 'set' appears more than once
error: 23: layout qualifier 'builtin' appears more than once
error: 24: layout qualifier 'input_attachment_index' appears more than once
11 errors
error: 25: 'srgb_unpremul' is only permitted in runtime effects
error: 25: 'srgb_unpremul' is only permitted on 'uniform' variables
error: 25: 'srgb_unpremul' is only permitted on half3, half4, float3, or float4 variables
14 errors

View File

@ -2,7 +2,6 @@
error: 1: opaque type 'sampler' may not be used in an array
error: 2: opaque type 'sampler' may not be used in an array
error: 3: variables of type 'sampler' must be global
error: 3: opaque type 'sampler' may not be used in an array
error: 4: opaque type 'sampler' may not be used in an array
5 errors
4 errors

View File

@ -1,5 +1,4 @@
### Compilation failed:
error: 1: variables of type 'sampler' must be global
error: 1: opaque type 'sampler' is not permitted in an interface block
2 errors
1 error

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: 1: shader 'main' must be main() or main(float2)
error: 2: unknown identifier 'color'
error: 2: expected expression, but found '='
1 error
3 errors

View File

@ -1,4 +1,4 @@
### Compilation failed:
error: 2: unknown identifier '_'
error: 2: expected ';', but found '='
1 error

View File

@ -1,4 +1,5 @@
### Compilation failed:
error: 2: invalid arguments to 'float[1]' constructor (expected 1 elements, but found 0)
1 error
error: 2: invalid arguments to 'float[1]' constructor (expected 1 elements, but found 0)
2 errors

View File

@ -1,4 +1,5 @@
### Compilation failed:
error: 2: no type named 'l'
1 error
error: 2: expected a type, but found '('
2 errors

View File

@ -1,4 +1,4 @@
### Compilation failed:
error: 1: array size must be an integer
error: 1: expected ']', but found '*'
1 error

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: array must have a size
1 error
error: 1: expected expression, but found ']'
error: 1: expected ']', but found ';'
error: 2: expected ';', but found 'void'
3 errors

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: array must have a size
1 error
error: 1: expected expression, but found ']'
error: 1: expected ']', but found ';'
error: 1: expected ';', but found 'void'
3 errors

View File

@ -1,5 +1,6 @@
### Compilation failed:
error: 1: expected identifier, but found ';'
error: 1: expected field name or swizzle mask after '.'
error: 2: expected ';', but found ''
2 errors
3 errors

View File

@ -1,4 +1,7 @@
### Compilation failed:
error: 1: function 'half4 blend_src_over(half4 src, half4 dst)' was already defined
error: 5: shader 'main' must be main() or main(float2)
1 error
error: 6: unknown identifier 'src'
error: 6: unknown identifier 'dst'
4 errors

View File

@ -1,4 +1,5 @@
### Compilation failed:
error: 2: floating-point value is too large: 3.41e+38
1 error
error: 2: type mismatch: '=' cannot operate on 'half', 'half4'
2 errors

View File

@ -1,4 +1,5 @@
### Compilation failed:
error: 2: integer is out of range for type 'uint': -1
error: 4: integer is too large: 4294967296
1 error
2 errors

View File

@ -1,7 +1,7 @@
### Compilation failed:
error: 2: type '$mat' is private
error: 5: type 'S' is private
error: 6: type '$bvec' is private
error: 9: type '$ivec' is private
error: 10: type '$genType' is private
4 errors

View File

@ -1,4 +1,5 @@
### Compilation failed:
error: 2: expected ';', but found '('
1 error
error: 2: expected expression, but found ')'
2 errors

View File

@ -1,4 +1,4 @@
### Compilation failed:
error: 3: cannot swizzle value of type 'float2x2'
error: 3: type 'float2x2' does not have a field named 'y'
1 error

View File

@ -1,4 +1,4 @@
### Compilation failed:
error: 1: too many components in swizzle mask 'xxxxx'
error: 1: too many components in swizzle mask
1 error

View File

@ -1,5 +1,4 @@
### Compilation failed:
error: 1: variables of type 'sampler' must be global
error: 1: opaque type 'sampler' is not permitted in an interface block
2 errors
1 error

View File

@ -23,7 +23,7 @@ error: 23: type 'ushort4' is not supported
error: 25: type 'uint4' is not supported
error: 26: type 'ushort' is not supported
error: 27: type 'float2x3' is not supported
error: 29: type 'Sh42' is not supported
error: 30: type 'Sus' is not supported
error: 31: type 'Sau' is not supported
error: 29: type 'half4x2' is not supported
error: 30: type 'ushort' is not supported
error: 31: type 'uint' is not supported
26 errors

View File

@ -1,5 +1,4 @@
### Compilation failed:
error: 3: array size must appear after variable name
error: 5: construction of array type 'float[3]' is not supported
2 errors
1 error

View File

@ -6,7 +6,8 @@ error: 11: variables of type 'shader' must be uniform
error: 14: variables of type 'shader' must be global
error: 14: variables of type 'shader' must be uniform
error: 15: parameters of type 'shader' not allowed
error: 15: unknown identifier 's'
error: 16: functions may not return opaque type 'shader'
error: 17: cannot construct 'shader'
error: 18: ternary expression of opaque type 'shader' not allowed
9 errors
10 errors

View File

@ -2,7 +2,13 @@
error: 6: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
error: 7: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
error: 7: unknown identifier 'src'
error: 8: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
error: 8: unknown identifier 'src'
error: 9: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
error: 9: unknown identifier 'src'
error: 9: unknown identifier 'dst'
error: 10: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
5 errors
error: 10: unknown identifier 'src'
error: 10: unknown identifier 'dst'
11 errors

View File

@ -3,5 +3,7 @@
error: 6: 'main' parameter must be 'vec4', 'float4', or 'half4'
error: 7: 'main' parameter must be 'vec4', 'float4', or 'half4'
error: 8: 'main' parameter must be 'vec4', 'float4', or 'half4'
error: 8: unknown identifier 'color'
error: 9: 'main' parameter must be 'vec4', 'float4', or 'half4'
4 errors
error: 9: unknown identifier 'color'
6 errors

View File

@ -2,6 +2,9 @@
error: 6: 'main' parameters must be (float2, (vec4|float4|half4)?)
error: 7: 'main' parameters must be (float2, (vec4|float4|half4)?)
error: 7: unknown identifier 'color'
error: 8: 'main' parameters must be (float2, (vec4|float4|half4)?)
error: 8: unknown identifier 'color'
error: 9: 'main' parameters must be (float2, (vec4|float4|half4)?)
4 errors
error: 9: unknown identifier 'color'
7 errors

View File

@ -6,6 +6,8 @@ error: 5: missing loop index initializer
error: 7: invalid type for loop index
error: 8: invalid type for loop index
error: 9: construction of array type 'int[2]' is not supported
error: 9: unknown identifier 'i'
error: 9: unknown identifier 'i'
error: 13: loop index initializer must be a constant expression
error: 14: loop index initializer must be a constant expression
8 errors
10 errors

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'fragmentProcessor'
1 error
error: 1: no type named 's'
error: 1: expected a declaration, but found ';'
3 errors

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'sampler2D'
1 error
error: 1: no type named 's'
error: 1: expected a declaration, but found ';'
3 errors

View File

@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'texture2D'
1 error
error: 1: no type named 's'
error: 1: expected a declaration, but found ';'
3 errors