diff options
author | android-autoroll <android-autoroll@skia-corp.google.com.iam.gserviceaccount.com> | 2022-03-24 02:11:40 +0000 |
---|---|---|
committer | android-autoroll <android-autoroll@skia-corp.google.com.iam.gserviceaccount.com> | 2022-03-24 02:11:40 +0000 |
commit | 75106ff1e1f62d091c70444f3743cacf8864784e (patch) | |
tree | 643d0f44a9926a6382eb63dcb71ff2a422acc64b | |
parent | a37aefd39df72d3aa763298f4b09fa393ac6e85b (diff) | |
parent | e28fcd1782772d2f04acca9184b3f5327cd22781 (diff) | |
download | skia-75106ff1e1f62d091c70444f3743cacf8864784e.tar.gz |
Roll Skia from 9f7ddf9a8f67 to e28fcd178277 (9 revisions)
https://skia.googlesource.com/skia.git/+log/9f7ddf9a8f67..e28fcd178277
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://skia-autoroll.corp.goog/r/android-next-autoroll
Please CC djsollen@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Test: Presubmit checks will test this change.
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
Change-Id: I92efb5bb8abe79c1e186678845819e8b95c30254
-rw-r--r-- | gn/sksl_tests.gni | 323 | ||||
-rw-r--r-- | resources/sksl/errors/ArgumentCountMismatch.rts (renamed from resources/sksl/errors/ArgumentCountMismatch.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ArgumentMismatch.rts (renamed from resources/sksl/errors/ArgumentMismatch.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ArgumentModifiers.rts (renamed from resources/sksl/errors/ArgumentModifiers.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayIndexOutOfRange.rts (renamed from resources/sksl/errors/ArrayIndexOutOfRange.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayNegation.rts (renamed from resources/sksl/errors/ArrayNegation.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayOfInvalidSize.rts (renamed from resources/sksl/errors/ArrayOfInvalidSize.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayOfVoid.rts (renamed from resources/sksl/errors/ArrayOfVoid.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayPlus.rts (renamed from resources/sksl/errors/ArrayPlus.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayReturnTypes.rts (renamed from resources/sksl/errors/ArrayReturnTypes.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArraySplitDimensions.rts (renamed from resources/sksl/errors/ArraySplitDimensions.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArraySplitDimensionsInFuncBody.rts (renamed from resources/sksl/errors/ArraySplitDimensionsInFuncBody.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArraySplitDimensionsInFuncDecl.rts (renamed from resources/sksl/errors/ArraySplitDimensionsInFuncDecl.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArraySplitDimensionsInStruct.rts (renamed from resources/sksl/errors/ArraySplitDimensionsInStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTooManyDimensions.rts (renamed from resources/sksl/errors/ArrayTooManyDimensions.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.rts | 5 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.sksl | 5 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.rts (renamed from resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTooManyDimensionsInStruct.rts (renamed from resources/sksl/errors/ArrayTooManyDimensionsInStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTypeTooManyDimensions.rts (renamed from resources/sksl/errors/ArrayTypeTooManyDimensions.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.rts | 5 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.sksl | 5 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.rts (renamed from resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.rts (renamed from resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ArrayUnspecifiedDimensions.rts (renamed from resources/sksl/errors/ArrayUnspecifiedDimensions.sksl) | 6 | ||||
-rw-r--r-- | resources/sksl/errors/AssignmentTypeMismatch.rts (renamed from resources/sksl/errors/AssignmentTypeMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BadConstInitializers.rts (renamed from resources/sksl/errors/BadConstInitializers.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BadFieldAccess.rts (renamed from resources/sksl/errors/BadFieldAccess.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BadIndex.rts (renamed from resources/sksl/errors/BadIndex.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BadOctal.rts (renamed from resources/sksl/errors/BadOctal.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BinaryInvalidType.rts (renamed from resources/sksl/errors/BinaryInvalidType.sksl) | 20 | ||||
-rw-r--r-- | resources/sksl/errors/BinaryTypeMismatch.rts (renamed from resources/sksl/errors/BinaryTypeMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BitShiftFloat.rts (renamed from resources/sksl/errors/BitShiftFloat.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BitShiftFloatMatrix.rts (renamed from resources/sksl/errors/BitShiftFloatMatrix.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BitShiftFloatVector.rts (renamed from resources/sksl/errors/BitShiftFloatVector.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/BreakOutsideLoop.rts | 8 | ||||
-rw-r--r-- | resources/sksl/errors/BreakOutsideLoop.sksl | 5 | ||||
-rw-r--r-- | resources/sksl/errors/CallNonFunction.rts (renamed from resources/sksl/errors/CallNonFunction.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ComparisonDimensional.rts (renamed from resources/sksl/errors/ComparisonDimensional.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ConstructorArgumentCount.rts (renamed from resources/sksl/errors/ConstructorArgumentCount.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ConstructorTypeMismatch.rts (renamed from resources/sksl/errors/ConstructorTypeMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ContinueOutsideLoop.rts | 15 | ||||
-rw-r--r-- | resources/sksl/errors/ContinueOutsideLoop.sksl | 7 | ||||
-rw-r--r-- | resources/sksl/errors/DivideByZero.rts (renamed from resources/sksl/errors/DivideByZero.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateFunction.rts | 6 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateFunction.sksl | 6 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateSymbol.rts (renamed from resources/sksl/errors/DuplicateSymbol.sksl) | 6 | ||||
-rw-r--r-- | resources/sksl/errors/EmptyArray.rts (renamed from resources/sksl/errors/EmptyArray.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/EmptyStruct.rts (renamed from resources/sksl/errors/EmptyStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ErrorsInDeadCode.rts (renamed from resources/sksl/errors/ErrorsInDeadCode.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/FloatRemainder.rts (renamed from resources/sksl/errors/FloatRemainder.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ForTypeMismatch.rts (renamed from resources/sksl/errors/ForTypeMismatch.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/FunctionParameterOfVoid.rts (renamed from resources/sksl/errors/FunctionParameterOfVoid.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/GenericArgumentMismatch.rts (renamed from resources/sksl/errors/GenericArgumentMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/IfTypeMismatch.rts (renamed from resources/sksl/errors/IfTypeMismatch.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/IncompleteExpression.rts (renamed from resources/sksl/errors/IncompleteExpression.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/IncompleteFunctionCall.rts (renamed from resources/sksl/errors/IncompleteFunctionCall.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/InterfaceBlockPrivateType.sksl | 7 | ||||
-rw-r--r-- | resources/sksl/errors/InvalidAssignment.rts (renamed from resources/sksl/errors/InvalidAssignment.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/InvalidOutParams.rts (renamed from resources/sksl/errors/InvalidOutParams.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/InvalidToken.rts (renamed from resources/sksl/errors/InvalidToken.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/InvalidUnary.rts (renamed from resources/sksl/errors/InvalidUnary.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixIndexOutOfRange.rts | 26 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixIndexOutOfRange.sksl | 50 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixIndexOutOfRangeES3.sksl | 26 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixToVectorCast3x3.rts (renamed from resources/sksl/errors/MatrixToVectorCast3x3.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixToVectorCastBoolean.rts (renamed from resources/sksl/errors/MatrixToVectorCastBoolean.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixToVectorCastInteger.rts (renamed from resources/sksl/errors/MatrixToVectorCastInteger.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MatrixToVectorCastTooSmall.rts (renamed from resources/sksl/errors/MatrixToVectorCastTooSmall.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MismatchedNumbers.rts | 64 | ||||
-rw-r--r-- | resources/sksl/errors/MismatchedNumbersES3.sksl (renamed from resources/sksl/errors/MismatchedNumbers.sksl) | 53 | ||||
-rw-r--r-- | resources/sksl/errors/ModifiersInStruct.rts (renamed from resources/sksl/errors/ModifiersInStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/MultipleFields.rts (renamed from resources/sksl/errors/MultipleFields.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/OpenArray.rts | 7 | ||||
-rw-r--r-- | resources/sksl/errors/OpenArray.sksl | 9 | ||||
-rw-r--r-- | resources/sksl/errors/OverflowFloatLiteral.rts (renamed from resources/sksl/errors/OverflowFloatLiteral.sksl) | 4 | ||||
-rw-r--r-- | resources/sksl/errors/OverflowInt64Literal.rts (renamed from resources/sksl/errors/OverflowInt64Literal.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/OverflowIntLiteral.rts (renamed from resources/sksl/errors/OverflowIntLiteral.sksl) | 10 | ||||
-rw-r--r-- | resources/sksl/errors/OverflowParamArraySize.rts (renamed from resources/sksl/errors/OverflowParamArraySize.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/OverflowShortLiteral.sksl | 9 | ||||
-rw-r--r-- | resources/sksl/errors/PrivateTypes.rts (renamed from resources/sksl/errors/PrivateTypes.sksl) | 5 | ||||
-rw-r--r-- | resources/sksl/errors/PrivateVariables.rts (renamed from resources/sksl/errors/PrivateVariables.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ProgramTooLarge_Globals.rts (renamed from resources/sksl/errors/ProgramTooLarge_Globals.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ProgramTooLarge_Stack.rts (renamed from resources/sksl/errors/ProgramTooLarge_Stack.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/PrototypeInFuncBody.rts (renamed from resources/sksl/errors/PrototypeInFuncBody.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareBasicType.rts (renamed from resources/sksl/errors/RedeclareBasicType.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareShaderType.rts | 5 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareStruct.rts (renamed from resources/sksl/errors/RedeclareStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareStructTypeWithName.rts (renamed from resources/sksl/errors/RedeclareStructTypeWithName.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareUserType.rts (renamed from resources/sksl/errors/RedeclareUserType.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/RedeclareVariable.rts (renamed from resources/sksl/errors/RedeclareVariable.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameAsm.rts (renamed from resources/sksl/errors/ReservedNameAsm.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameAttribute.rts (renamed from resources/sksl/errors/ReservedNameAttribute.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameCast.rts (renamed from resources/sksl/errors/ReservedNameCast.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameDouble.rts (renamed from resources/sksl/errors/ReservedNameDouble.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameDvec2.rts (renamed from resources/sksl/errors/ReservedNameDvec2.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameDvec3.rts (renamed from resources/sksl/errors/ReservedNameDvec3.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameDvec4.rts (renamed from resources/sksl/errors/ReservedNameDvec4.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameEnum.rts (renamed from resources/sksl/errors/ReservedNameEnum.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameExtern.rts (renamed from resources/sksl/errors/ReservedNameExtern.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameExternal.rts (renamed from resources/sksl/errors/ReservedNameExternal.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameFixed.rts (renamed from resources/sksl/errors/ReservedNameFixed.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameFvec2.rts (renamed from resources/sksl/errors/ReservedNameFvec2.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameFvec3.rts (renamed from resources/sksl/errors/ReservedNameFvec3.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameFvec4.rts (renamed from resources/sksl/errors/ReservedNameFvec4.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameGoto.rts (renamed from resources/sksl/errors/ReservedNameGoto.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameHvec2.rts (renamed from resources/sksl/errors/ReservedNameHvec2.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameHvec3.rts (renamed from resources/sksl/errors/ReservedNameHvec3.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameHvec4.rts (renamed from resources/sksl/errors/ReservedNameHvec4.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameInput.rts (renamed from resources/sksl/errors/ReservedNameInput.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameInterface.rts (renamed from resources/sksl/errors/ReservedNameInterface.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameInvariant.rts (renamed from resources/sksl/errors/ReservedNameInvariant.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameLong.rts (renamed from resources/sksl/errors/ReservedNameLong.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameNamespace.rts (renamed from resources/sksl/errors/ReservedNameNamespace.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameOutput.rts (renamed from resources/sksl/errors/ReservedNameOutput.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNamePacked.rts (renamed from resources/sksl/errors/ReservedNamePacked.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNamePrecision.rts (renamed from resources/sksl/errors/ReservedNamePrecision.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNamePublic.rts (renamed from resources/sksl/errors/ReservedNamePublic.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSampler1DShadow.rts (renamed from resources/sksl/errors/ReservedNameSampler1DShadow.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSampler2DRectShadow.rts (renamed from resources/sksl/errors/ReservedNameSampler2DRectShadow.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSampler2DShadow.rts (renamed from resources/sksl/errors/ReservedNameSampler2DShadow.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSampler3DRect.rts (renamed from resources/sksl/errors/ReservedNameSampler3DRect.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSamplerCube.rts (renamed from resources/sksl/errors/ReservedNameSamplerCube.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSizeof.rts (renamed from resources/sksl/errors/ReservedNameSizeof.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameStatic.rts (renamed from resources/sksl/errors/ReservedNameStatic.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameSuperp.rts (renamed from resources/sksl/errors/ReservedNameSuperp.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameTemplate.rts (renamed from resources/sksl/errors/ReservedNameTemplate.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameThis.rts (renamed from resources/sksl/errors/ReservedNameThis.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameTypedef.rts (renamed from resources/sksl/errors/ReservedNameTypedef.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameUnion.rts (renamed from resources/sksl/errors/ReservedNameUnion.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameUnsigned.rts (renamed from resources/sksl/errors/ReservedNameUnsigned.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameUsing.rts (renamed from resources/sksl/errors/ReservedNameUsing.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameVarying.rts (renamed from resources/sksl/errors/ReservedNameVarying.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReservedNameVolatile.rts (renamed from resources/sksl/errors/ReservedNameVolatile.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReturnDifferentType.rts | 6 | ||||
-rw-r--r-- | resources/sksl/errors/ReturnDifferentType.sksl | 6 | ||||
-rw-r--r-- | resources/sksl/errors/ReturnFromVoid.rts (renamed from resources/sksl/errors/ReturnFromVoid.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReturnMissingValue.rts (renamed from resources/sksl/errors/ReturnMissingValue.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ReturnTypeMismatch.rts (renamed from resources/sksl/errors/ReturnTypeMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/SelfReferentialInitializerExpression.rts (renamed from resources/sksl/errors/SelfReferentialInitializerExpression.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SpuriousFloat.rts (renamed from resources/sksl/errors/SpuriousFloat.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/StructMemberReservedName.rts (renamed from resources/sksl/errors/StructMemberReservedName.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/StructNameWithoutIdentifier.rts (renamed from resources/sksl/errors/StructNameWithoutIdentifier.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/StructTooDeeplyNested.rts (renamed from resources/sksl/errors/StructTooDeeplyNested.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/StructVariableReservedName.rts (renamed from resources/sksl/errors/StructVariableReservedName.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/SwitchDuplicateCase.rts (renamed from resources/sksl/errors/SwitchDuplicateCase.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SwitchDuplicateDefault.rts (renamed from resources/sksl/errors/SwitchDuplicateDefault.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SwitchTypes.rts (renamed from resources/sksl/errors/SwitchTypes.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleConstantOutput.rts (renamed from resources/sksl/errors/SwizzleConstantOutput.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleDomain.rts (renamed from resources/sksl/errors/SwizzleDomain.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleMatrix.rts (renamed from resources/sksl/errors/SwizzleMatrix.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleOnlyLiterals.rts (renamed from resources/sksl/errors/SwizzleOnlyLiterals.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleOutOfBounds.rts | 5 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleOutOfBounds.sksl | 5 | ||||
-rw-r--r-- | resources/sksl/errors/SwizzleTooManyComponents.rts (renamed from resources/sksl/errors/SwizzleTooManyComponents.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/TernaryMismatch.rts (renamed from resources/sksl/errors/TernaryMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/UnassignedOutParameter.rts (renamed from resources/sksl/errors/UnassignedOutParameter.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/UndeclaredFunction.rts (renamed from resources/sksl/errors/UndeclaredFunction.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/UndefinedFunction.rts (renamed from resources/sksl/errors/UndefinedFunction.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/UndefinedSymbol.rts (renamed from resources/sksl/errors/UndefinedSymbol.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/UniformVarWithInitializerExpression.rts (renamed from resources/sksl/errors/UniformVarWithInitializerExpression.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/UnscopedVariableInElse.rts | 7 | ||||
-rw-r--r-- | resources/sksl/errors/UnscopedVariableInElse.sksl | 7 | ||||
-rw-r--r-- | resources/sksl/errors/UnscopedVariableInFor.rts (renamed from resources/sksl/errors/UnscopedVariableInFor.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/UnscopedVariableInIf.rts (renamed from resources/sksl/errors/UnscopedVariableInIf.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/UnsupportedGLSLIdentifiers.rts (renamed from resources/sksl/errors/UnsupportedGLSLIdentifiers.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/UsingInvalidValue.rts (renamed from resources/sksl/errors/UsingInvalidValue.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/VectorIndexOutOfRange.rts (renamed from resources/sksl/errors/VectorIndexOutOfRange.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/VectorSlice.rts (renamed from resources/sksl/errors/VectorSlice.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/VoidConstructor.rts (renamed from resources/sksl/errors/VoidConstructor.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/VoidInStruct.rts (renamed from resources/sksl/errors/VoidInStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/VoidVariable.rts (renamed from resources/sksl/errors/VoidVariable.sksl) | 0 | ||||
-rw-r--r-- | tests/SkSLErrorTest.cpp | 3 | ||||
-rw-r--r-- | tests/sksl/errors/BinaryInvalidType.glsl | 6 | ||||
-rw-r--r-- | tests/sksl/errors/BreakOutsideLoop.glsl | 2 | ||||
-rw-r--r-- | tests/sksl/errors/ContinueOutsideLoop.glsl | 4 | ||||
-rw-r--r-- | tests/sksl/errors/DuplicateFunction.glsl | 2 | ||||
-rw-r--r-- | tests/sksl/errors/DuplicateSymbol.glsl | 2 | ||||
-rw-r--r-- | tests/sksl/errors/InterfaceBlockPrivateType.glsl | 4 | ||||
-rw-r--r-- | tests/sksl/errors/MatrixIndexOutOfRange.glsl | 18 | ||||
-rw-r--r-- | tests/sksl/errors/MatrixIndexOutOfRangeES3.glsl | 11 | ||||
-rw-r--r-- | tests/sksl/errors/MismatchedNumbers.glsl | 79 | ||||
-rw-r--r-- | tests/sksl/errors/MismatchedNumbersES3.glsl | 32 | ||||
-rw-r--r-- | tests/sksl/errors/OpenArray.glsl | 4 | ||||
-rw-r--r-- | tests/sksl/errors/OverflowIntLiteral.glsl | 11 | ||||
-rw-r--r-- | tests/sksl/errors/OverflowShortLiteral.glsl | 6 | ||||
-rw-r--r-- | tests/sksl/errors/PrivateTypes.glsl | 13 | ||||
-rw-r--r-- | tests/sksl/errors/RedeclareShaderType.glsl | 4 | ||||
-rw-r--r-- | tests/sksl/errors/ReturnDifferentType.glsl | 2 | ||||
-rw-r--r-- | tests/sksl/errors/UnscopedVariableInElse.glsl | 2 | ||||
-rw-r--r-- | tools/skqp/src/skqp.cpp | 33 |
191 files changed, 542 insertions, 479 deletions
diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni index 80facd6810..d4c4ad4958 100644 --- a/gn/sksl_tests.gni +++ b/gn/sksl_tests.gni @@ -4,100 +4,102 @@ # found in the LICENSE file. sksl_error_tests = [ - "/sksl/errors/ArgumentCountMismatch.sksl", - "/sksl/errors/ArgumentMismatch.sksl", - "/sksl/errors/ArgumentModifiers.sksl", + "/sksl/errors/ArgumentCountMismatch.rts", + "/sksl/errors/ArgumentMismatch.rts", + "/sksl/errors/ArgumentModifiers.rts", "/sksl/errors/ArrayConstructorElementCount.sksl", - "/sksl/errors/ArrayIndexOutOfRange.sksl", + "/sksl/errors/ArrayIndexOutOfRange.rts", "/sksl/errors/ArrayInlinedIndexOutOfRange.sksl", - "/sksl/errors/ArrayNegation.sksl", - "/sksl/errors/ArrayOfInvalidSize.sksl", - "/sksl/errors/ArrayOfVoid.sksl", - "/sksl/errors/ArrayPlus.sksl", - "/sksl/errors/ArrayReturnTypes.sksl", - "/sksl/errors/ArraySplitDimensions.sksl", - "/sksl/errors/ArraySplitDimensionsInFuncBody.sksl", - "/sksl/errors/ArraySplitDimensionsInFuncDecl.sksl", - "/sksl/errors/ArraySplitDimensionsInStruct.sksl", - "/sksl/errors/ArrayTooManyDimensions.sksl", - "/sksl/errors/ArrayTooManyDimensionsInFuncBody.sksl", - "/sksl/errors/ArrayTooManyDimensionsInFuncDecl.sksl", - "/sksl/errors/ArrayTooManyDimensionsInStruct.sksl", - "/sksl/errors/ArrayTypeTooManyDimensions.sksl", - "/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.sksl", - "/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.sksl", - "/sksl/errors/ArrayTypeTooManyDimensionsInStruct.sksl", - "/sksl/errors/ArrayUnspecifiedDimensions.sksl", - "/sksl/errors/AssignmentTypeMismatch.sksl", + "/sksl/errors/ArrayNegation.rts", + "/sksl/errors/ArrayOfInvalidSize.rts", + "/sksl/errors/ArrayOfVoid.rts", + "/sksl/errors/ArrayPlus.rts", + "/sksl/errors/ArrayReturnTypes.rts", + "/sksl/errors/ArraySplitDimensions.rts", + "/sksl/errors/ArraySplitDimensionsInFuncBody.rts", + "/sksl/errors/ArraySplitDimensionsInFuncDecl.rts", + "/sksl/errors/ArraySplitDimensionsInStruct.rts", + "/sksl/errors/ArrayTooManyDimensions.rts", + "/sksl/errors/ArrayTooManyDimensionsInFuncBody.rts", + "/sksl/errors/ArrayTooManyDimensionsInFuncDecl.rts", + "/sksl/errors/ArrayTooManyDimensionsInStruct.rts", + "/sksl/errors/ArrayTypeTooManyDimensions.rts", + "/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.rts", + "/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.rts", + "/sksl/errors/ArrayTypeTooManyDimensionsInStruct.rts", + "/sksl/errors/ArrayUnspecifiedDimensions.rts", + "/sksl/errors/AssignmentTypeMismatch.rts", "/sksl/errors/BadCaps.sksl", - "/sksl/errors/BadConstInitializers.sksl", - "/sksl/errors/BadFieldAccess.sksl", - "/sksl/errors/BadIndex.sksl", + "/sksl/errors/BadConstInitializers.rts", + "/sksl/errors/BadFieldAccess.rts", + "/sksl/errors/BadIndex.rts", "/sksl/errors/BadModifiers.sksl", - "/sksl/errors/BadOctal.sksl", - "/sksl/errors/BinaryInvalidType.sksl", + "/sksl/errors/BadOctal.rts", + "/sksl/errors/BinaryInvalidType.rts", "/sksl/errors/BinaryTypeCoercion.sksl", - "/sksl/errors/BinaryTypeMismatch.sksl", - "/sksl/errors/BitShiftFloat.sksl", - "/sksl/errors/BitShiftFloatMatrix.sksl", - "/sksl/errors/BitShiftFloatVector.sksl", + "/sksl/errors/BinaryTypeMismatch.rts", + "/sksl/errors/BitShiftFloat.rts", + "/sksl/errors/BitShiftFloatMatrix.rts", + "/sksl/errors/BitShiftFloatVector.rts", "/sksl/errors/BooleanArithmetic.sksl", - "/sksl/errors/BreakOutsideLoop.sksl", - "/sksl/errors/CallNonFunction.sksl", + "/sksl/errors/BreakOutsideLoop.rts", + "/sksl/errors/CallNonFunction.rts", "/sksl/errors/CanExitWithoutReturningValue.sksl", - "/sksl/errors/ComparisonDimensional.sksl", - "/sksl/errors/ConstructorArgumentCount.sksl", - "/sksl/errors/ConstructorTypeMismatch.sksl", - "/sksl/errors/ContinueOutsideLoop.sksl", - "/sksl/errors/DivideByZero.sksl", + "/sksl/errors/ComparisonDimensional.rts", + "/sksl/errors/ConstructorArgumentCount.rts", + "/sksl/errors/ConstructorTypeMismatch.rts", + "/sksl/errors/ContinueOutsideLoop.rts", + "/sksl/errors/DivideByZero.rts", "/sksl/errors/DoTypeMismatch.sksl", - "/sksl/errors/DuplicateFunction.sksl", + "/sksl/errors/DuplicateFunction.rts", "/sksl/errors/DuplicateOutput.sksl", - "/sksl/errors/DuplicateSymbol.sksl", - "/sksl/errors/EmptyArray.sksl", - "/sksl/errors/EmptyStruct.sksl", - "/sksl/errors/ErrorsInDeadCode.sksl", - "/sksl/errors/FloatRemainder.sksl", + "/sksl/errors/DuplicateSymbol.rts", + "/sksl/errors/EmptyArray.rts", + "/sksl/errors/EmptyStruct.rts", + "/sksl/errors/ErrorsInDeadCode.rts", + "/sksl/errors/FloatRemainder.rts", "/sksl/errors/ForInitStmt.sksl", - "/sksl/errors/ForTypeMismatch.sksl", - "/sksl/errors/FunctionParameterOfVoid.sksl", - "/sksl/errors/GenericArgumentMismatch.sksl", - "/sksl/errors/PrecisionQualifiersDisallowed.sksl", - "/sksl/errors/IfTypeMismatch.sksl", - "/sksl/errors/InVarWithInitializerExpression.sksl", - "/sksl/errors/IncompleteExpression.sksl", - "/sksl/errors/IncompleteFunctionCall.sksl", + "/sksl/errors/ForTypeMismatch.rts", + "/sksl/errors/FunctionParameterOfVoid.rts", + "/sksl/errors/GenericArgumentMismatch.rts", + "/sksl/errors/IfTypeMismatch.rts", + "/sksl/errors/IncompleteExpression.rts", + "/sksl/errors/IncompleteFunctionCall.rts", "/sksl/errors/InterfaceBlockMemberReservedName.sksl", + "/sksl/errors/InterfaceBlockPrivateType.sksl", "/sksl/errors/InterfaceBlockReservedName.sksl", "/sksl/errors/InterfaceBlockScope.sksl", "/sksl/errors/InterfaceBlockStorageModifiers.sksl", "/sksl/errors/InterfaceBlockWithNoMembers.sksl", "/sksl/errors/IntrinsicInGlobalVariable.sksl", - "/sksl/errors/InvalidAssignment.sksl", - "/sksl/errors/InvalidOutParams.sksl", - "/sksl/errors/InvalidToken.sksl", - "/sksl/errors/InvalidUnary.sksl", + "/sksl/errors/InvalidAssignment.rts", + "/sksl/errors/InvalidOutParams.rts", + "/sksl/errors/InvalidToken.rts", + "/sksl/errors/InvalidUnary.rts", + "/sksl/errors/InVarWithInitializerExpression.sksl", "/sksl/errors/LayoutInFunctions.sksl", "/sksl/errors/LayoutInInterfaceBlock.sksl", "/sksl/errors/LayoutInStruct.sksl", "/sksl/errors/LayoutRepeatedQualifiers.sksl", - "/sksl/errors/MatrixIndexOutOfRange.sksl", + "/sksl/errors/MatrixIndexOutOfRange.rts", + "/sksl/errors/MatrixIndexOutOfRangeES3.sksl", "/sksl/errors/MatrixInlinedIndexOutOfRange.sksl", - "/sksl/errors/MatrixToVectorCast3x3.sksl", - "/sksl/errors/MatrixToVectorCastBoolean.sksl", - "/sksl/errors/MatrixToVectorCastInteger.sksl", - "/sksl/errors/MatrixToVectorCastTooSmall.sksl", - "/sksl/errors/MismatchedNumbers.sksl", - "/sksl/errors/MultipleFields.sksl", + "/sksl/errors/MatrixToVectorCast3x3.rts", + "/sksl/errors/MatrixToVectorCastBoolean.rts", + "/sksl/errors/MatrixToVectorCastInteger.rts", + "/sksl/errors/MatrixToVectorCastTooSmall.rts", + "/sksl/errors/MismatchedNumbers.rts", + "/sksl/errors/MismatchedNumbersES3.sksl", + "/sksl/errors/ModifiersInStruct.rts", + "/sksl/errors/MultipleFields.rts", "/sksl/errors/MultipleFieldsInInterfaceBlocks.sksl", - "/sksl/errors/ModifiersInStruct.sksl", "/sksl/errors/NoES3ModifierInUserCode.sksl", "/sksl/errors/OpaqueTypeAssignment.sksl", "/sksl/errors/OpaqueTypeConstruction.sksl", "/sksl/errors/OpaqueTypeInArray.sksl", "/sksl/errors/OpaqueTypeInInterfaceBlock.sksl", "/sksl/errors/OpaqueTypeInStruct.sksl", - "/sksl/errors/OpenArray.sksl", + "/sksl/errors/OpenArray.rts", "/sksl/errors/Ossfuzz26700.sksl", "/sksl/errors/Ossfuzz27614.sksl", "/sksl/errors/Ossfuzz27650.sksl", @@ -133,113 +135,116 @@ sksl_error_tests = [ "/sksl/errors/Ossfuzz44559.sksl", "/sksl/errors/Ossfuzz44561.sksl", "/sksl/errors/Ossfuzz44565.sksl", - "/sksl/errors/OverflowFloatLiteral.sksl", + "/sksl/errors/OverflowFloatLiteral.rts", "/sksl/errors/OverflowInlinedLiteral.sksl", - "/sksl/errors/OverflowIntLiteral.sksl", - "/sksl/errors/OverflowInt64Literal.sksl", - "/sksl/errors/OverflowParamArraySize.sksl", + "/sksl/errors/OverflowInt64Literal.rts", + "/sksl/errors/OverflowIntLiteral.rts", + "/sksl/errors/OverflowParamArraySize.rts", + "/sksl/errors/OverflowShortLiteral.sksl", "/sksl/errors/OverflowUintLiteral.sksl", - "/sksl/errors/ProgramTooLarge_Globals.sksl", - "/sksl/errors/ProgramTooLarge_Stack.sksl", - "/sksl/errors/PrototypeInFuncBody.sksl", - "/sksl/errors/PrivateTypes.sksl", - "/sksl/errors/PrivateVariables.sksl", - "/sksl/errors/RedeclareBasicType.sksl", + "/sksl/errors/PrecisionQualifiersDisallowed.sksl", + "/sksl/errors/PrivateTypes.rts", + "/sksl/errors/PrivateVariables.rts", + "/sksl/errors/ProgramTooLarge_Globals.rts", + "/sksl/errors/ProgramTooLarge_Stack.rts", + "/sksl/errors/PrototypeInFuncBody.rts", + "/sksl/errors/RedeclareBasicType.rts", "/sksl/errors/RedeclareSamplerType.sksl", - "/sksl/errors/RedeclareStruct.sksl", - "/sksl/errors/RedeclareStructTypeWithName.sksl", - "/sksl/errors/RedeclareUserType.sksl", - "/sksl/errors/RedeclareVariable.sksl", - "/sksl/errors/ReservedNameAsm.sksl", - "/sksl/errors/ReservedNameAttribute.sksl", - "/sksl/errors/ReservedNameCast.sksl", - "/sksl/errors/ReservedNameDouble.sksl", - "/sksl/errors/ReservedNameDvec2.sksl", - "/sksl/errors/ReservedNameDvec3.sksl", - "/sksl/errors/ReservedNameDvec4.sksl", - "/sksl/errors/ReservedNameEnum.sksl", - "/sksl/errors/ReservedNameExtern.sksl", - "/sksl/errors/ReservedNameExternal.sksl", - "/sksl/errors/ReservedNameFixed.sksl", - "/sksl/errors/ReservedNameFvec2.sksl", - "/sksl/errors/ReservedNameFvec3.sksl", - "/sksl/errors/ReservedNameFvec4.sksl", - "/sksl/errors/ReservedNameGoto.sksl", - "/sksl/errors/ReservedNameHvec2.sksl", - "/sksl/errors/ReservedNameHvec3.sksl", - "/sksl/errors/ReservedNameHvec4.sksl", - "/sksl/errors/ReservedNameInput.sksl", - "/sksl/errors/ReservedNameInterface.sksl", - "/sksl/errors/ReservedNameInvariant.sksl", - "/sksl/errors/ReservedNameLong.sksl", - "/sksl/errors/ReservedNameNamespace.sksl", - "/sksl/errors/ReservedNameOutput.sksl", - "/sksl/errors/ReservedNamePacked.sksl", - "/sksl/errors/ReservedNamePrecision.sksl", - "/sksl/errors/ReservedNamePublic.sksl", - "/sksl/errors/ReservedNameSampler1DShadow.sksl", - "/sksl/errors/ReservedNameSampler2DRectShadow.sksl", - "/sksl/errors/ReservedNameSampler2DShadow.sksl", - "/sksl/errors/ReservedNameSampler3DRect.sksl", - "/sksl/errors/ReservedNameSamplerCube.sksl", - "/sksl/errors/ReservedNameSizeof.sksl", - "/sksl/errors/ReservedNameStatic.sksl", - "/sksl/errors/ReservedNameSuperp.sksl", - "/sksl/errors/ReservedNameTemplate.sksl", - "/sksl/errors/ReservedNameThis.sksl", - "/sksl/errors/ReservedNameTypedef.sksl", - "/sksl/errors/ReservedNameUnion.sksl", - "/sksl/errors/ReservedNameUnsigned.sksl", - "/sksl/errors/ReservedNameUsing.sksl", - "/sksl/errors/ReservedNameVarying.sksl", - "/sksl/errors/ReservedNameVolatile.sksl", - "/sksl/errors/ReturnDifferentType.sksl", - "/sksl/errors/ReturnFromVoid.sksl", - "/sksl/errors/ReturnMissingValue.sksl", - "/sksl/errors/ReturnTypeMismatch.sksl", - "/sksl/errors/SelfReferentialInitializerExpression.sksl", - "/sksl/errors/SpuriousFloat.sksl", + "/sksl/errors/RedeclareShaderType.rts", + "/sksl/errors/RedeclareStruct.rts", + "/sksl/errors/RedeclareStructTypeWithName.rts", + "/sksl/errors/RedeclareUserType.rts", + "/sksl/errors/RedeclareVariable.rts", + "/sksl/errors/ReservedNameAsm.rts", + "/sksl/errors/ReservedNameAttribute.rts", + "/sksl/errors/ReservedNameCast.rts", + "/sksl/errors/ReservedNameDouble.rts", + "/sksl/errors/ReservedNameDvec2.rts", + "/sksl/errors/ReservedNameDvec3.rts", + "/sksl/errors/ReservedNameDvec4.rts", + "/sksl/errors/ReservedNameEnum.rts", + "/sksl/errors/ReservedNameExtern.rts", + "/sksl/errors/ReservedNameExternal.rts", + "/sksl/errors/ReservedNameFixed.rts", + "/sksl/errors/ReservedNameFvec2.rts", + "/sksl/errors/ReservedNameFvec3.rts", + "/sksl/errors/ReservedNameFvec4.rts", + "/sksl/errors/ReservedNameGoto.rts", + "/sksl/errors/ReservedNameHvec2.rts", + "/sksl/errors/ReservedNameHvec3.rts", + "/sksl/errors/ReservedNameHvec4.rts", + "/sksl/errors/ReservedNameInput.rts", + "/sksl/errors/ReservedNameInterface.rts", + "/sksl/errors/ReservedNameInvariant.rts", + "/sksl/errors/ReservedNameLong.rts", + "/sksl/errors/ReservedNameNamespace.rts", + "/sksl/errors/ReservedNameOutput.rts", + "/sksl/errors/ReservedNamePacked.rts", + "/sksl/errors/ReservedNamePrecision.rts", + "/sksl/errors/ReservedNamePublic.rts", + "/sksl/errors/ReservedNameSampler1DShadow.rts", + "/sksl/errors/ReservedNameSampler2DRectShadow.rts", + "/sksl/errors/ReservedNameSampler2DShadow.rts", + "/sksl/errors/ReservedNameSampler3DRect.rts", + "/sksl/errors/ReservedNameSamplerCube.rts", + "/sksl/errors/ReservedNameSizeof.rts", + "/sksl/errors/ReservedNameStatic.rts", + "/sksl/errors/ReservedNameSuperp.rts", + "/sksl/errors/ReservedNameTemplate.rts", + "/sksl/errors/ReservedNameThis.rts", + "/sksl/errors/ReservedNameTypedef.rts", + "/sksl/errors/ReservedNameUnion.rts", + "/sksl/errors/ReservedNameUnsigned.rts", + "/sksl/errors/ReservedNameUsing.rts", + "/sksl/errors/ReservedNameVarying.rts", + "/sksl/errors/ReservedNameVolatile.rts", + "/sksl/errors/ReturnDifferentType.rts", + "/sksl/errors/ReturnFromVoid.rts", + "/sksl/errors/ReturnMissingValue.rts", + "/sksl/errors/ReturnTypeMismatch.rts", + "/sksl/errors/SelfReferentialInitializerExpression.rts", + "/sksl/errors/SpuriousFloat.rts", "/sksl/errors/StaticIfTest.sksl", "/sksl/errors/StaticSwitchConditionalBreak.sksl", "/sksl/errors/StaticSwitchTest.sksl", "/sksl/errors/StaticSwitchWithConditionalBreak.sksl", "/sksl/errors/StaticSwitchWithConditionalContinue.sksl", "/sksl/errors/StaticSwitchWithConditionalReturn.sksl", - "/sksl/errors/StructMemberReservedName.sksl", - "/sksl/errors/StructNameWithoutIdentifier.sksl", - "/sksl/errors/StructTooDeeplyNested.sksl", - "/sksl/errors/StructVariableReservedName.sksl", - "/sksl/errors/SwitchDuplicateCase.sksl", - "/sksl/errors/SwitchDuplicateDefault.sksl", - "/sksl/errors/SwitchTypes.sksl", + "/sksl/errors/StructMemberReservedName.rts", + "/sksl/errors/StructNameWithoutIdentifier.rts", + "/sksl/errors/StructTooDeeplyNested.rts", + "/sksl/errors/StructVariableReservedName.rts", + "/sksl/errors/SwitchDuplicateCase.rts", + "/sksl/errors/SwitchDuplicateDefault.rts", + "/sksl/errors/SwitchTypes.rts", "/sksl/errors/SwitchWithContinueInside.sksl", - "/sksl/errors/SwizzleConstantOutput.sksl", - "/sksl/errors/SwizzleDomain.sksl", - "/sksl/errors/SwizzleMatrix.sksl", - "/sksl/errors/SwizzleOnlyLiterals.sksl", - "/sksl/errors/SwizzleOutOfBounds.sksl", - "/sksl/errors/SwizzleTooManyComponents.sksl", - "/sksl/errors/TernaryMismatch.sksl", - "/sksl/errors/UnassignedOutParameter.sksl", - "/sksl/errors/UndeclaredFunction.sksl", - "/sksl/errors/UndefinedFunction.sksl", - "/sksl/errors/UndefinedSymbol.sksl", - "/sksl/errors/UniformVarWithInitializerExpression.sksl", + "/sksl/errors/SwizzleConstantOutput.rts", + "/sksl/errors/SwizzleDomain.rts", + "/sksl/errors/SwizzleMatrix.rts", + "/sksl/errors/SwizzleOnlyLiterals.rts", + "/sksl/errors/SwizzleOutOfBounds.rts", + "/sksl/errors/SwizzleTooManyComponents.rts", + "/sksl/errors/TernaryMismatch.rts", + "/sksl/errors/UnassignedOutParameter.rts", + "/sksl/errors/UndeclaredFunction.rts", + "/sksl/errors/UndefinedFunction.rts", + "/sksl/errors/UndefinedSymbol.rts", + "/sksl/errors/UniformVarWithInitializerExpression.rts", "/sksl/errors/UnknownDivideByZero.sksl", - "/sksl/errors/UnsupportedGLSLIdentifiers.sksl", "/sksl/errors/UnscopedVariableInDoWhile.sksl", - "/sksl/errors/UnscopedVariableInElse.sksl", - "/sksl/errors/UnscopedVariableInFor.sksl", - "/sksl/errors/UnscopedVariableInIf.sksl", + "/sksl/errors/UnscopedVariableInElse.rts", + "/sksl/errors/UnscopedVariableInFor.rts", + "/sksl/errors/UnscopedVariableInIf.rts", "/sksl/errors/UnscopedVariableInWhile.sksl", - "/sksl/errors/UsingInvalidValue.sksl", - "/sksl/errors/VectorIndexOutOfRange.sksl", + "/sksl/errors/UnsupportedGLSLIdentifiers.rts", + "/sksl/errors/UsingInvalidValue.rts", + "/sksl/errors/VectorIndexOutOfRange.rts", "/sksl/errors/VectorInlinedIndexOutOfRange.sksl", - "/sksl/errors/VectorSlice.sksl", + "/sksl/errors/VectorSlice.rts", "/sksl/errors/VertexEarlyReturn.vert", - "/sksl/errors/VoidConstructor.sksl", - "/sksl/errors/VoidInStruct.sksl", - "/sksl/errors/VoidVariable.sksl", + "/sksl/errors/VoidConstructor.rts", + "/sksl/errors/VoidInStruct.rts", + "/sksl/errors/VoidVariable.rts", "/sksl/errors/WhileTypeMismatch.sksl", ] @@ -287,7 +292,7 @@ sksl_spirv_tests = [ "/sksl/errors/LayoutInStruct.sksl", "/sksl/errors/Ossfuzz36850.sksl", "/sksl/errors/Ossfuzz37469.sksl", - "/sksl/errors/UndefinedFunction.sksl", + "/sksl/errors/UndefinedFunction.rts", ] sksl_shared_tests = [ diff --git a/resources/sksl/errors/ArgumentCountMismatch.sksl b/resources/sksl/errors/ArgumentCountMismatch.rts index 9034e975f0..d4aa858fbe 100644 --- a/resources/sksl/errors/ArgumentCountMismatch.sksl +++ b/resources/sksl/errors/ArgumentCountMismatch.rts @@ -2,7 +2,7 @@ float foo(float x) { return x * x; } -void main() { +void caller() { float x = foo(1, 2); } diff --git a/resources/sksl/errors/ArgumentMismatch.sksl b/resources/sksl/errors/ArgumentMismatch.rts index 6a000ccaac..c11d451b58 100644 --- a/resources/sksl/errors/ArgumentMismatch.sksl +++ b/resources/sksl/errors/ArgumentMismatch.rts @@ -2,7 +2,7 @@ float foo(float x) { return x * x; } -void main() { +void caller() { float x = foo(true); } diff --git a/resources/sksl/errors/ArgumentModifiers.sksl b/resources/sksl/errors/ArgumentModifiers.rts index 2ae3c416fe..2ae3c416fe 100644 --- a/resources/sksl/errors/ArgumentModifiers.sksl +++ b/resources/sksl/errors/ArgumentModifiers.rts diff --git a/resources/sksl/errors/ArrayIndexOutOfRange.sksl b/resources/sksl/errors/ArrayIndexOutOfRange.rts index 610e6e6a88..610e6e6a88 100644 --- a/resources/sksl/errors/ArrayIndexOutOfRange.sksl +++ b/resources/sksl/errors/ArrayIndexOutOfRange.rts diff --git a/resources/sksl/errors/ArrayNegation.sksl b/resources/sksl/errors/ArrayNegation.rts index 179023d686..179023d686 100644 --- a/resources/sksl/errors/ArrayNegation.sksl +++ b/resources/sksl/errors/ArrayNegation.rts diff --git a/resources/sksl/errors/ArrayOfInvalidSize.sksl b/resources/sksl/errors/ArrayOfInvalidSize.rts index a67f47af28..a67f47af28 100644 --- a/resources/sksl/errors/ArrayOfInvalidSize.sksl +++ b/resources/sksl/errors/ArrayOfInvalidSize.rts diff --git a/resources/sksl/errors/ArrayOfVoid.sksl b/resources/sksl/errors/ArrayOfVoid.rts index f7b3e2aa3c..f7b3e2aa3c 100644 --- a/resources/sksl/errors/ArrayOfVoid.sksl +++ b/resources/sksl/errors/ArrayOfVoid.rts diff --git a/resources/sksl/errors/ArrayPlus.sksl b/resources/sksl/errors/ArrayPlus.rts index 4e3a67f353..4e3a67f353 100644 --- a/resources/sksl/errors/ArrayPlus.sksl +++ b/resources/sksl/errors/ArrayPlus.rts diff --git a/resources/sksl/errors/ArrayReturnTypes.sksl b/resources/sksl/errors/ArrayReturnTypes.rts index e85836412f..e85836412f 100644 --- a/resources/sksl/errors/ArrayReturnTypes.sksl +++ b/resources/sksl/errors/ArrayReturnTypes.rts diff --git a/resources/sksl/errors/ArraySplitDimensions.sksl b/resources/sksl/errors/ArraySplitDimensions.rts index b138427f2d..b138427f2d 100644 --- a/resources/sksl/errors/ArraySplitDimensions.sksl +++ b/resources/sksl/errors/ArraySplitDimensions.rts diff --git a/resources/sksl/errors/ArraySplitDimensionsInFuncBody.sksl b/resources/sksl/errors/ArraySplitDimensionsInFuncBody.rts index ebe124e2f0..ebe124e2f0 100644 --- a/resources/sksl/errors/ArraySplitDimensionsInFuncBody.sksl +++ b/resources/sksl/errors/ArraySplitDimensionsInFuncBody.rts diff --git a/resources/sksl/errors/ArraySplitDimensionsInFuncDecl.sksl b/resources/sksl/errors/ArraySplitDimensionsInFuncDecl.rts index 659c9cf3b6..659c9cf3b6 100644 --- a/resources/sksl/errors/ArraySplitDimensionsInFuncDecl.sksl +++ b/resources/sksl/errors/ArraySplitDimensionsInFuncDecl.rts diff --git a/resources/sksl/errors/ArraySplitDimensionsInStruct.sksl b/resources/sksl/errors/ArraySplitDimensionsInStruct.rts index bbec234f77..bbec234f77 100644 --- a/resources/sksl/errors/ArraySplitDimensionsInStruct.sksl +++ b/resources/sksl/errors/ArraySplitDimensionsInStruct.rts diff --git a/resources/sksl/errors/ArrayTooManyDimensions.sksl b/resources/sksl/errors/ArrayTooManyDimensions.rts index 6036a389a3..6036a389a3 100644 --- a/resources/sksl/errors/ArrayTooManyDimensions.sksl +++ b/resources/sksl/errors/ArrayTooManyDimensions.rts diff --git a/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.rts b/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.rts new file mode 100644 index 0000000000..f2595287fe --- /dev/null +++ b/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.rts @@ -0,0 +1,5 @@ +void func() { float x[2][2]; } + +/*%%* +multi-dimensional arrays are not supported +*%%*/ diff --git a/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.sksl b/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.sksl deleted file mode 100644 index 8cd0683200..0000000000 --- a/resources/sksl/errors/ArrayTooManyDimensionsInFuncBody.sksl +++ /dev/null @@ -1,5 +0,0 @@ -void main() { float x[2][2]; } - -/*%%* -multi-dimensional arrays are not supported -*%%*/ diff --git a/resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.sksl b/resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.rts index c5233be9bf..c5233be9bf 100644 --- a/resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.sksl +++ b/resources/sksl/errors/ArrayTooManyDimensionsInFuncDecl.rts diff --git a/resources/sksl/errors/ArrayTooManyDimensionsInStruct.sksl b/resources/sksl/errors/ArrayTooManyDimensionsInStruct.rts index af88fe1e02..af88fe1e02 100644 --- a/resources/sksl/errors/ArrayTooManyDimensionsInStruct.sksl +++ b/resources/sksl/errors/ArrayTooManyDimensionsInStruct.rts diff --git a/resources/sksl/errors/ArrayTypeTooManyDimensions.sksl b/resources/sksl/errors/ArrayTypeTooManyDimensions.rts index 362280146c..362280146c 100644 --- a/resources/sksl/errors/ArrayTypeTooManyDimensions.sksl +++ b/resources/sksl/errors/ArrayTypeTooManyDimensions.rts diff --git a/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.rts b/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.rts new file mode 100644 index 0000000000..7c9901fe5e --- /dev/null +++ b/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.rts @@ -0,0 +1,5 @@ +void func() { float[2][2] x; } + +/*%%* +multi-dimensional arrays are not supported +*%%*/ diff --git a/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.sksl b/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.sksl deleted file mode 100644 index a609cefebd..0000000000 --- a/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.sksl +++ /dev/null @@ -1,5 +0,0 @@ -void main() { float[2][2] x; } - -/*%%* -multi-dimensional arrays are not supported -*%%*/ diff --git a/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.sksl b/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.rts index ba73f3f318..ba73f3f318 100644 --- a/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.sksl +++ b/resources/sksl/errors/ArrayTypeTooManyDimensionsInFuncDecl.rts diff --git a/resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.sksl b/resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.rts index 5e0e58a898..5e0e58a898 100644 --- a/resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.sksl +++ b/resources/sksl/errors/ArrayTypeTooManyDimensionsInStruct.rts diff --git a/resources/sksl/errors/ArrayUnspecifiedDimensions.sksl b/resources/sksl/errors/ArrayUnspecifiedDimensions.rts index 16b84d1442..e87d22a12c 100644 --- a/resources/sksl/errors/ArrayUnspecifiedDimensions.sksl +++ b/resources/sksl/errors/ArrayUnspecifiedDimensions.rts @@ -1,6 +1,6 @@ -in int arrUnsized[]; -in int arrFloat[1.]; -in int arrBool[true]; +int arrUnsized[]; +int arrFloat[1.]; +int arrBool[true]; int unsized_in_expression() { return int[](0)[0]; } diff --git a/resources/sksl/errors/AssignmentTypeMismatch.sksl b/resources/sksl/errors/AssignmentTypeMismatch.rts index 26e5e8a33a..26e5e8a33a 100644 --- a/resources/sksl/errors/AssignmentTypeMismatch.sksl +++ b/resources/sksl/errors/AssignmentTypeMismatch.rts diff --git a/resources/sksl/errors/BadConstInitializers.sksl b/resources/sksl/errors/BadConstInitializers.rts index 73aa9a9a69..73aa9a9a69 100644 --- a/resources/sksl/errors/BadConstInitializers.sksl +++ b/resources/sksl/errors/BadConstInitializers.rts diff --git a/resources/sksl/errors/BadFieldAccess.sksl b/resources/sksl/errors/BadFieldAccess.rts index bbf5ee5e34..bbf5ee5e34 100644 --- a/resources/sksl/errors/BadFieldAccess.sksl +++ b/resources/sksl/errors/BadFieldAccess.rts diff --git a/resources/sksl/errors/BadIndex.sksl b/resources/sksl/errors/BadIndex.rts index d68b32ec16..d68b32ec16 100644 --- a/resources/sksl/errors/BadIndex.sksl +++ b/resources/sksl/errors/BadIndex.rts diff --git a/resources/sksl/errors/BadOctal.sksl b/resources/sksl/errors/BadOctal.rts index a7fe38bc98..a7fe38bc98 100644 --- a/resources/sksl/errors/BadOctal.sksl +++ b/resources/sksl/errors/BadOctal.rts diff --git a/resources/sksl/errors/BinaryInvalidType.sksl b/resources/sksl/errors/BinaryInvalidType.rts index 86b4a48a2d..627bce8619 100644 --- a/resources/sksl/errors/BinaryInvalidType.sksl +++ b/resources/sksl/errors/BinaryInvalidType.rts @@ -26,18 +26,18 @@ void structBoth() { float x = s * s; } -sampler2D smp; +uniform shader shad; -void samplerLeft() { - float x = smp * 2; +void shaderLeft() { + float x = shad * 2; } -void samplerRight() { - float x = 2 * smp; +void shaderRight() { + float x = 2 * shad; } -void samplerBoth() { - float x = smp * smp; +void shaderBoth() { + float x = shad * shad; } int array[1]; @@ -61,9 +61,9 @@ type mismatch: '*' cannot operate on '<INVALID>', '<INVALID>' type mismatch: '*' cannot operate on 'S', 'int' type mismatch: '*' cannot operate on 'int', 'S' type mismatch: '*' cannot operate on 'S', 'S' -type mismatch: '*' cannot operate on 'sampler2D', 'int' -type mismatch: '*' cannot operate on 'int', 'sampler2D' -type mismatch: '*' cannot operate on 'sampler2D', 'sampler2D' +type mismatch: '*' cannot operate on 'shader', 'int' +type mismatch: '*' cannot operate on 'int', 'shader' +type mismatch: '*' cannot operate on 'shader', 'shader' type mismatch: '*' cannot operate on 'int[1]', 'int' type mismatch: '*' cannot operate on 'int', 'int[1]' type mismatch: '*' cannot operate on 'int[1]', 'int[1]' diff --git a/resources/sksl/errors/BinaryTypeMismatch.sksl b/resources/sksl/errors/BinaryTypeMismatch.rts index 4a3eb55253..4a3eb55253 100644 --- a/resources/sksl/errors/BinaryTypeMismatch.sksl +++ b/resources/sksl/errors/BinaryTypeMismatch.rts diff --git a/resources/sksl/errors/BitShiftFloat.sksl b/resources/sksl/errors/BitShiftFloat.rts index 58a82a7dc9..58a82a7dc9 100644 --- a/resources/sksl/errors/BitShiftFloat.sksl +++ b/resources/sksl/errors/BitShiftFloat.rts diff --git a/resources/sksl/errors/BitShiftFloatMatrix.sksl b/resources/sksl/errors/BitShiftFloatMatrix.rts index 0b9374b332..0b9374b332 100644 --- a/resources/sksl/errors/BitShiftFloatMatrix.sksl +++ b/resources/sksl/errors/BitShiftFloatMatrix.rts diff --git a/resources/sksl/errors/BitShiftFloatVector.sksl b/resources/sksl/errors/BitShiftFloatVector.rts index bac8a76168..bac8a76168 100644 --- a/resources/sksl/errors/BitShiftFloatVector.sksl +++ b/resources/sksl/errors/BitShiftFloatVector.rts diff --git a/resources/sksl/errors/BreakOutsideLoop.rts b/resources/sksl/errors/BreakOutsideLoop.rts new file mode 100644 index 0000000000..8dbbb92ebf --- /dev/null +++ b/resources/sksl/errors/BreakOutsideLoop.rts @@ -0,0 +1,8 @@ +void outside_loop() { + for (int x=0; x<10; ++x) {} + if (true) break; +} + +/*%%* +break statement must be inside a loop or switch +*%%*/ diff --git a/resources/sksl/errors/BreakOutsideLoop.sksl b/resources/sksl/errors/BreakOutsideLoop.sksl deleted file mode 100644 index 4da67ccc88..0000000000 --- a/resources/sksl/errors/BreakOutsideLoop.sksl +++ /dev/null @@ -1,5 +0,0 @@ -void outside_while() { while(true) {} if (true) break; } - -/*%%* -break statement must be inside a loop or switch -*%%*/ diff --git a/resources/sksl/errors/CallNonFunction.sksl b/resources/sksl/errors/CallNonFunction.rts index 0ce09c6022..0d4af2cbe6 100644 --- a/resources/sksl/errors/CallNonFunction.sksl +++ b/resources/sksl/errors/CallNonFunction.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float x = 3; x(); } diff --git a/resources/sksl/errors/ComparisonDimensional.sksl b/resources/sksl/errors/ComparisonDimensional.rts index 933fa4e879..933fa4e879 100644 --- a/resources/sksl/errors/ComparisonDimensional.sksl +++ b/resources/sksl/errors/ComparisonDimensional.rts diff --git a/resources/sksl/errors/ConstructorArgumentCount.sksl b/resources/sksl/errors/ConstructorArgumentCount.rts index 6977bdf3ba..6977bdf3ba 100644 --- a/resources/sksl/errors/ConstructorArgumentCount.sksl +++ b/resources/sksl/errors/ConstructorArgumentCount.rts diff --git a/resources/sksl/errors/ConstructorTypeMismatch.sksl b/resources/sksl/errors/ConstructorTypeMismatch.rts index 4a54bbf876..4a54bbf876 100644 --- a/resources/sksl/errors/ConstructorTypeMismatch.sksl +++ b/resources/sksl/errors/ConstructorTypeMismatch.rts diff --git a/resources/sksl/errors/ContinueOutsideLoop.rts b/resources/sksl/errors/ContinueOutsideLoop.rts new file mode 100644 index 0000000000..6e557fa9cc --- /dev/null +++ b/resources/sksl/errors/ContinueOutsideLoop.rts @@ -0,0 +1,15 @@ +void outside_for() { + for (int x=0; x<10; ++x) {} + continue; +} + +void inside_switch() { + switch (1) { + default: continue; + } +} + +/*%%* +continue statement must be inside a loop +continue statement must be inside a loop +*%%*/ diff --git a/resources/sksl/errors/ContinueOutsideLoop.sksl b/resources/sksl/errors/ContinueOutsideLoop.sksl deleted file mode 100644 index e4b98f2a7c..0000000000 --- a/resources/sksl/errors/ContinueOutsideLoop.sksl +++ /dev/null @@ -1,7 +0,0 @@ -void outside_for() { for (;;) {} continue; } -void inside_switch() { switch (1) { default: continue; } } - -/*%%* -continue statement must be inside a loop -continue statement must be inside a loop -*%%*/ diff --git a/resources/sksl/errors/DivideByZero.sksl b/resources/sksl/errors/DivideByZero.rts index 7f72eccbfc..7f72eccbfc 100644 --- a/resources/sksl/errors/DivideByZero.sksl +++ b/resources/sksl/errors/DivideByZero.rts diff --git a/resources/sksl/errors/DuplicateFunction.rts b/resources/sksl/errors/DuplicateFunction.rts new file mode 100644 index 0000000000..1acf05c606 --- /dev/null +++ b/resources/sksl/errors/DuplicateFunction.rts @@ -0,0 +1,6 @@ +void func() {} +void func() {} + +/*%%* +duplicate definition of void func() +*%%*/ diff --git a/resources/sksl/errors/DuplicateFunction.sksl b/resources/sksl/errors/DuplicateFunction.sksl deleted file mode 100644 index 4125e2cad1..0000000000 --- a/resources/sksl/errors/DuplicateFunction.sksl +++ /dev/null @@ -1,6 +0,0 @@ -void main() {} -void main() {} - -/*%%* -duplicate definition of void main() -*%%*/ diff --git a/resources/sksl/errors/DuplicateSymbol.sksl b/resources/sksl/errors/DuplicateSymbol.rts index 8785fcc646..ddf82b178d 100644 --- a/resources/sksl/errors/DuplicateSymbol.sksl +++ b/resources/sksl/errors/DuplicateSymbol.rts @@ -1,13 +1,13 @@ int x; int x; -int main; -void main() { +int func; +void func() { int y,y; } /*%%* symbol 'x' was already defined -symbol 'main' was already defined +symbol 'func' was already defined symbol 'y' was already defined *%%*/ diff --git a/resources/sksl/errors/EmptyArray.sksl b/resources/sksl/errors/EmptyArray.rts index 08502e18b5..08502e18b5 100644 --- a/resources/sksl/errors/EmptyArray.sksl +++ b/resources/sksl/errors/EmptyArray.rts diff --git a/resources/sksl/errors/EmptyStruct.sksl b/resources/sksl/errors/EmptyStruct.rts index d0245e89d8..d0245e89d8 100644 --- a/resources/sksl/errors/EmptyStruct.sksl +++ b/resources/sksl/errors/EmptyStruct.rts diff --git a/resources/sksl/errors/ErrorsInDeadCode.sksl b/resources/sksl/errors/ErrorsInDeadCode.rts index 2f297d24f3..2f297d24f3 100644 --- a/resources/sksl/errors/ErrorsInDeadCode.sksl +++ b/resources/sksl/errors/ErrorsInDeadCode.rts diff --git a/resources/sksl/errors/FloatRemainder.sksl b/resources/sksl/errors/FloatRemainder.rts index fd6f360b52..fd6f360b52 100644 --- a/resources/sksl/errors/FloatRemainder.sksl +++ b/resources/sksl/errors/FloatRemainder.rts diff --git a/resources/sksl/errors/ForTypeMismatch.sksl b/resources/sksl/errors/ForTypeMismatch.rts index 590027e57f..82ea19a41f 100644 --- a/resources/sksl/errors/ForTypeMismatch.sksl +++ b/resources/sksl/errors/ForTypeMismatch.rts @@ -1,4 +1,4 @@ -void main() { +void func() { for (int x = 0; x; x++) {} } diff --git a/resources/sksl/errors/FunctionParameterOfVoid.sksl b/resources/sksl/errors/FunctionParameterOfVoid.rts index e5804dafd4..e5804dafd4 100644 --- a/resources/sksl/errors/FunctionParameterOfVoid.sksl +++ b/resources/sksl/errors/FunctionParameterOfVoid.rts diff --git a/resources/sksl/errors/GenericArgumentMismatch.sksl b/resources/sksl/errors/GenericArgumentMismatch.rts index 0dc3470afb..0dc3470afb 100644 --- a/resources/sksl/errors/GenericArgumentMismatch.sksl +++ b/resources/sksl/errors/GenericArgumentMismatch.rts diff --git a/resources/sksl/errors/IfTypeMismatch.sksl b/resources/sksl/errors/IfTypeMismatch.rts index b612fa99ba..0dc454084c 100644 --- a/resources/sksl/errors/IfTypeMismatch.sksl +++ b/resources/sksl/errors/IfTypeMismatch.rts @@ -1,4 +1,4 @@ -void main() { +void func() { if (3) {} } diff --git a/resources/sksl/errors/IncompleteExpression.sksl b/resources/sksl/errors/IncompleteExpression.rts index b0a6910d49..b0a6910d49 100644 --- a/resources/sksl/errors/IncompleteExpression.sksl +++ b/resources/sksl/errors/IncompleteExpression.rts diff --git a/resources/sksl/errors/IncompleteFunctionCall.sksl b/resources/sksl/errors/IncompleteFunctionCall.rts index f63ab9bc53..f63ab9bc53 100644 --- a/resources/sksl/errors/IncompleteFunctionCall.sksl +++ b/resources/sksl/errors/IncompleteFunctionCall.rts diff --git a/resources/sksl/errors/InterfaceBlockPrivateType.sksl b/resources/sksl/errors/InterfaceBlockPrivateType.sksl new file mode 100644 index 0000000000..892a947873 --- /dev/null +++ b/resources/sksl/errors/InterfaceBlockPrivateType.sksl @@ -0,0 +1,7 @@ +InterfaceBlock { + $mat g; +}; + +/*%%* +type '$mat' is private +*%%*/ diff --git a/resources/sksl/errors/InvalidAssignment.sksl b/resources/sksl/errors/InvalidAssignment.rts index 58a6a206eb..58a6a206eb 100644 --- a/resources/sksl/errors/InvalidAssignment.sksl +++ b/resources/sksl/errors/InvalidAssignment.rts diff --git a/resources/sksl/errors/InvalidOutParams.sksl b/resources/sksl/errors/InvalidOutParams.rts index 9df805e20e..9df805e20e 100644 --- a/resources/sksl/errors/InvalidOutParams.sksl +++ b/resources/sksl/errors/InvalidOutParams.rts diff --git a/resources/sksl/errors/InvalidToken.sksl b/resources/sksl/errors/InvalidToken.rts index 5ec472d9d9..27e4404db7 100644 --- a/resources/sksl/errors/InvalidToken.sksl +++ b/resources/sksl/errors/InvalidToken.rts @@ -1,5 +1,5 @@ 💩 -void main() {} +void func() {} /*%%* invalid token diff --git a/resources/sksl/errors/InvalidUnary.sksl b/resources/sksl/errors/InvalidUnary.rts index 19ba562bb7..19ba562bb7 100644 --- a/resources/sksl/errors/InvalidUnary.sksl +++ b/resources/sksl/errors/InvalidUnary.rts diff --git a/resources/sksl/errors/MatrixIndexOutOfRange.rts b/resources/sksl/errors/MatrixIndexOutOfRange.rts new file mode 100644 index 0000000000..0c28aa04dc --- /dev/null +++ b/resources/sksl/errors/MatrixIndexOutOfRange.rts @@ -0,0 +1,26 @@ +void half3x3_neg1() { half3x3 m; half3 v = m[-1]; } +void half3x3_0() { half3x3 m; half3 v = m[0]; } +void half3x3_1() { half3x3 m; half3 v = m[1]; } +void half3x3_2() { half3x3 m; half3 v = m[2]; } +void half3x3_3() { half3x3 m; half3 v = m[3]; } +void half3x3_4() { half3x3 m; half3 v = m[4]; } +void half3x3_huge() { half3x3 m; half3 v = m[1000000000]; } + +void half3x3_neg1_constidx() { half3x3 m; const int INDEX = -1; half3 v = m[INDEX]; } +void half3x3_0_constidx() { half3x3 m; const int INDEX = 0; half3 v = m[INDEX]; } +void half3x3_1_constidx() { half3x3 m; const int INDEX = 1; half3 v = m[INDEX]; } +void half3x3_2_constidx() { half3x3 m; const int INDEX = 2; half3 v = m[INDEX]; } +void half3x3_3_constidx() { half3x3 m; const int INDEX = 3; half3 v = m[INDEX]; } +void half3x3_4_constidx() { half3x3 m; const int INDEX = 4; half3 v = m[INDEX]; } +void half3x3_huge_constidx() { half3x3 m; const int INDEX = 1000000000; half3 v = m[INDEX]; } + +/*%%* +index -1 out of range for 'half3x3' +index 3 out of range for 'half3x3' +index 4 out of range for 'half3x3' +index 1000000000 out of range for 'half3x3' +index -1 out of range for 'half3x3' +index 3 out of range for 'half3x3' +index 4 out of range for 'half3x3' +index 1000000000 out of range for 'half3x3' +*%%*/ diff --git a/resources/sksl/errors/MatrixIndexOutOfRange.sksl b/resources/sksl/errors/MatrixIndexOutOfRange.sksl deleted file mode 100644 index ecdfc6e934..0000000000 --- a/resources/sksl/errors/MatrixIndexOutOfRange.sksl +++ /dev/null @@ -1,50 +0,0 @@ -void half2x4_neg1() { half2x4 m; half4 v = m[-1]; } -void half2x4_0() { half2x4 m; half4 v = m[0]; } -void half2x4_1() { half2x4 m; half4 v = m[1]; } -void half2x4_2() { half2x4 m; half4 v = m[2]; } -void half2x4_3() { half2x4 m; half4 v = m[3]; } -void half2x4_4() { half2x4 m; half4 v = m[4]; } -void half2x4_huge() { half2x4 m; half4 v = m[1000000000]; } - -void half3x3_neg1() { half3x3 m; half3 v = m[-1]; } -void half3x3_0() { half3x3 m; half3 v = m[0]; } -void half3x3_1() { half3x3 m; half3 v = m[1]; } -void half3x3_2() { half3x3 m; half3 v = m[2]; } -void half3x3_3() { half3x3 m; half3 v = m[3]; } -void half3x3_4() { half3x3 m; half3 v = m[4]; } -void half3x3_huge() { half3x3 m; half3 v = m[1000000000]; } - -void half4x2_neg1() { half4x2 m; half2 v = m[-1]; } -void half4x2_0() { half4x2 m; half2 v = m[0]; } -void half4x2_1() { half4x2 m; half2 v = m[1]; } -void half4x2_2() { half4x2 m; half2 v = m[2]; } -void half4x2_3() { half4x2 m; half2 v = m[3]; } -void half4x2_4() { half4x2 m; half2 v = m[4]; } -void half4x2_huge() { half4x2 m; half2 v = m[1000000000]; } - -void half4_neg1_constidx() { half3x3 m; const int INDEX = -1; half3 v = m[INDEX]; } -void half4_0_constidx() { half3x3 m; const int INDEX = 0; half3 v = m[INDEX]; } -void half4_1_constidx() { half3x3 m; const int INDEX = 1; half3 v = m[INDEX]; } -void half4_2_constidx() { half3x3 m; const int INDEX = 2; half3 v = m[INDEX]; } -void half4_3_constidx() { half3x3 m; const int INDEX = 3; half3 v = m[INDEX]; } -void half4_4_constidx() { half3x3 m; const int INDEX = 4; half3 v = m[INDEX]; } -void half4_huge_constidx() { half3x3 m; const int INDEX = 1000000000; half3 v = m[INDEX]; } - -/*%%* -index -1 out of range for 'half2x4' -index 2 out of range for 'half2x4' -index 3 out of range for 'half2x4' -index 4 out of range for 'half2x4' -index 1000000000 out of range for 'half2x4' -index -1 out of range for 'half3x3' -index 3 out of range for 'half3x3' -index 4 out of range for 'half3x3' -index 1000000000 out of range for 'half3x3' -index -1 out of range for 'half4x2' -index 4 out of range for 'half4x2' -index 1000000000 out of range for 'half4x2' -index -1 out of range for 'half3x3' -index 3 out of range for 'half3x3' -index 4 out of range for 'half3x3' -index 1000000000 out of range for 'half3x3' -*%%*/ diff --git a/resources/sksl/errors/MatrixIndexOutOfRangeES3.sksl b/resources/sksl/errors/MatrixIndexOutOfRangeES3.sksl new file mode 100644 index 0000000000..da8a0910e6 --- /dev/null +++ b/resources/sksl/errors/MatrixIndexOutOfRangeES3.sksl @@ -0,0 +1,26 @@ +void half2x4_neg1() { half2x4 m; half4 v = m[-1]; } +void half2x4_0() { half2x4 m; half4 v = m[0]; } +void half2x4_1() { half2x4 m; half4 v = m[1]; } +void half2x4_2() { half2x4 m; half4 v = m[2]; } +void half2x4_3() { half2x4 m; half4 v = m[3]; } +void half2x4_4() { half2x4 m; half4 v = m[4]; } +void half2x4_huge() { half2x4 m; half4 v = m[1000000000]; } + +void half4x2_neg1() { half4x2 m; half2 v = m[-1]; } +void half4x2_0() { half4x2 m; half2 v = m[0]; } +void half4x2_1() { half4x2 m; half2 v = m[1]; } +void half4x2_2() { half4x2 m; half2 v = m[2]; } +void half4x2_3() { half4x2 m; half2 v = m[3]; } +void half4x2_4() { half4x2 m; half2 v = m[4]; } +void half4x2_huge() { half4x2 m; half2 v = m[1000000000]; } + +/*%%* +index -1 out of range for 'half2x4' +index 2 out of range for 'half2x4' +index 3 out of range for 'half2x4' +index 4 out of range for 'half2x4' +index 1000000000 out of range for 'half2x4' +index -1 out of range for 'half4x2' +index 4 out of range for 'half4x2' +index 1000000000 out of range for 'half4x2' +*%%*/ diff --git a/resources/sksl/errors/MatrixToVectorCast3x3.sksl b/resources/sksl/errors/MatrixToVectorCast3x3.rts index d94e744857..d94e744857 100644 --- a/resources/sksl/errors/MatrixToVectorCast3x3.sksl +++ b/resources/sksl/errors/MatrixToVectorCast3x3.rts diff --git a/resources/sksl/errors/MatrixToVectorCastBoolean.sksl b/resources/sksl/errors/MatrixToVectorCastBoolean.rts index ef25f21983..ef25f21983 100644 --- a/resources/sksl/errors/MatrixToVectorCastBoolean.sksl +++ b/resources/sksl/errors/MatrixToVectorCastBoolean.rts diff --git a/resources/sksl/errors/MatrixToVectorCastInteger.sksl b/resources/sksl/errors/MatrixToVectorCastInteger.rts index b574457eaf..b574457eaf 100644 --- a/resources/sksl/errors/MatrixToVectorCastInteger.sksl +++ b/resources/sksl/errors/MatrixToVectorCastInteger.rts diff --git a/resources/sksl/errors/MatrixToVectorCastTooSmall.sksl b/resources/sksl/errors/MatrixToVectorCastTooSmall.rts index fe7c891d91..fe7c891d91 100644 --- a/resources/sksl/errors/MatrixToVectorCastTooSmall.sksl +++ b/resources/sksl/errors/MatrixToVectorCastTooSmall.rts diff --git a/resources/sksl/errors/MismatchedNumbers.rts b/resources/sksl/errors/MismatchedNumbers.rts new file mode 100644 index 0000000000..dd31a76d30 --- /dev/null +++ b/resources/sksl/errors/MismatchedNumbers.rts @@ -0,0 +1,64 @@ +int i = 1; +float f = 1.0; + +// SkSL allows `float op <int literal>` and `<int literal> op float`, unlike GLSL. +void f_eq_int_literal_ok() { f = 1; } +void f_plus_int_literal_ok() { f + 1; } +void f_minus_int_literal_ok() { f - 1; } +void f_mul_int_literal_ok() { f * 1; } +void f_div_int_literal_ok() { f / 1; } +void int_literal_plus_f_ok() { 1 + f; } +void int_literal_minus_f_ok() { 1 - f; } +void int_literal_mul_f_ok() { 1 * f; } +void int_literal_div_f_ok() { 1 / f; } + +// Other than that, mixing scalar types without a cast is disallowed. +void i_eq_float_literal_disallowed() { i = 1.0; } +void i_eq_f_disallowed() { i = f; } +void f_eq_i_disallowed() { f = i; } +void i_plus_float_literal_disallowed() { i + 1.0; } +void i_minus_float_literal_disallowed() { i - 1.0; } +void i_mul_float_literal_disallowed() { i * 1.0; } +void i_div_float_literal_disallowed() { i / 1.0; } +void float_literal_plus_i_disallowed() { 1.0 + i; } +void float_literal_minus_i_disallowed() { 1.0 - i; } +void float_literal_mul_i_disallowed() { 1.0 * i; } +void float_literal_div_i_disallowed() { 1.0 / i; } +void i_plus_f_disallowed() { i + f; } +void i_minus_f_disallowed() { i - f; } +void i_mul_f_disallowed() { i * f; } +void i_div_f_disallowed() { i / f; } +void f_plus_i_disallowed() { f + i; } +void f_minus_i_disallowed() { f - i; } +void f_mul_i_disallowed() { f * i; } +void f_div_i_disallowed() { f / i; } +void f_plus_u_disallowed() { f + u; } +void f_minus_u_disallowed() { f - u; } +void f_mul_u_disallowed() { f * u; } +void f_div_u_disallowed() { f / u; } +void i_plus_u_disallowed() { i + u; } +void i_minus_u_disallowed() { i - u; } +void i_mul_u_disallowed() { i * u; } +void i_div_u_disallowed() { i / u; } + +/*%%* +type mismatch: '=' cannot operate on 'int', 'float' +type mismatch: '=' cannot operate on 'int', 'float' +type mismatch: '=' cannot operate on 'float', 'int' +type mismatch: '+' cannot operate on 'int', 'float' +type mismatch: '-' cannot operate on 'int', 'float' +type mismatch: '*' cannot operate on 'int', 'float' +type mismatch: '/' cannot operate on 'int', 'float' +type mismatch: '+' cannot operate on 'float', 'int' +type mismatch: '-' cannot operate on 'float', 'int' +type mismatch: '*' cannot operate on 'float', 'int' +type mismatch: '/' cannot operate on 'float', 'int' +type mismatch: '+' cannot operate on 'int', 'float' +type mismatch: '-' cannot operate on 'int', 'float' +type mismatch: '*' cannot operate on 'int', 'float' +type mismatch: '/' cannot operate on 'int', 'float' +type mismatch: '+' cannot operate on 'float', 'int' +type mismatch: '-' cannot operate on 'float', 'int' +type mismatch: '*' cannot operate on 'float', 'int' +type mismatch: '/' cannot operate on 'float', 'int' +*%%*/ diff --git a/resources/sksl/errors/MismatchedNumbers.sksl b/resources/sksl/errors/MismatchedNumbersES3.sksl index ea3615f9db..bdc8917138 100644 --- a/resources/sksl/errors/MismatchedNumbers.sksl +++ b/resources/sksl/errors/MismatchedNumbersES3.sksl @@ -2,17 +2,6 @@ int i = 1; uint u = 1; float f = 1.0; -// SkSL allows `float op <int literal>` and `<int literal> op float`, unlike GLSL. -void f_eq_int_literal_ok() { f = 1; } -void f_plus_int_literal_ok() { f + 1; } -void f_minus_int_literal_ok() { f - 1; } -void f_mul_int_literal_ok() { f * 1; } -void f_div_int_literal_ok() { f / 1; } -void int_literal_plus_f_ok() { 1 + f; } -void int_literal_minus_f_ok() { 1 - f; } -void int_literal_mul_f_ok() { 1 * f; } -void int_literal_div_f_ok() { 1 / f; } - // SkSL also allows `uint op <int literal>` and `<int literal> op uint` without the `u` suffix. void u_eq_int_literal_ok() { u = 1; } void u_plus_int_literal_ok() { u + 1; } @@ -25,22 +14,11 @@ void int_literal_mul_u_ok() { 1 * u; } void int_literal_div_u_ok() { 1 / u; } // Other than that, mixing scalar types without a cast is disallowed. -void i_eq_float_literal_disallowed() { i = 1.0; } void u_eq_float_literal_disallowed() { u = 1.0; } void i_eq_u_disallowed() { i = u; } -void i_eq_f_disallowed() { i = f; } -float f_eq_i_disallowed() { f = i; } -float f_eq_u_disallowed() { f = u; } +void f_eq_u_disallowed() { f = u; } void u_eq_i_disallowed() { u = i; } void u_eq_f_disallowed() { u = f; } -void i_plus_float_literal_disallowed() { i + 1.0; } -void i_minus_float_literal_disallowed() { i - 1.0; } -void i_mul_float_literal_disallowed() { i * 1.0; } -void i_div_float_literal_disallowed() { i / 1.0; } -void float_literal_plus_i_disallowed() { 1.0 + i; } -void float_literal_minus_i_disallowed() { 1.0 - i; } -void float_literal_mul_i_disallowed() { 1.0 * i; } -void float_literal_div_i_disallowed() { 1.0 / i; } void u_plus_float_literal_disallowed() { u + 1.0; } void u_minus_float_literal_disallowed() { u - 1.0; } void u_mul_float_literal_disallowed() { u * 1.0; } @@ -49,14 +27,6 @@ void float_literal_plus_u_disallowed() { 1.0 + u; } void float_literal_minus_u_disallowed() { 1.0 - u; } void float_literal_mul_u_disallowed() { 1.0 * u; } void float_literal_div_u_disallowed() { 1.0 / u; } -void i_plus_f_disallowed() { i + f; } -void i_minus_f_disallowed() { i - f; } -void i_mul_f_disallowed() { i * f; } -void i_div_f_disallowed() { i / f; } -void f_plus_i_disallowed() { f + i; } -void f_minus_i_disallowed() { f - i; } -void f_mul_i_disallowed() { f * i; } -void f_div_i_disallowed() { f / i; } void u_plus_f_disallowed() { u + f; } void u_minus_f_disallowed() { u - f; } void u_mul_f_disallowed() { u * f; } @@ -75,24 +45,11 @@ void u_mul_i_disallowed() { u * i; } void u_div_i_disallowed() { u / i; } /*%%* -type mismatch: '=' cannot operate on 'int', 'float' type mismatch: '=' cannot operate on 'uint', 'float' type mismatch: '=' cannot operate on 'int', 'uint' -type mismatch: '=' cannot operate on 'int', 'float' -type mismatch: '=' cannot operate on 'float', 'int' -function 'f_eq_i_disallowed' can exit without returning a value type mismatch: '=' cannot operate on 'float', 'uint' -function 'f_eq_u_disallowed' can exit without returning a value type mismatch: '=' cannot operate on 'uint', 'int' type mismatch: '=' cannot operate on 'uint', 'float' -type mismatch: '+' cannot operate on 'int', 'float' -type mismatch: '-' cannot operate on 'int', 'float' -type mismatch: '*' cannot operate on 'int', 'float' -type mismatch: '/' cannot operate on 'int', 'float' -type mismatch: '+' cannot operate on 'float', 'int' -type mismatch: '-' cannot operate on 'float', 'int' -type mismatch: '*' cannot operate on 'float', 'int' -type mismatch: '/' cannot operate on 'float', 'int' type mismatch: '+' cannot operate on 'uint', 'float' type mismatch: '-' cannot operate on 'uint', 'float' type mismatch: '*' cannot operate on 'uint', 'float' @@ -101,14 +58,6 @@ type mismatch: '+' cannot operate on 'float', 'uint' type mismatch: '-' cannot operate on 'float', 'uint' type mismatch: '*' cannot operate on 'float', 'uint' type mismatch: '/' cannot operate on 'float', 'uint' -type mismatch: '+' cannot operate on 'int', 'float' -type mismatch: '-' cannot operate on 'int', 'float' -type mismatch: '*' cannot operate on 'int', 'float' -type mismatch: '/' cannot operate on 'int', 'float' -type mismatch: '+' cannot operate on 'float', 'int' -type mismatch: '-' cannot operate on 'float', 'int' -type mismatch: '*' cannot operate on 'float', 'int' -type mismatch: '/' cannot operate on 'float', 'int' type mismatch: '+' cannot operate on 'uint', 'float' type mismatch: '-' cannot operate on 'uint', 'float' type mismatch: '*' cannot operate on 'uint', 'float' diff --git a/resources/sksl/errors/ModifiersInStruct.sksl b/resources/sksl/errors/ModifiersInStruct.rts index c5bafc5b5c..c5bafc5b5c 100644 --- a/resources/sksl/errors/ModifiersInStruct.sksl +++ b/resources/sksl/errors/ModifiersInStruct.rts diff --git a/resources/sksl/errors/MultipleFields.sksl b/resources/sksl/errors/MultipleFields.rts index 77cdf1ae99..77cdf1ae99 100644 --- a/resources/sksl/errors/MultipleFields.sksl +++ b/resources/sksl/errors/MultipleFields.rts diff --git a/resources/sksl/errors/OpenArray.rts b/resources/sksl/errors/OpenArray.rts new file mode 100644 index 0000000000..11c2c8804e --- /dev/null +++ b/resources/sksl/errors/OpenArray.rts @@ -0,0 +1,7 @@ +half4 main(float2 coords) { + coords.r[ = ( coords.g ); +} + +/*%%* +expected expression, but found '=' +*%%*/ diff --git a/resources/sksl/errors/OpenArray.sksl b/resources/sksl/errors/OpenArray.sksl deleted file mode 100644 index 63de3bb43d..0000000000 --- a/resources/sksl/errors/OpenArray.sksl +++ /dev/null @@ -1,9 +0,0 @@ -void main(inout float4 color) { - color.r[ = ( color.g ); -} - -/*%%* -shader 'main' must be main() or main(float2) -unknown identifier 'color' -expected expression, but found '=' -*%%*/ diff --git a/resources/sksl/errors/OverflowFloatLiteral.sksl b/resources/sksl/errors/OverflowFloatLiteral.rts index 3015135ffa..2d4571f4d4 100644 --- a/resources/sksl/errors/OverflowFloatLiteral.sksl +++ b/resources/sksl/errors/OverflowFloatLiteral.rts @@ -1,5 +1,5 @@ -void main() { - sk_FragColor = half4(3.41e+38); +void func() { + float x = 3.41e+38; } /*%%* diff --git a/resources/sksl/errors/OverflowInt64Literal.sksl b/resources/sksl/errors/OverflowInt64Literal.rts index d6a695b176..d6a695b176 100644 --- a/resources/sksl/errors/OverflowInt64Literal.sksl +++ b/resources/sksl/errors/OverflowInt64Literal.rts diff --git a/resources/sksl/errors/OverflowIntLiteral.sksl b/resources/sksl/errors/OverflowIntLiteral.rts index ba27e6056b..d8a99a0a2a 100644 --- a/resources/sksl/errors/OverflowIntLiteral.sksl +++ b/resources/sksl/errors/OverflowIntLiteral.rts @@ -1,21 +1,11 @@ -// Expect 6 errors - const int intMin = -2147483648; const int intMinMinusOne = -2147483649; // error const int intMax = 2147483647; const int intMaxPlusOne = 2147483648; // error - -short4 s4_neg = short4(-32766, -32767, -32769, -32768); // error -32769 -short4 s4_pos = short4(32765, 32768, 32766, 32767); // error 32768 - int cast_int = int(2147483648.); // error -short cast_short = short(32768.); // error /*%%* integer is out of range for type 'int': -2147483649 integer is out of range for type 'int': 2147483648 -integer is out of range for type 'short': -32769 -integer is out of range for type 'short': 32768 integer is out of range for type 'int': 2147483648 -integer is out of range for type 'short': 32768 *%%*/ diff --git a/resources/sksl/errors/OverflowParamArraySize.sksl b/resources/sksl/errors/OverflowParamArraySize.rts index 4927cedcaf..4927cedcaf 100644 --- a/resources/sksl/errors/OverflowParamArraySize.sksl +++ b/resources/sksl/errors/OverflowParamArraySize.rts diff --git a/resources/sksl/errors/OverflowShortLiteral.sksl b/resources/sksl/errors/OverflowShortLiteral.sksl new file mode 100644 index 0000000000..159e4d241e --- /dev/null +++ b/resources/sksl/errors/OverflowShortLiteral.sksl @@ -0,0 +1,9 @@ +short4 s4_neg = short4(-32766, -32767, -32769, -32768); // error -32769 +short4 s4_pos = short4(32765, 32768, 32766, 32767); // error 32768 +short cast_short = short(32768.); // error + +/*%%* +integer is out of range for type 'short': -32769 +integer is out of range for type 'short': 32768 +integer is out of range for type 'short': 32768 +*%%*/ diff --git a/resources/sksl/errors/PrivateTypes.sksl b/resources/sksl/errors/PrivateTypes.rts index 93a35d7e13..ed6275e9b1 100644 --- a/resources/sksl/errors/PrivateTypes.sksl +++ b/resources/sksl/errors/PrivateTypes.rts @@ -1,7 +1,3 @@ -InterfaceBlock { - $mat g; -}; - struct S { $bvec bv; }; @@ -12,7 +8,6 @@ void ctor_mat_private() { $mat(0); } void ctor_literal_private() { $floatLiteral(0); } /*%%* -type '$mat' is private type '$bvec' is private type '$ivec' is private type '$genType' is private diff --git a/resources/sksl/errors/PrivateVariables.sksl b/resources/sksl/errors/PrivateVariables.rts index 00bd28b875..0c9b17611b 100644 --- a/resources/sksl/errors/PrivateVariables.sksl +++ b/resources/sksl/errors/PrivateVariables.rts @@ -1,5 +1,5 @@ int $a; -void main(float2 $b) { +void func(float2 $b) { float $c[2]; bool4 $d; } diff --git a/resources/sksl/errors/ProgramTooLarge_Globals.sksl b/resources/sksl/errors/ProgramTooLarge_Globals.rts index af0ad17ce7..af0ad17ce7 100644 --- a/resources/sksl/errors/ProgramTooLarge_Globals.sksl +++ b/resources/sksl/errors/ProgramTooLarge_Globals.rts diff --git a/resources/sksl/errors/ProgramTooLarge_Stack.sksl b/resources/sksl/errors/ProgramTooLarge_Stack.rts index 127f0564e0..4f004368a1 100644 --- a/resources/sksl/errors/ProgramTooLarge_Stack.sksl +++ b/resources/sksl/errors/ProgramTooLarge_Stack.rts @@ -5,7 +5,7 @@ struct S { half h; }; -void main() { +void func() { int small; S big_chungus; S no_report; // we don't need to report overflows past the first diff --git a/resources/sksl/errors/PrototypeInFuncBody.sksl b/resources/sksl/errors/PrototypeInFuncBody.rts index b440ad2a2a..6d58b3399e 100644 --- a/resources/sksl/errors/PrototypeInFuncBody.sksl +++ b/resources/sksl/errors/PrototypeInFuncBody.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float x(); } diff --git a/resources/sksl/errors/RedeclareBasicType.sksl b/resources/sksl/errors/RedeclareBasicType.rts index a0945520fd..a0945520fd 100644 --- a/resources/sksl/errors/RedeclareBasicType.sksl +++ b/resources/sksl/errors/RedeclareBasicType.rts diff --git a/resources/sksl/errors/RedeclareShaderType.rts b/resources/sksl/errors/RedeclareShaderType.rts new file mode 100644 index 0000000000..76d006b0cb --- /dev/null +++ b/resources/sksl/errors/RedeclareShaderType.rts @@ -0,0 +1,5 @@ +uniform shader shader; + +/*%%* +expected an identifier, but found type 'shader' +*%%*/ diff --git a/resources/sksl/errors/RedeclareStruct.sksl b/resources/sksl/errors/RedeclareStruct.rts index f4704e91e6..f4704e91e6 100644 --- a/resources/sksl/errors/RedeclareStruct.sksl +++ b/resources/sksl/errors/RedeclareStruct.rts diff --git a/resources/sksl/errors/RedeclareStructTypeWithName.sksl b/resources/sksl/errors/RedeclareStructTypeWithName.rts index ef911dd4da..ef911dd4da 100644 --- a/resources/sksl/errors/RedeclareStructTypeWithName.sksl +++ b/resources/sksl/errors/RedeclareStructTypeWithName.rts diff --git a/resources/sksl/errors/RedeclareUserType.sksl b/resources/sksl/errors/RedeclareUserType.rts index d131fb4efc..d131fb4efc 100644 --- a/resources/sksl/errors/RedeclareUserType.sksl +++ b/resources/sksl/errors/RedeclareUserType.rts diff --git a/resources/sksl/errors/RedeclareVariable.sksl b/resources/sksl/errors/RedeclareVariable.rts index e5ef434b55..0160aa9b6a 100644 --- a/resources/sksl/errors/RedeclareVariable.sksl +++ b/resources/sksl/errors/RedeclareVariable.rts @@ -6,7 +6,7 @@ float4x4 x; bool2 x[2]; S x; -void main() { +void func() { float2 y; float2 y; int y; diff --git a/resources/sksl/errors/ReservedNameAsm.sksl b/resources/sksl/errors/ReservedNameAsm.rts index fe198942e7..fe198942e7 100644 --- a/resources/sksl/errors/ReservedNameAsm.sksl +++ b/resources/sksl/errors/ReservedNameAsm.rts diff --git a/resources/sksl/errors/ReservedNameAttribute.sksl b/resources/sksl/errors/ReservedNameAttribute.rts index 6e5dadda64..6e5dadda64 100644 --- a/resources/sksl/errors/ReservedNameAttribute.sksl +++ b/resources/sksl/errors/ReservedNameAttribute.rts diff --git a/resources/sksl/errors/ReservedNameCast.sksl b/resources/sksl/errors/ReservedNameCast.rts index de6663344d..de6663344d 100644 --- a/resources/sksl/errors/ReservedNameCast.sksl +++ b/resources/sksl/errors/ReservedNameCast.rts diff --git a/resources/sksl/errors/ReservedNameDouble.sksl b/resources/sksl/errors/ReservedNameDouble.rts index 1d65060c30..1d65060c30 100644 --- a/resources/sksl/errors/ReservedNameDouble.sksl +++ b/resources/sksl/errors/ReservedNameDouble.rts diff --git a/resources/sksl/errors/ReservedNameDvec2.sksl b/resources/sksl/errors/ReservedNameDvec2.rts index 3ba0c4fbe1..3ba0c4fbe1 100644 --- a/resources/sksl/errors/ReservedNameDvec2.sksl +++ b/resources/sksl/errors/ReservedNameDvec2.rts diff --git a/resources/sksl/errors/ReservedNameDvec3.sksl b/resources/sksl/errors/ReservedNameDvec3.rts index 0e2e3ffa83..0e2e3ffa83 100644 --- a/resources/sksl/errors/ReservedNameDvec3.sksl +++ b/resources/sksl/errors/ReservedNameDvec3.rts diff --git a/resources/sksl/errors/ReservedNameDvec4.sksl b/resources/sksl/errors/ReservedNameDvec4.rts index 2090c5648f..2090c5648f 100644 --- a/resources/sksl/errors/ReservedNameDvec4.sksl +++ b/resources/sksl/errors/ReservedNameDvec4.rts diff --git a/resources/sksl/errors/ReservedNameEnum.sksl b/resources/sksl/errors/ReservedNameEnum.rts index 98cca13d60..98cca13d60 100644 --- a/resources/sksl/errors/ReservedNameEnum.sksl +++ b/resources/sksl/errors/ReservedNameEnum.rts diff --git a/resources/sksl/errors/ReservedNameExtern.sksl b/resources/sksl/errors/ReservedNameExtern.rts index c06581c7bd..c06581c7bd 100644 --- a/resources/sksl/errors/ReservedNameExtern.sksl +++ b/resources/sksl/errors/ReservedNameExtern.rts diff --git a/resources/sksl/errors/ReservedNameExternal.sksl b/resources/sksl/errors/ReservedNameExternal.rts index d18c27ea34..d18c27ea34 100644 --- a/resources/sksl/errors/ReservedNameExternal.sksl +++ b/resources/sksl/errors/ReservedNameExternal.rts diff --git a/resources/sksl/errors/ReservedNameFixed.sksl b/resources/sksl/errors/ReservedNameFixed.rts index 693bbe0278..693bbe0278 100644 --- a/resources/sksl/errors/ReservedNameFixed.sksl +++ b/resources/sksl/errors/ReservedNameFixed.rts diff --git a/resources/sksl/errors/ReservedNameFvec2.sksl b/resources/sksl/errors/ReservedNameFvec2.rts index a1c7a5e099..a1c7a5e099 100644 --- a/resources/sksl/errors/ReservedNameFvec2.sksl +++ b/resources/sksl/errors/ReservedNameFvec2.rts diff --git a/resources/sksl/errors/ReservedNameFvec3.sksl b/resources/sksl/errors/ReservedNameFvec3.rts index c220eba9b2..c220eba9b2 100644 --- a/resources/sksl/errors/ReservedNameFvec3.sksl +++ b/resources/sksl/errors/ReservedNameFvec3.rts diff --git a/resources/sksl/errors/ReservedNameFvec4.sksl b/resources/sksl/errors/ReservedNameFvec4.rts index 2fe2c47fcf..2fe2c47fcf 100644 --- a/resources/sksl/errors/ReservedNameFvec4.sksl +++ b/resources/sksl/errors/ReservedNameFvec4.rts diff --git a/resources/sksl/errors/ReservedNameGoto.sksl b/resources/sksl/errors/ReservedNameGoto.rts index a14eac4bed..a14eac4bed 100644 --- a/resources/sksl/errors/ReservedNameGoto.sksl +++ b/resources/sksl/errors/ReservedNameGoto.rts diff --git a/resources/sksl/errors/ReservedNameHvec2.sksl b/resources/sksl/errors/ReservedNameHvec2.rts index bb8ba502e3..bb8ba502e3 100644 --- a/resources/sksl/errors/ReservedNameHvec2.sksl +++ b/resources/sksl/errors/ReservedNameHvec2.rts diff --git a/resources/sksl/errors/ReservedNameHvec3.sksl b/resources/sksl/errors/ReservedNameHvec3.rts index cd0d12eca3..cd0d12eca3 100644 --- a/resources/sksl/errors/ReservedNameHvec3.sksl +++ b/resources/sksl/errors/ReservedNameHvec3.rts diff --git a/resources/sksl/errors/ReservedNameHvec4.sksl b/resources/sksl/errors/ReservedNameHvec4.rts index cb130111a0..cb130111a0 100644 --- a/resources/sksl/errors/ReservedNameHvec4.sksl +++ b/resources/sksl/errors/ReservedNameHvec4.rts diff --git a/resources/sksl/errors/ReservedNameInput.sksl b/resources/sksl/errors/ReservedNameInput.rts index e2423081e3..e2423081e3 100644 --- a/resources/sksl/errors/ReservedNameInput.sksl +++ b/resources/sksl/errors/ReservedNameInput.rts diff --git a/resources/sksl/errors/ReservedNameInterface.sksl b/resources/sksl/errors/ReservedNameInterface.rts index 3daf3ec8ac..3daf3ec8ac 100644 --- a/resources/sksl/errors/ReservedNameInterface.sksl +++ b/resources/sksl/errors/ReservedNameInterface.rts diff --git a/resources/sksl/errors/ReservedNameInvariant.sksl b/resources/sksl/errors/ReservedNameInvariant.rts index 6eb9edf771..6eb9edf771 100644 --- a/resources/sksl/errors/ReservedNameInvariant.sksl +++ b/resources/sksl/errors/ReservedNameInvariant.rts diff --git a/resources/sksl/errors/ReservedNameLong.sksl b/resources/sksl/errors/ReservedNameLong.rts index cea68b3329..cea68b3329 100644 --- a/resources/sksl/errors/ReservedNameLong.sksl +++ b/resources/sksl/errors/ReservedNameLong.rts diff --git a/resources/sksl/errors/ReservedNameNamespace.sksl b/resources/sksl/errors/ReservedNameNamespace.rts index 14e5dbbfa8..14e5dbbfa8 100644 --- a/resources/sksl/errors/ReservedNameNamespace.sksl +++ b/resources/sksl/errors/ReservedNameNamespace.rts diff --git a/resources/sksl/errors/ReservedNameOutput.sksl b/resources/sksl/errors/ReservedNameOutput.rts index 069d54361c..069d54361c 100644 --- a/resources/sksl/errors/ReservedNameOutput.sksl +++ b/resources/sksl/errors/ReservedNameOutput.rts diff --git a/resources/sksl/errors/ReservedNamePacked.sksl b/resources/sksl/errors/ReservedNamePacked.rts index f1435753cb..f1435753cb 100644 --- a/resources/sksl/errors/ReservedNamePacked.sksl +++ b/resources/sksl/errors/ReservedNamePacked.rts diff --git a/resources/sksl/errors/ReservedNamePrecision.sksl b/resources/sksl/errors/ReservedNamePrecision.rts index 2fe4c28f56..2fe4c28f56 100644 --- a/resources/sksl/errors/ReservedNamePrecision.sksl +++ b/resources/sksl/errors/ReservedNamePrecision.rts diff --git a/resources/sksl/errors/ReservedNamePublic.sksl b/resources/sksl/errors/ReservedNamePublic.rts index fefe192c75..fefe192c75 100644 --- a/resources/sksl/errors/ReservedNamePublic.sksl +++ b/resources/sksl/errors/ReservedNamePublic.rts diff --git a/resources/sksl/errors/ReservedNameSampler1DShadow.sksl b/resources/sksl/errors/ReservedNameSampler1DShadow.rts index 7f48177d65..7f48177d65 100644 --- a/resources/sksl/errors/ReservedNameSampler1DShadow.sksl +++ b/resources/sksl/errors/ReservedNameSampler1DShadow.rts diff --git a/resources/sksl/errors/ReservedNameSampler2DRectShadow.sksl b/resources/sksl/errors/ReservedNameSampler2DRectShadow.rts index f579442ef0..f579442ef0 100644 --- a/resources/sksl/errors/ReservedNameSampler2DRectShadow.sksl +++ b/resources/sksl/errors/ReservedNameSampler2DRectShadow.rts diff --git a/resources/sksl/errors/ReservedNameSampler2DShadow.sksl b/resources/sksl/errors/ReservedNameSampler2DShadow.rts index 1984327df4..1984327df4 100644 --- a/resources/sksl/errors/ReservedNameSampler2DShadow.sksl +++ b/resources/sksl/errors/ReservedNameSampler2DShadow.rts diff --git a/resources/sksl/errors/ReservedNameSampler3DRect.sksl b/resources/sksl/errors/ReservedNameSampler3DRect.rts index 20eb001bbd..20eb001bbd 100644 --- a/resources/sksl/errors/ReservedNameSampler3DRect.sksl +++ b/resources/sksl/errors/ReservedNameSampler3DRect.rts diff --git a/resources/sksl/errors/ReservedNameSamplerCube.sksl b/resources/sksl/errors/ReservedNameSamplerCube.rts index 607a9f9d64..607a9f9d64 100644 --- a/resources/sksl/errors/ReservedNameSamplerCube.sksl +++ b/resources/sksl/errors/ReservedNameSamplerCube.rts diff --git a/resources/sksl/errors/ReservedNameSizeof.sksl b/resources/sksl/errors/ReservedNameSizeof.rts index 9157a959d2..9157a959d2 100644 --- a/resources/sksl/errors/ReservedNameSizeof.sksl +++ b/resources/sksl/errors/ReservedNameSizeof.rts diff --git a/resources/sksl/errors/ReservedNameStatic.sksl b/resources/sksl/errors/ReservedNameStatic.rts index 9668851697..9668851697 100644 --- a/resources/sksl/errors/ReservedNameStatic.sksl +++ b/resources/sksl/errors/ReservedNameStatic.rts diff --git a/resources/sksl/errors/ReservedNameSuperp.sksl b/resources/sksl/errors/ReservedNameSuperp.rts index 9f85eea103..9f85eea103 100644 --- a/resources/sksl/errors/ReservedNameSuperp.sksl +++ b/resources/sksl/errors/ReservedNameSuperp.rts diff --git a/resources/sksl/errors/ReservedNameTemplate.sksl b/resources/sksl/errors/ReservedNameTemplate.rts index 0e3a863d56..0e3a863d56 100644 --- a/resources/sksl/errors/ReservedNameTemplate.sksl +++ b/resources/sksl/errors/ReservedNameTemplate.rts diff --git a/resources/sksl/errors/ReservedNameThis.sksl b/resources/sksl/errors/ReservedNameThis.rts index 4961a7261d..4961a7261d 100644 --- a/resources/sksl/errors/ReservedNameThis.sksl +++ b/resources/sksl/errors/ReservedNameThis.rts diff --git a/resources/sksl/errors/ReservedNameTypedef.sksl b/resources/sksl/errors/ReservedNameTypedef.rts index f373c9de38..f373c9de38 100644 --- a/resources/sksl/errors/ReservedNameTypedef.sksl +++ b/resources/sksl/errors/ReservedNameTypedef.rts diff --git a/resources/sksl/errors/ReservedNameUnion.sksl b/resources/sksl/errors/ReservedNameUnion.rts index 9e4c176c38..9e4c176c38 100644 --- a/resources/sksl/errors/ReservedNameUnion.sksl +++ b/resources/sksl/errors/ReservedNameUnion.rts diff --git a/resources/sksl/errors/ReservedNameUnsigned.sksl b/resources/sksl/errors/ReservedNameUnsigned.rts index f0f9271947..f0f9271947 100644 --- a/resources/sksl/errors/ReservedNameUnsigned.sksl +++ b/resources/sksl/errors/ReservedNameUnsigned.rts diff --git a/resources/sksl/errors/ReservedNameUsing.sksl b/resources/sksl/errors/ReservedNameUsing.rts index bc24629298..bc24629298 100644 --- a/resources/sksl/errors/ReservedNameUsing.sksl +++ b/resources/sksl/errors/ReservedNameUsing.rts diff --git a/resources/sksl/errors/ReservedNameVarying.sksl b/resources/sksl/errors/ReservedNameVarying.rts index 32856f7bdd..32856f7bdd 100644 --- a/resources/sksl/errors/ReservedNameVarying.sksl +++ b/resources/sksl/errors/ReservedNameVarying.rts diff --git a/resources/sksl/errors/ReservedNameVolatile.sksl b/resources/sksl/errors/ReservedNameVolatile.rts index d49e9d1998..d49e9d1998 100644 --- a/resources/sksl/errors/ReservedNameVolatile.sksl +++ b/resources/sksl/errors/ReservedNameVolatile.rts diff --git a/resources/sksl/errors/ReturnDifferentType.rts b/resources/sksl/errors/ReturnDifferentType.rts new file mode 100644 index 0000000000..6650cf2906 --- /dev/null +++ b/resources/sksl/errors/ReturnDifferentType.rts @@ -0,0 +1,6 @@ +int func() { return 1; } +void func() {} + +/*%%* +functions 'void func()' and 'int func()' differ only in return type +*%%*/ diff --git a/resources/sksl/errors/ReturnDifferentType.sksl b/resources/sksl/errors/ReturnDifferentType.sksl deleted file mode 100644 index ffd0ed9b13..0000000000 --- a/resources/sksl/errors/ReturnDifferentType.sksl +++ /dev/null @@ -1,6 +0,0 @@ -int main() { return 1; } -void main() {} - -/*%%* -functions 'void main()' and 'int main()' differ only in return type -*%%*/ diff --git a/resources/sksl/errors/ReturnFromVoid.sksl b/resources/sksl/errors/ReturnFromVoid.rts index 6ba4a3dd2b..6ba4a3dd2b 100644 --- a/resources/sksl/errors/ReturnFromVoid.sksl +++ b/resources/sksl/errors/ReturnFromVoid.rts diff --git a/resources/sksl/errors/ReturnMissingValue.sksl b/resources/sksl/errors/ReturnMissingValue.rts index 42b03f8375..42b03f8375 100644 --- a/resources/sksl/errors/ReturnMissingValue.sksl +++ b/resources/sksl/errors/ReturnMissingValue.rts diff --git a/resources/sksl/errors/ReturnTypeMismatch.sksl b/resources/sksl/errors/ReturnTypeMismatch.rts index b81f85c06b..b81f85c06b 100644 --- a/resources/sksl/errors/ReturnTypeMismatch.sksl +++ b/resources/sksl/errors/ReturnTypeMismatch.rts diff --git a/resources/sksl/errors/SelfReferentialInitializerExpression.sksl b/resources/sksl/errors/SelfReferentialInitializerExpression.rts index 0fec0a009a..cd6d574fcf 100644 --- a/resources/sksl/errors/SelfReferentialInitializerExpression.sksl +++ b/resources/sksl/errors/SelfReferentialInitializerExpression.rts @@ -1,5 +1,5 @@ float foo(float v) { return v; } -void main() { float x = foo(x); } +void func() { float x = foo(x); } /*%%* unknown identifier 'x' diff --git a/resources/sksl/errors/SpuriousFloat.sksl b/resources/sksl/errors/SpuriousFloat.rts index 488ec76b37..625cbbc772 100644 --- a/resources/sksl/errors/SpuriousFloat.sksl +++ b/resources/sksl/errors/SpuriousFloat.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float x; x = 1.5 2.5; } diff --git a/resources/sksl/errors/StructMemberReservedName.sksl b/resources/sksl/errors/StructMemberReservedName.rts index 030d05f80d..76dc6eb404 100644 --- a/resources/sksl/errors/StructMemberReservedName.sksl +++ b/resources/sksl/errors/StructMemberReservedName.rts @@ -2,7 +2,7 @@ struct S { float float; } s; -float4 main() { +float4 func() { return s.float.xxxx; } diff --git a/resources/sksl/errors/StructNameWithoutIdentifier.sksl b/resources/sksl/errors/StructNameWithoutIdentifier.rts index f0c94f2762..f0c94f2762 100644 --- a/resources/sksl/errors/StructNameWithoutIdentifier.sksl +++ b/resources/sksl/errors/StructNameWithoutIdentifier.rts diff --git a/resources/sksl/errors/StructTooDeeplyNested.sksl b/resources/sksl/errors/StructTooDeeplyNested.rts index 72221b202e..72221b202e 100644 --- a/resources/sksl/errors/StructTooDeeplyNested.sksl +++ b/resources/sksl/errors/StructTooDeeplyNested.rts diff --git a/resources/sksl/errors/StructVariableReservedName.sksl b/resources/sksl/errors/StructVariableReservedName.rts index 2dd206e691..2dd206e691 100644 --- a/resources/sksl/errors/StructVariableReservedName.sksl +++ b/resources/sksl/errors/StructVariableReservedName.rts diff --git a/resources/sksl/errors/SwitchDuplicateCase.sksl b/resources/sksl/errors/SwitchDuplicateCase.rts index 30be7cd063..3338d5962d 100644 --- a/resources/sksl/errors/SwitchDuplicateCase.sksl +++ b/resources/sksl/errors/SwitchDuplicateCase.rts @@ -1,4 +1,4 @@ -void main() { +void func() { switch (1) { case 0: case 1: diff --git a/resources/sksl/errors/SwitchDuplicateDefault.sksl b/resources/sksl/errors/SwitchDuplicateDefault.rts index c18a033c2f..d557fbd9ff 100644 --- a/resources/sksl/errors/SwitchDuplicateDefault.sksl +++ b/resources/sksl/errors/SwitchDuplicateDefault.rts @@ -1,4 +1,4 @@ -void main() { +void func() { switch (1) { default: default: diff --git a/resources/sksl/errors/SwitchTypes.sksl b/resources/sksl/errors/SwitchTypes.rts index d0f182b76c..d0f182b76c 100644 --- a/resources/sksl/errors/SwitchTypes.sksl +++ b/resources/sksl/errors/SwitchTypes.rts diff --git a/resources/sksl/errors/SwizzleConstantOutput.sksl b/resources/sksl/errors/SwizzleConstantOutput.rts index d9d31fffcb..9304c98ac1 100644 --- a/resources/sksl/errors/SwizzleConstantOutput.sksl +++ b/resources/sksl/errors/SwizzleConstantOutput.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float4 test = float4(1); test.xyz0 = float4(1); } diff --git a/resources/sksl/errors/SwizzleDomain.sksl b/resources/sksl/errors/SwizzleDomain.rts index 7ce8ec26c9..7ce8ec26c9 100644 --- a/resources/sksl/errors/SwizzleDomain.sksl +++ b/resources/sksl/errors/SwizzleDomain.rts diff --git a/resources/sksl/errors/SwizzleMatrix.sksl b/resources/sksl/errors/SwizzleMatrix.rts index efd90f1f0d..4c6e0d528d 100644 --- a/resources/sksl/errors/SwizzleMatrix.sksl +++ b/resources/sksl/errors/SwizzleMatrix.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float2x2 x = float2x2(1); float y = x.y; } diff --git a/resources/sksl/errors/SwizzleOnlyLiterals.sksl b/resources/sksl/errors/SwizzleOnlyLiterals.rts index 3f82bed5e0..a2bd6d2f26 100644 --- a/resources/sksl/errors/SwizzleOnlyLiterals.sksl +++ b/resources/sksl/errors/SwizzleOnlyLiterals.rts @@ -1,4 +1,4 @@ -void main() { float x = 1.0; x = x.0; } +void func() { float x = 1.0; x = x.0; } /*%%* swizzle must refer to base expression diff --git a/resources/sksl/errors/SwizzleOutOfBounds.rts b/resources/sksl/errors/SwizzleOutOfBounds.rts new file mode 100644 index 0000000000..2d26c1e82f --- /dev/null +++ b/resources/sksl/errors/SwizzleOutOfBounds.rts @@ -0,0 +1,5 @@ +void func() { float3 test = float2(1).xyz; } + +/*%%* +invalid swizzle component 'z' +*%%*/ diff --git a/resources/sksl/errors/SwizzleOutOfBounds.sksl b/resources/sksl/errors/SwizzleOutOfBounds.sksl deleted file mode 100644 index c21e992191..0000000000 --- a/resources/sksl/errors/SwizzleOutOfBounds.sksl +++ /dev/null @@ -1,5 +0,0 @@ -void main() { float3 test = float2(1).xyz; } - -/*%%* -invalid swizzle component 'z' -*%%*/ diff --git a/resources/sksl/errors/SwizzleTooManyComponents.sksl b/resources/sksl/errors/SwizzleTooManyComponents.rts index f5f1cad3f0..b7991b46e9 100644 --- a/resources/sksl/errors/SwizzleTooManyComponents.sksl +++ b/resources/sksl/errors/SwizzleTooManyComponents.rts @@ -1,4 +1,4 @@ -void main() { float4 test = float2(1).xxxxx; } +void func() { float4 test = float2(1).xxxxx; } /*%%* too many components in swizzle mask diff --git a/resources/sksl/errors/TernaryMismatch.sksl b/resources/sksl/errors/TernaryMismatch.rts index ccc5a38dee..ccc5a38dee 100644 --- a/resources/sksl/errors/TernaryMismatch.sksl +++ b/resources/sksl/errors/TernaryMismatch.rts diff --git a/resources/sksl/errors/UnassignedOutParameter.sksl b/resources/sksl/errors/UnassignedOutParameter.rts index 55e548117d..6730dcf1d7 100644 --- a/resources/sksl/errors/UnassignedOutParameter.sksl +++ b/resources/sksl/errors/UnassignedOutParameter.rts @@ -4,7 +4,7 @@ void testIn(in float2 a, in float2 b, in float2 c) { a = float2(1); void testOut(out float2 a, out float2 b, out float2 c) { a = float2(1); } void testInout(inout float2 a, inout float2 b, inout float2 c) { a = float2(1); } -void main(float2 p) { +void func(float2 p) { testIn(p, p, p); testOut(p, p, p); testInout(p, p, p); diff --git a/resources/sksl/errors/UndeclaredFunction.sksl b/resources/sksl/errors/UndeclaredFunction.rts index 4ee08a19c3..5b4fa372e1 100644 --- a/resources/sksl/errors/UndeclaredFunction.sksl +++ b/resources/sksl/errors/UndeclaredFunction.rts @@ -1,4 +1,4 @@ -void main() { int x = foo(1); } +void func() { int x = foo(1); } /*%%* unknown identifier 'foo' diff --git a/resources/sksl/errors/UndefinedFunction.sksl b/resources/sksl/errors/UndefinedFunction.rts index d41d8861bd..5de828ee98 100644 --- a/resources/sksl/errors/UndefinedFunction.sksl +++ b/resources/sksl/errors/UndefinedFunction.rts @@ -1,6 +1,6 @@ int foo(int x); -void main() { int x = foo(1); } +void func() { int x = foo(1); } /*%%* function 'int foo(int x)' is not defined diff --git a/resources/sksl/errors/UndefinedSymbol.sksl b/resources/sksl/errors/UndefinedSymbol.rts index 2629e5c115..2629e5c115 100644 --- a/resources/sksl/errors/UndefinedSymbol.sksl +++ b/resources/sksl/errors/UndefinedSymbol.rts diff --git a/resources/sksl/errors/UniformVarWithInitializerExpression.sksl b/resources/sksl/errors/UniformVarWithInitializerExpression.rts index 17a2a05031..17a2a05031 100644 --- a/resources/sksl/errors/UniformVarWithInitializerExpression.sksl +++ b/resources/sksl/errors/UniformVarWithInitializerExpression.rts diff --git a/resources/sksl/errors/UnscopedVariableInElse.rts b/resources/sksl/errors/UnscopedVariableInElse.rts new file mode 100644 index 0000000000..bb5925bece --- /dev/null +++ b/resources/sksl/errors/UnscopedVariableInElse.rts @@ -0,0 +1,7 @@ +void func() { + if (true) ; else half x = 1; +} + +/*%%* +variable 'x' must be created in a scope +*%%*/ diff --git a/resources/sksl/errors/UnscopedVariableInElse.sksl b/resources/sksl/errors/UnscopedVariableInElse.sksl deleted file mode 100644 index 877bc6cb12..0000000000 --- a/resources/sksl/errors/UnscopedVariableInElse.sksl +++ /dev/null @@ -1,7 +0,0 @@ -void main() { - if (true) ; else half4 color = sk_FragColor; -} - -/*%%* -variable 'color' must be created in a scope -*%%*/ diff --git a/resources/sksl/errors/UnscopedVariableInFor.sksl b/resources/sksl/errors/UnscopedVariableInFor.rts index 88be1c10a3..59904aa415 100644 --- a/resources/sksl/errors/UnscopedVariableInFor.sksl +++ b/resources/sksl/errors/UnscopedVariableInFor.rts @@ -1,4 +1,4 @@ -void main() { +void func() { for (int x=0; x<10; ++x) float s = sqrt(4); } diff --git a/resources/sksl/errors/UnscopedVariableInIf.sksl b/resources/sksl/errors/UnscopedVariableInIf.rts index 89cef37eea..86c964b1fe 100644 --- a/resources/sksl/errors/UnscopedVariableInIf.sksl +++ b/resources/sksl/errors/UnscopedVariableInIf.rts @@ -1,4 +1,4 @@ -void main() { +void func() { if (true) half4 x; } diff --git a/resources/sksl/errors/UnsupportedGLSLIdentifiers.sksl b/resources/sksl/errors/UnsupportedGLSLIdentifiers.rts index 570249cfec..570249cfec 100644 --- a/resources/sksl/errors/UnsupportedGLSLIdentifiers.sksl +++ b/resources/sksl/errors/UnsupportedGLSLIdentifiers.rts diff --git a/resources/sksl/errors/UsingInvalidValue.sksl b/resources/sksl/errors/UsingInvalidValue.rts index 158aafcb15..158aafcb15 100644 --- a/resources/sksl/errors/UsingInvalidValue.sksl +++ b/resources/sksl/errors/UsingInvalidValue.rts diff --git a/resources/sksl/errors/VectorIndexOutOfRange.sksl b/resources/sksl/errors/VectorIndexOutOfRange.rts index fed5e35bc3..fed5e35bc3 100644 --- a/resources/sksl/errors/VectorIndexOutOfRange.sksl +++ b/resources/sksl/errors/VectorIndexOutOfRange.rts diff --git a/resources/sksl/errors/VectorSlice.sksl b/resources/sksl/errors/VectorSlice.rts index 37bba65c82..37bba65c82 100644 --- a/resources/sksl/errors/VectorSlice.sksl +++ b/resources/sksl/errors/VectorSlice.rts diff --git a/resources/sksl/errors/VoidConstructor.sksl b/resources/sksl/errors/VoidConstructor.rts index 94df380cf0..4739bea325 100644 --- a/resources/sksl/errors/VoidConstructor.sksl +++ b/resources/sksl/errors/VoidConstructor.rts @@ -1,4 +1,4 @@ -void main() { +void func() { void(); } diff --git a/resources/sksl/errors/VoidInStruct.sksl b/resources/sksl/errors/VoidInStruct.rts index 114d98e1db..114d98e1db 100644 --- a/resources/sksl/errors/VoidInStruct.sksl +++ b/resources/sksl/errors/VoidInStruct.rts diff --git a/resources/sksl/errors/VoidVariable.sksl b/resources/sksl/errors/VoidVariable.rts index a48b15e2d2..a48b15e2d2 100644 --- a/resources/sksl/errors/VoidVariable.sksl +++ b/resources/sksl/errors/VoidVariable.rts diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp index f1b937763f..33ef1ecd78 100644 --- a/tests/SkSLErrorTest.cpp +++ b/tests/SkSLErrorTest.cpp @@ -113,6 +113,9 @@ DEF_TEST(SkSLErrorTest, r) { iterate_dir("sksl/errors/", ".sksl", [&](const char* path) { test_expect_fail(r, path, SkSL::ProgramKind::kFragment); }); + iterate_dir("sksl/errors/", ".rts", [&](const char* path) { + test_expect_fail(r, path, SkSL::ProgramKind::kRuntimeShader); + }); } DEF_TEST(SkSLRuntimeShaderErrorTest, r) { diff --git a/tests/sksl/errors/BinaryInvalidType.glsl b/tests/sksl/errors/BinaryInvalidType.glsl index 697b94dfe4..450a432f2b 100644 --- a/tests/sksl/errors/BinaryInvalidType.glsl +++ b/tests/sksl/errors/BinaryInvalidType.glsl @@ -6,9 +6,9 @@ error: 10: type mismatch: '*' cannot operate on '<INVALID>', '<INVALID>' error: 18: type mismatch: '*' cannot operate on 'S', 'int' error: 22: type mismatch: '*' cannot operate on 'int', 'S' error: 26: type mismatch: '*' cannot operate on 'S', 'S' -error: 32: type mismatch: '*' cannot operate on 'sampler2D', 'int' -error: 36: type mismatch: '*' cannot operate on 'int', 'sampler2D' -error: 40: type mismatch: '*' cannot operate on 'sampler2D', 'sampler2D' +error: 32: type mismatch: '*' cannot operate on 'shader', 'int' +error: 36: type mismatch: '*' cannot operate on 'int', 'shader' +error: 40: type mismatch: '*' cannot operate on 'shader', 'shader' error: 46: type mismatch: '*' cannot operate on 'int[1]', 'int' error: 50: type mismatch: '*' cannot operate on 'int', 'int[1]' error: 54: type mismatch: '*' cannot operate on 'int[1]', 'int[1]' diff --git a/tests/sksl/errors/BreakOutsideLoop.glsl b/tests/sksl/errors/BreakOutsideLoop.glsl index 15bb228b57..cfa6ae2ff3 100644 --- a/tests/sksl/errors/BreakOutsideLoop.glsl +++ b/tests/sksl/errors/BreakOutsideLoop.glsl @@ -1,4 +1,4 @@ ### Compilation failed: -error: 1: break statement must be inside a loop or switch +error: 3: break statement must be inside a loop or switch 1 error diff --git a/tests/sksl/errors/ContinueOutsideLoop.glsl b/tests/sksl/errors/ContinueOutsideLoop.glsl index e841af8a65..25cbcdc95a 100644 --- a/tests/sksl/errors/ContinueOutsideLoop.glsl +++ b/tests/sksl/errors/ContinueOutsideLoop.glsl @@ -1,5 +1,5 @@ ### Compilation failed: -error: 1: continue statement must be inside a loop -error: 2: continue statement must be inside a loop +error: 3: continue statement must be inside a loop +error: 8: continue statement must be inside a loop 2 errors diff --git a/tests/sksl/errors/DuplicateFunction.glsl b/tests/sksl/errors/DuplicateFunction.glsl index 7672b0163b..72442d1276 100644 --- a/tests/sksl/errors/DuplicateFunction.glsl +++ b/tests/sksl/errors/DuplicateFunction.glsl @@ -1,4 +1,4 @@ ### Compilation failed: -error: 2: duplicate definition of void main() +error: 2: duplicate definition of void func() 1 error diff --git a/tests/sksl/errors/DuplicateSymbol.glsl b/tests/sksl/errors/DuplicateSymbol.glsl index 9e5cb06293..c39dd6a49b 100644 --- a/tests/sksl/errors/DuplicateSymbol.glsl +++ b/tests/sksl/errors/DuplicateSymbol.glsl @@ -1,6 +1,6 @@ ### Compilation failed: error: 2: symbol 'x' was already defined -error: 5: symbol 'main' was already defined +error: 5: symbol 'func' was already defined error: 6: symbol 'y' was already defined 3 errors diff --git a/tests/sksl/errors/InterfaceBlockPrivateType.glsl b/tests/sksl/errors/InterfaceBlockPrivateType.glsl new file mode 100644 index 0000000000..42f155d8d3 --- /dev/null +++ b/tests/sksl/errors/InterfaceBlockPrivateType.glsl @@ -0,0 +1,4 @@ +### Compilation failed: + +error: 2: type '$mat' is private +1 error diff --git a/tests/sksl/errors/MatrixIndexOutOfRange.glsl b/tests/sksl/errors/MatrixIndexOutOfRange.glsl index 8c13198e18..b0f9cf3886 100644 --- a/tests/sksl/errors/MatrixIndexOutOfRange.glsl +++ b/tests/sksl/errors/MatrixIndexOutOfRange.glsl @@ -1,19 +1,11 @@ ### Compilation failed: -error: 1: index -1 out of range for 'half2x4' -error: 4: index 2 out of range for 'half2x4' -error: 5: index 3 out of range for 'half2x4' -error: 6: index 4 out of range for 'half2x4' -error: 7: index 1000000000 out of range for 'half2x4' +error: 1: index -1 out of range for 'half3x3' +error: 5: index 3 out of range for 'half3x3' +error: 6: index 4 out of range for 'half3x3' +error: 7: index 1000000000 out of range for 'half3x3' error: 9: index -1 out of range for 'half3x3' error: 13: index 3 out of range for 'half3x3' error: 14: index 4 out of range for 'half3x3' error: 15: index 1000000000 out of range for 'half3x3' -error: 17: index -1 out of range for 'half4x2' -error: 22: index 4 out of range for 'half4x2' -error: 23: index 1000000000 out of range for 'half4x2' -error: 25: index -1 out of range for 'half3x3' -error: 29: index 3 out of range for 'half3x3' -error: 30: index 4 out of range for 'half3x3' -error: 31: index 1000000000 out of range for 'half3x3' -16 errors +8 errors diff --git a/tests/sksl/errors/MatrixIndexOutOfRangeES3.glsl b/tests/sksl/errors/MatrixIndexOutOfRangeES3.glsl new file mode 100644 index 0000000000..be1270a2a5 --- /dev/null +++ b/tests/sksl/errors/MatrixIndexOutOfRangeES3.glsl @@ -0,0 +1,11 @@ +### Compilation failed: + +error: 1: index -1 out of range for 'half2x4' +error: 4: index 2 out of range for 'half2x4' +error: 5: index 3 out of range for 'half2x4' +error: 6: index 4 out of range for 'half2x4' +error: 7: index 1000000000 out of range for 'half2x4' +error: 9: index -1 out of range for 'half4x2' +error: 14: index 4 out of range for 'half4x2' +error: 15: index 1000000000 out of range for 'half4x2' +8 errors diff --git a/tests/sksl/errors/MismatchedNumbers.glsl b/tests/sksl/errors/MismatchedNumbers.glsl index 9bcfd24a43..4a8278eb0b 100644 --- a/tests/sksl/errors/MismatchedNumbers.glsl +++ b/tests/sksl/errors/MismatchedNumbers.glsl @@ -1,53 +1,30 @@ ### Compilation failed: -error: 28: type mismatch: '=' cannot operate on 'int', 'float' -error: 29: type mismatch: '=' cannot operate on 'uint', 'float' -error: 30: type mismatch: '=' cannot operate on 'int', 'uint' -error: 31: type mismatch: '=' cannot operate on 'int', 'float' -error: 32: type mismatch: '=' cannot operate on 'float', 'int' -error: 32: function 'f_eq_i_disallowed' can exit without returning a value -error: 33: type mismatch: '=' cannot operate on 'float', 'uint' -error: 33: function 'f_eq_u_disallowed' can exit without returning a value -error: 34: type mismatch: '=' cannot operate on 'uint', 'int' -error: 35: type mismatch: '=' cannot operate on 'uint', 'float' -error: 36: type mismatch: '+' cannot operate on 'int', 'float' -error: 37: type mismatch: '-' cannot operate on 'int', 'float' -error: 38: type mismatch: '*' cannot operate on 'int', 'float' -error: 39: type mismatch: '/' cannot operate on 'int', 'float' -error: 40: type mismatch: '+' cannot operate on 'float', 'int' -error: 41: type mismatch: '-' cannot operate on 'float', 'int' -error: 42: type mismatch: '*' cannot operate on 'float', 'int' -error: 43: type mismatch: '/' cannot operate on 'float', 'int' -error: 44: type mismatch: '+' cannot operate on 'uint', 'float' -error: 45: type mismatch: '-' cannot operate on 'uint', 'float' -error: 46: type mismatch: '*' cannot operate on 'uint', 'float' -error: 47: type mismatch: '/' cannot operate on 'uint', 'float' -error: 48: type mismatch: '+' cannot operate on 'float', 'uint' -error: 49: type mismatch: '-' cannot operate on 'float', 'uint' -error: 50: type mismatch: '*' cannot operate on 'float', 'uint' -error: 51: type mismatch: '/' cannot operate on 'float', 'uint' -error: 52: type mismatch: '+' cannot operate on 'int', 'float' -error: 53: type mismatch: '-' cannot operate on 'int', 'float' -error: 54: type mismatch: '*' cannot operate on 'int', 'float' -error: 55: type mismatch: '/' cannot operate on 'int', 'float' -error: 56: type mismatch: '+' cannot operate on 'float', 'int' -error: 57: type mismatch: '-' cannot operate on 'float', 'int' -error: 58: type mismatch: '*' cannot operate on 'float', 'int' -error: 59: type mismatch: '/' cannot operate on 'float', 'int' -error: 60: type mismatch: '+' cannot operate on 'uint', 'float' -error: 61: type mismatch: '-' cannot operate on 'uint', 'float' -error: 62: type mismatch: '*' cannot operate on 'uint', 'float' -error: 63: type mismatch: '/' cannot operate on 'uint', 'float' -error: 64: type mismatch: '+' cannot operate on 'float', 'uint' -error: 65: type mismatch: '-' cannot operate on 'float', 'uint' -error: 66: type mismatch: '*' cannot operate on 'float', 'uint' -error: 67: type mismatch: '/' cannot operate on 'float', 'uint' -error: 68: type mismatch: '+' cannot operate on 'int', 'uint' -error: 69: type mismatch: '-' cannot operate on 'int', 'uint' -error: 70: type mismatch: '*' cannot operate on 'int', 'uint' -error: 71: type mismatch: '/' cannot operate on 'int', 'uint' -error: 72: type mismatch: '+' cannot operate on 'uint', 'int' -error: 73: type mismatch: '-' cannot operate on 'uint', 'int' -error: 74: type mismatch: '*' cannot operate on 'uint', 'int' -error: 75: type mismatch: '/' cannot operate on 'uint', 'int' -50 errors +error: 16: type mismatch: '=' cannot operate on 'int', 'float' +error: 17: type mismatch: '=' cannot operate on 'int', 'float' +error: 18: type mismatch: '=' cannot operate on 'float', 'int' +error: 19: type mismatch: '+' cannot operate on 'int', 'float' +error: 20: type mismatch: '-' cannot operate on 'int', 'float' +error: 21: type mismatch: '*' cannot operate on 'int', 'float' +error: 22: type mismatch: '/' cannot operate on 'int', 'float' +error: 23: type mismatch: '+' cannot operate on 'float', 'int' +error: 24: type mismatch: '-' cannot operate on 'float', 'int' +error: 25: type mismatch: '*' cannot operate on 'float', 'int' +error: 26: type mismatch: '/' cannot operate on 'float', 'int' +error: 27: type mismatch: '+' cannot operate on 'int', 'float' +error: 28: type mismatch: '-' cannot operate on 'int', 'float' +error: 29: type mismatch: '*' cannot operate on 'int', 'float' +error: 30: type mismatch: '/' cannot operate on 'int', 'float' +error: 31: type mismatch: '+' cannot operate on 'float', 'int' +error: 32: type mismatch: '-' cannot operate on 'float', 'int' +error: 33: type mismatch: '*' cannot operate on 'float', 'int' +error: 34: type mismatch: '/' cannot operate on 'float', 'int' +error: 35: unknown identifier 'u' +error: 36: unknown identifier 'u' +error: 37: unknown identifier 'u' +error: 38: unknown identifier 'u' +error: 39: unknown identifier 'u' +error: 40: unknown identifier 'u' +error: 41: unknown identifier 'u' +error: 42: unknown identifier 'u' +27 errors diff --git a/tests/sksl/errors/MismatchedNumbersES3.glsl b/tests/sksl/errors/MismatchedNumbersES3.glsl new file mode 100644 index 0000000000..a6b9fd7e02 --- /dev/null +++ b/tests/sksl/errors/MismatchedNumbersES3.glsl @@ -0,0 +1,32 @@ +### Compilation failed: + +error: 17: type mismatch: '=' cannot operate on 'uint', 'float' +error: 18: type mismatch: '=' cannot operate on 'int', 'uint' +error: 19: type mismatch: '=' cannot operate on 'float', 'uint' +error: 20: type mismatch: '=' cannot operate on 'uint', 'int' +error: 21: type mismatch: '=' cannot operate on 'uint', 'float' +error: 22: type mismatch: '+' cannot operate on 'uint', 'float' +error: 23: type mismatch: '-' cannot operate on 'uint', 'float' +error: 24: type mismatch: '*' cannot operate on 'uint', 'float' +error: 25: type mismatch: '/' cannot operate on 'uint', 'float' +error: 26: type mismatch: '+' cannot operate on 'float', 'uint' +error: 27: type mismatch: '-' cannot operate on 'float', 'uint' +error: 28: type mismatch: '*' cannot operate on 'float', 'uint' +error: 29: type mismatch: '/' cannot operate on 'float', 'uint' +error: 30: type mismatch: '+' cannot operate on 'uint', 'float' +error: 31: type mismatch: '-' cannot operate on 'uint', 'float' +error: 32: type mismatch: '*' cannot operate on 'uint', 'float' +error: 33: type mismatch: '/' cannot operate on 'uint', 'float' +error: 34: type mismatch: '+' cannot operate on 'float', 'uint' +error: 35: type mismatch: '-' cannot operate on 'float', 'uint' +error: 36: type mismatch: '*' cannot operate on 'float', 'uint' +error: 37: type mismatch: '/' cannot operate on 'float', 'uint' +error: 38: type mismatch: '+' cannot operate on 'int', 'uint' +error: 39: type mismatch: '-' cannot operate on 'int', 'uint' +error: 40: type mismatch: '*' cannot operate on 'int', 'uint' +error: 41: type mismatch: '/' cannot operate on 'int', 'uint' +error: 42: type mismatch: '+' cannot operate on 'uint', 'int' +error: 43: type mismatch: '-' cannot operate on 'uint', 'int' +error: 44: type mismatch: '*' cannot operate on 'uint', 'int' +error: 45: type mismatch: '/' cannot operate on 'uint', 'int' +29 errors diff --git a/tests/sksl/errors/OpenArray.glsl b/tests/sksl/errors/OpenArray.glsl index 5f76399fe3..ed872172a4 100644 --- a/tests/sksl/errors/OpenArray.glsl +++ b/tests/sksl/errors/OpenArray.glsl @@ -1,6 +1,4 @@ ### Compilation failed: -error: 1: shader 'main' must be main() or main(float2) -error: 2: unknown identifier 'color' error: 2: expected expression, but found '=' -3 errors +1 error diff --git a/tests/sksl/errors/OverflowIntLiteral.glsl b/tests/sksl/errors/OverflowIntLiteral.glsl index 5ac95193da..f951a3db45 100644 --- a/tests/sksl/errors/OverflowIntLiteral.glsl +++ b/tests/sksl/errors/OverflowIntLiteral.glsl @@ -1,9 +1,6 @@ ### Compilation failed: -error: 4: integer is out of range for type 'int': -2147483649 -error: 6: integer is out of range for type 'int': 2147483648 -error: 8: integer is out of range for type 'short': -32769 -error: 9: integer is out of range for type 'short': 32768 -error: 11: integer is out of range for type 'int': 2147483648 -error: 12: integer is out of range for type 'short': 32768 -6 errors +error: 2: integer is out of range for type 'int': -2147483649 +error: 4: integer is out of range for type 'int': 2147483648 +error: 5: integer is out of range for type 'int': 2147483648 +3 errors diff --git a/tests/sksl/errors/OverflowShortLiteral.glsl b/tests/sksl/errors/OverflowShortLiteral.glsl new file mode 100644 index 0000000000..0d2bf1858e --- /dev/null +++ b/tests/sksl/errors/OverflowShortLiteral.glsl @@ -0,0 +1,6 @@ +### Compilation failed: + +error: 1: integer is out of range for type 'short': -32769 +error: 2: integer is out of range for type 'short': 32768 +error: 3: integer is out of range for type 'short': 32768 +3 errors diff --git a/tests/sksl/errors/PrivateTypes.glsl b/tests/sksl/errors/PrivateTypes.glsl index dbb53e36bb..a7b9da57bc 100644 --- a/tests/sksl/errors/PrivateTypes.glsl +++ b/tests/sksl/errors/PrivateTypes.glsl @@ -1,9 +1,8 @@ ### Compilation failed: -error: 2: type '$mat' is private -error: 6: type '$bvec' is private -error: 9: type '$ivec' is private -error: 10: type '$genType' is private -error: 11: type '$mat' is private -error: 12: type '$floatLiteral' is private -6 errors +error: 2: type '$bvec' is private +error: 5: type '$ivec' is private +error: 6: type '$genType' is private +error: 7: type '$mat' is private +error: 8: type '$floatLiteral' is private +5 errors diff --git a/tests/sksl/errors/RedeclareShaderType.glsl b/tests/sksl/errors/RedeclareShaderType.glsl new file mode 100644 index 0000000000..826c2bb82d --- /dev/null +++ b/tests/sksl/errors/RedeclareShaderType.glsl @@ -0,0 +1,4 @@ +### Compilation failed: + +error: 1: expected an identifier, but found type 'shader' +1 error diff --git a/tests/sksl/errors/ReturnDifferentType.glsl b/tests/sksl/errors/ReturnDifferentType.glsl index f4762b9230..894aea6fcb 100644 --- a/tests/sksl/errors/ReturnDifferentType.glsl +++ b/tests/sksl/errors/ReturnDifferentType.glsl @@ -1,4 +1,4 @@ ### Compilation failed: -error: 2: functions 'void main()' and 'int main()' differ only in return type +error: 2: functions 'void func()' and 'int func()' differ only in return type 1 error diff --git a/tests/sksl/errors/UnscopedVariableInElse.glsl b/tests/sksl/errors/UnscopedVariableInElse.glsl index 46151b7629..3ce2f16f51 100644 --- a/tests/sksl/errors/UnscopedVariableInElse.glsl +++ b/tests/sksl/errors/UnscopedVariableInElse.glsl @@ -1,4 +1,4 @@ ### Compilation failed: -error: 2: variable 'color' must be created in a scope +error: 2: variable 'x' must be created in a scope 1 error diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp index 559aec20a2..2f0ec2ee59 100644 --- a/tools/skqp/src/skqp.cpp +++ b/tools/skqp/src/skqp.cpp @@ -114,23 +114,28 @@ static std::vector<SkQP::SkSLErrorTest> get_sksl_error_tests(SkQPAssetManager* a const ExclusionList& exclusionList) { std::vector<SkQP::SkSLErrorTest> skslErrorTests; - // Android only supports runtime shaders, not color filters or blenders. - std::vector<std::string> paths = assetManager->iterateDir("sksl/runtime_errors/", ".rts"); - for (const std::string& path : paths) { - SkString name = SkOSPath::Basename(path.c_str()); - if (exclusionList.isExcluded(name.c_str())) { - continue; - } - sk_sp<SkData> shaderText = GetResourceAsData(path.c_str()); - if (!shaderText) { - continue; + auto iterateFn = [&](const char* directory, const char* extension) { + std::vector<std::string> paths = assetManager->iterateDir(directory, extension); + for (const std::string& path : paths) { + SkString name = SkOSPath::Basename(path.c_str()); + if (exclusionList.isExcluded(name.c_str())) { + continue; + } + sk_sp<SkData> shaderText = GetResourceAsData(path.c_str()); + if (!shaderText) { + continue; + } + skslErrorTests.push_back({ + name.c_str(), + std::string(static_cast<const char*>(shaderText->data()), shaderText->size()) + }); } - skslErrorTests.push_back({ - name.c_str(), - std::string(static_cast<const char*>(shaderText->data()), shaderText->size()) - }); }; + // Android only supports runtime shaders, not fragment shaders, color filters or blenders. + iterateFn("sksl/errors/", ".rts"); + iterateFn("sksl/runtime_errors/", ".rts"); + auto lt = [](const SkQP::SkSLErrorTest& a, const SkQP::SkSLErrorTest& b) { return a.name < b.name; }; |