skia2/tests/sksl/errors
Brian Osman 4cf85073e6 Enforce (valid) array sizes in many more places
Unsized arrays are now allowed in exactly one place: On the declaration
of an interface block. This satisfies the one existing use-case, which
is the gl_in (sk_in) declaration for geometry shaders. There is no other
useful scenario, and most of our backends don't support them anyway.

Several spots were using less strict checks when attaching sizes to
arrays, allowing for zero or negative-sized arrays, so those are all
fixed now.

The existing tests that initialize arrays are still a problem, because
Metal doesn't support that (neither does GLES2). Also, ArrayConstructors
has gone from generating an error in the Vulkan backend, to invalid
SPIR-V.

Bug: skia:11013
Bug: skia:11127
Change-Id: Ib08dfe9aeec96bf605661665d6f166419d27e8bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353817
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-14 22:14:59 +00:00
..
golden Enforce (valid) array sizes in many more places 2021-01-14 22:14:59 +00:00
ArgumentCountMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ArgumentMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ArgumentModifiers.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ArrayIndexOutOfRange.sksl Enforce (valid) array sizes in many more places 2021-01-14 22:14:59 +00:00
ArrayReturnTypes.sksl Remove multi-dimensional array support from the parser. 2020-12-03 20:24:38 +00:00
ArrayTooManyDimensions.sksl Disallow multi-dimensional arrays in SkSL. 2020-12-03 16:28:19 +00:00
ArrayUnspecifiedDimensions.sksl Enforce (valid) array sizes in many more places 2021-01-14 22:14:59 +00:00
AssignmentTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BadCaps.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BadFieldAccess.sksl Add unit tests for assignment and invalid field access. 2020-09-25 21:42:22 +00:00
BadIndex.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BadModifiers.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BinaryInvalidType.sksl fixed SkSL crash when performing binary operations on invalid types 2020-12-11 17:29:10 +00:00
BinaryTypeCoercion.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BinaryTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BitShiftFloat.sksl SkSL: Only allow bitwise ops on integral types 2020-09-17 18:12:34 +00:00
BitShiftFloatMatrix.sksl SkSL: Only allow bitwise ops on integral types 2020-09-17 18:12:34 +00:00
BitShiftFloatVector.sksl SkSL: Only allow bitwise ops on integral types 2020-09-17 18:12:34 +00:00
BooleanArithmetic.sksl Add SkSL error reporting when an undefined function is called. 2021-01-05 14:38:41 +00:00
BreakOutsideLoop.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
CallNonFunction.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
CanExitWithoutReturningValue.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ConstructorArgumentCount.sksl Update VectorConstructor unit test with mixed-type ctors. 2021-01-13 19:09:16 +00:00
ConstructorTypeMismatch.sksl Update VectorConstructor unit test with mixed-type ctors. 2021-01-13 19:09:16 +00:00
ContinueOutsideLoop.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
DivideByZero.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
DoTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
DuplicateFunction.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
DuplicateOutput.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
DuplicateSymbol.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
EnumValueMustBeConstInt.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ErrorsInDeadCode.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
FloatRemainder.sksl SkSL: Disallow '%' and '%=' on non-integral types 2020-12-10 22:19:49 +00:00
ForTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
GenericArgumentMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
GrBadIn.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrMainParameterWrongType.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrMainTooManyParameters.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrNoFragmentProcessorConstruction.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrNoFragmentProcessorExpressions.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrNoFragmentProcessorLocals.fp Remove sk_OutColor built-in variable. 2020-12-15 17:03:12 +00:00
GrNoFragmentProcessorParams.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrNoFragmentProcessorReturn.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
GrRecursion.fp Remove sk_OutColor usage from .fp unit tests. 2020-12-15 16:06:13 +00:00
IfTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
InterfaceBlockScope.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
InterfaceBlockStorageModifiers.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
InterfaceBlockWithNoMembers.sksl Migrate CrbugOssfuzz21688 to a golden-output test. 2020-11-04 22:34:13 +00:00
InvalidAssignment.sksl Disallow assignment to unfoldable ternaries in SkSL. 2020-09-25 21:26:40 +00:00
InvalidOutParams.sksl Add new unit tests for SkSL. 2020-09-23 20:30:47 +00:00
InvalidToken.sksl Add unit test for invalid tokens in input stream. 2021-01-07 20:50:01 +00:00
InvalidUnary.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
InVarWithInitializerExpression.sksl Add unit test for fuzzer-detected error with in vars. 2020-11-09 18:14:56 +00:00
MismatchedNumbers.sksl Update int/float mismatch test to include uints. 2021-01-14 19:38:30 +00:00
ModifiersInStruct.sksl Reject struct vardecls with modifiers. 2020-10-09 22:34:23 +00:00
OpaqueTypeAssignment.sksl Enforce additional restrictions on opaque types. 2020-12-22 22:24:24 +00:00
OpaqueTypeConstruction.sksl Enforce additional restrictions on opaque types. 2020-12-22 22:24:24 +00:00
OpaqueTypeInArray.sksl Disallow global variables containing arrays of opaque types. 2020-12-01 20:04:14 +00:00
OpaqueTypeInInterfaceBlock.sksl Disallow opaque types in structs and interface blocks. 2020-11-17 15:25:43 +00:00
OpaqueTypeInStruct.sksl Disallow opaque types in structs and interface blocks. 2020-11-17 15:25:43 +00:00
OpenArray.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
Ossfuzz26700.sksl Fix unknown-identifier issue discovered by fuzzer. 2020-10-30 19:11:31 +00:00
Ossfuzz26759.sksl Update tests which mix int and float types without casts. 2021-01-13 19:47:13 +00:00
Ossfuzz27650.sksl Fix fuzzer crash when casting between int and float. 2020-11-20 14:07:03 +00:00
Ossfuzz27663.sksl Fix double-negation of constant-value construcors. 2020-11-23 17:02:21 +00:00
Ossfuzz29085.sksl Fix fuzzer-discovered optimizer crash. 2021-01-08 13:03:02 +00:00
OverflowFloatLiteral.sksl Detect and report numeric overflows in the SkSL parser. 2020-12-28 16:39:19 +00:00
OverflowIntLiteral.sksl Add unit tests for overflowing int and uint literal limits. 2020-11-11 16:11:15 +00:00
OverflowParamArraySize.sksl Detect and report numeric overflows in the SkSL parser. 2020-12-28 16:39:19 +00:00
OverflowUintLiteral.sksl Add unit tests for overflowing int and uint literal limits. 2020-11-11 16:11:15 +00:00
PrivateTypes.sksl SkSL: Remove all $gsamplerFoo types 2020-12-23 16:57:07 +00:00
RedeclareBasicType.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareEnum.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareSamplerType.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareStruct.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareStructTypeWithName.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareUserType.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
RedeclareVariable.sksl Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
ReturnDifferentType.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ReturnFromVoid.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ReturnMissingValue.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ReturnTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SelfReferentialInitializerExpression.sksl Add unit test for self-referential initializer expressions. 2020-10-23 14:36:05 +00:00
SpuriousFloat.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StaticIfTest.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StaticSwitchConditionalBreak.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StaticSwitchTest.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StructTooDeeplyNested.sksl Limit struct nesting depth to a maximum of eight levels. 2020-11-10 16:58:37 +00:00
SwitchDuplicateCase.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwitchTypes.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwizzleConstantOutput.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwizzleMatrix.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwizzleOnlyLiterals.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwizzleOutOfBounds.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SwizzleTooManyComponents.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
TernaryMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UndeclaredFunction.sksl Add test cases to function-prototype golden outputs. 2020-11-02 17:17:23 +00:00
UndefinedFunction.sksl Add test cases to function-prototype golden outputs. 2020-11-02 17:17:23 +00:00
UndefinedSymbol.sksl Support testing error cases in our SkSL unit test goldens. 2020-09-14 21:23:07 +00:00
Unreachable.sksl Revert "Fix incorrect 'unreachable code' error in SkSL" 2020-12-16 18:21:17 +00:00
UnsupportedGLSLIdentifiers.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UseWithoutInitializeArrayIndex.sksl Disallow multi-dimensional arrays in SkSL. 2020-12-03 16:28:19 +00:00
UseWithoutInitializeBinaryExpr.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UseWithoutInitializeDeadIf.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UseWithoutInitializeDeadSwitch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UseWithoutInitializeReturnValue.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UseWithoutInitializeVarDecl.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UsingInvalidValue.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
WhileTypeMismatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00