skia2/tests/sksl/glsl
John Stiles d0e4840b11 Fix crash when swizzling a bvec with constant 0/1s.
Code like
  bool4 result = val.xy01;

Will now be converted to:
  bvec4 result = bvec4(val.xy, bool(0), bool(1));

Previously it tried to do this, but there isn't an implicit conversion
from int to bool, so it was silently failing and adding nulls into the
constructor:
  bvec4 result = bvec4(val.xy, $coerceToBool(0), $coerceToBool(1));

This CL also cleans up some related code that I was checking while
trying to understand the nature of the error.

Change-Id: I5b7d96760a03170ff78b46251c4182cc4e89836f
Bug: oss-fuzz:25781
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318636
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-22 19:08:42 +00:00
..
golden Fix crash when swizzling a bvec with constant 0/1s. 2020-09-22 19:08:42 +00:00
ArrayConstructors.sksl
ArrayIndexTypes.sksl
ArrayTypes.sksl
AssignmentTypeMatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
BoolFolding.sksl
Caps.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
CastsRoundTowardZero.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
ClipDistanceFragment.sksl
ClipDistanceVertex.vert
Clockwise.sksl
ComplexDelete.sksl
ConstantIf.sksl
ConstArray.sksl
ConstVariableComparison.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
Control.sksl
DeadDoWhileLoop.sksl Add unit test for a dead do-while loop. 2020-09-18 20:57:12 +00:00
DeadLoopVariable.sksl
DependentInitializers.sksl
Derivatives.sksl Migrate Derivatives tests to golden outputs. 2020-09-18 17:30:07 +00:00
DerivativesFlipY.sksl Migrate Derivatives tests to golden outputs. 2020-09-18 17:30:07 +00:00
DerivativesUnused.sksl Migrate Derivatives tests to golden outputs. 2020-09-18 17:30:07 +00:00
Discard.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
FloatFolding.sksl
ForceHighPrecision.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
FragCoordsFlipY.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
FragCoordsNew.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
FragCoordsOld.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
FrExp.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
FunctionArgumentMatch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
FunctionPrototype.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
Functions.sksl
Geometry.geom Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
GeometryExtension.geom Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
GeometryGSInvocations.geom Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
GeometryNoGSInvocations.geom Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
Height.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
HelloWorld.sksl
Hex.sksl
IncompleteShortIntPrecision.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
InstanceID.vert
InterfaceBlockAnonymous.sksl
InterfaceBlockArray.sksl
InterfaceBlockNamed.sksl
IntFolding.sksl
Matrices.sksl
MatrixFolding.sksl
ModifiersDeclaration.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
MultipleAssignments.sksl
NegatedVectorLiteral.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
NoFragCoordsPos.vert Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
NoFragCoordsPosRT.vert Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
NormalizationGeo.geom Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
NormalizationVert.vert Migrate geometry SkSL tests to golden outputs. 2020-09-18 17:34:22 +00:00
NumberConversions.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
Offset.sksl
Operators.sksl
RectangleTexture.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
ResizeMatrix.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
SampleMask.sksl
ScopedSymbol.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
ShortCircuitBoolFolding.sksl
ShortIntPrecision.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
StackingVectorCasts.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
StaticIf.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StaticSwitch.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
StaticSwitchWithBreak.sksl
StaticSwitchWithBreakInsideBlock.sksl
StaticSwitchWithConditionalBreak.sksl
StaticSwitchWithConditionalBreakInsideBlock.sksl
StaticSwitchWithFallthroughA.sksl
StaticSwitchWithFallthroughB.sksl
StaticSwitchWithStaticConditionalBreak.sksl
StaticSwitchWithStaticConditionalBreakInsideBlock.sksl
Structs.sksl
Switch.sksl
SwitchContainingDeadCode.sksl
SwitchWithFallthrough.sksl
SwizzleBoolConstants.sksl Add unit test for swizzling booleans. 2020-09-22 18:47:19 +00:00
SwizzleConstants.sksl Migrate swizzle tests to golden SkSL files. 2020-09-16 18:16:07 +00:00
SwizzleLTRB.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
SwizzleOpt.sksl Migrate swizzle tests to golden SkSL files. 2020-09-16 18:16:07 +00:00
SwizzleScalar.sksl Migrate swizzle tests to golden SkSL files. 2020-09-16 18:16:07 +00:00
TernaryAsLValueEntirelyFoldable.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
TernaryAsLValueFoldableTest.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
TernaryAsLValueUnfoldable.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00
Texture.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
TextureSharpen.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
TextureSharpenVersion110.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
TextureVersion110.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
TypePrecision.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
UnaryPositiveNegative.sksl Migrate SkSL error tests to golden outputs. 2020-09-18 13:46:17 +00:00
UnusedVariables.sksl
UsesPrecisionModifiers.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
VectorConstructors.sksl
VectorFolding.sksl
Version110.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
Version450Core.sksl Add support for #pragma settings comments in SkSL. 2020-09-16 22:19:58 +00:00
VertexID.vert
Width.sksl Convert additional GLSL tests to use golden files. 2020-09-16 20:11:17 +00:00