Flip the switch to activate DSLParser
Change-Id: Id894eb70273454716eb33c85dff2056333e90cdd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445281
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/include/sksl/DSLCore.h b/include/sksl/DSLCore.h
index b60a39d..c939bec 100644
--- a/include/sksl/DSLCore.h
+++ b/include/sksl/DSLCore.h
@@ -20,7 +20,7 @@
#include "include/sksl/DSLWrapper.h"
#include "include/sksl/SkSLErrorReporter.h"
-#define SKSL_DSL_PARSER 0
+#define SKSL_DSL_PARSER 1
namespace SkSL {
diff --git a/src/sksl/SkSLDSLParser.cpp b/src/sksl/SkSLDSLParser.cpp
index cc331ff..583b478 100644
--- a/src/sksl/SkSLDSLParser.cpp
+++ b/src/sksl/SkSLDSLParser.cpp
@@ -454,10 +454,11 @@
if (!parseArrayDimensions(&type)) {
return result;
}
- if (!parseInitializer(&initializer)) {
+ DSLExpression anotherInitializer;
+ if (!parseInitializer(&anotherInitializer)) {
return result;
}
- result.push_back(T(mods, type, this->text(identifierName), std::move(initializer)));
+ result.push_back(T(mods, type, this->text(identifierName), std::move(anotherInitializer)));
AddToSymbolTable(result.back());
}
this->expect(Token::Kind::TK_SEMICOLON, "';'");
diff --git a/tests/sksl/errors/ArrayOfInvalidSize.glsl b/tests/sksl/errors/ArrayOfInvalidSize.glsl
index 18ebea5..2cb1c11 100644
--- a/tests/sksl/errors/ArrayOfInvalidSize.glsl
+++ b/tests/sksl/errors/ArrayOfInvalidSize.glsl
@@ -8,14 +8,14 @@
error: 6: expected 'int', but found 'bool'
error: 7: expected 'int', but found 'bool'
error: 8: expected 'int', but found 'int2'
-error: 9: array must have a size
+error: 9: missing index in '[]'
error: 10: array size must be positive
error: 11: array size must be positive
error: 12: array size must be positive
-error: 13: expected 'int', but found 'float'
-error: 14: array size is too large
-error: 15: expected 'int', but found 'bool'
-error: 16: expected 'int', but found 'bool'
-error: 17: expected 'int', but found 'int2'
-error: 18: array must have a size
+error: 13: expected int literal
+error: 14: array size out of bounds
+error: 15: expected int literal
+error: 16: expected int literal
+error: 17: expected int literal
+error: 18: expected array dimension
18 errors
diff --git a/tests/sksl/errors/ArrayOfVoid.glsl b/tests/sksl/errors/ArrayOfVoid.glsl
index a717d3d..0fac784 100644
--- a/tests/sksl/errors/ArrayOfVoid.glsl
+++ b/tests/sksl/errors/ArrayOfVoid.glsl
@@ -1,9 +1,9 @@
### Compilation failed:
-error: 3: type 'void' not allowed in this context
-error: 4: type 'void' not allowed in this context
+error: 3: type 'void' may not be used in an array
+error: 4: type 'void' may not be used in an array
error: 6: type 'void' may not be used in an array
-error: 7: type 'void' not allowed in this context
-error: 8: type 'void' not allowed in this context
+error: 7: type 'void' may not be used in an array
+error: 8: type 'void' may not be used in an array
error: 9: type 'void' may not be used in an array
6 errors
diff --git a/tests/sksl/errors/ArrayOfVoidInStruct.glsl b/tests/sksl/errors/ArrayOfVoidInStruct.glsl
index acde5ff..015aa7c 100644
--- a/tests/sksl/errors/ArrayOfVoidInStruct.glsl
+++ b/tests/sksl/errors/ArrayOfVoidInStruct.glsl
@@ -1,6 +1,6 @@
### Compilation failed:
-error: 4: opaque type 'void' is not permitted in a struct
-error: 5: opaque type 'void' is not permitted in a struct
-error: 6: multi-dimensional arrays are not supported
+error: 4: type 'void' may not be used in an array
+error: 5: type 'void' may not be used in an array
+error: 6: type 'void' may not be used in an array
3 errors
diff --git a/tests/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.glsl b/tests/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.glsl
index 69e8f45..7ec388d 100644
--- a/tests/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.glsl
+++ b/tests/sksl/errors/ArrayTypeTooManyDimensionsInFuncBody.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 1: expected ';', but found 'x'
+error: 1: multi-dimensional arrays are not supported
1 error
diff --git a/tests/sksl/errors/ArrayUnspecifiedDimensions.glsl b/tests/sksl/errors/ArrayUnspecifiedDimensions.glsl
index f6d294e..d30ba30 100644
--- a/tests/sksl/errors/ArrayUnspecifiedDimensions.glsl
+++ b/tests/sksl/errors/ArrayUnspecifiedDimensions.glsl
@@ -1,7 +1,7 @@
### Compilation failed:
-error: 1: array must have a size
-error: 2: expected 'int', but found 'float'
-error: 3: expected 'int', but found 'bool'
-error: 5: array must have a size
+error: 1: expected array dimension
+error: 2: expected int literal
+error: 3: expected int literal
+error: 5: missing index in '[]'
4 errors
diff --git a/tests/sksl/errors/LayoutRepeatedQualifiers.glsl b/tests/sksl/errors/LayoutRepeatedQualifiers.glsl
index 40bfbd9..ab91653 100644
--- a/tests/sksl/errors/LayoutRepeatedQualifiers.glsl
+++ b/tests/sksl/errors/LayoutRepeatedQualifiers.glsl
@@ -11,4 +11,7 @@
error: 22: layout qualifier 'set' appears more than once
error: 23: layout qualifier 'builtin' appears more than once
error: 24: layout qualifier 'input_attachment_index' appears more than once
-11 errors
+error: 25: 'srgb_unpremul' is only permitted in runtime effects
+error: 25: 'srgb_unpremul' is only permitted on 'uniform' variables
+error: 25: 'srgb_unpremul' is only permitted on half3, half4, float3, or float4 variables
+14 errors
diff --git a/tests/sksl/errors/MismatchedNumbers.glsl b/tests/sksl/errors/MismatchedNumbers.glsl
index ae2ce87..9bcfd24 100644
--- a/tests/sksl/errors/MismatchedNumbers.glsl
+++ b/tests/sksl/errors/MismatchedNumbers.glsl
@@ -5,7 +5,9 @@
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'
@@ -48,4 +50,4 @@
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'
-48 errors
+50 errors
diff --git a/tests/sksl/errors/OpaqueTypeInArray.glsl b/tests/sksl/errors/OpaqueTypeInArray.glsl
index 55b95c2..b62bac0 100644
--- a/tests/sksl/errors/OpaqueTypeInArray.glsl
+++ b/tests/sksl/errors/OpaqueTypeInArray.glsl
@@ -2,7 +2,6 @@
error: 1: opaque type 'sampler' may not be used in an array
error: 2: opaque type 'sampler' may not be used in an array
-error: 3: variables of type 'sampler' must be global
error: 3: opaque type 'sampler' may not be used in an array
error: 4: opaque type 'sampler' may not be used in an array
-5 errors
+4 errors
diff --git a/tests/sksl/errors/OpaqueTypeInInterfaceBlock.glsl b/tests/sksl/errors/OpaqueTypeInInterfaceBlock.glsl
index 2a23070..64433ed 100644
--- a/tests/sksl/errors/OpaqueTypeInInterfaceBlock.glsl
+++ b/tests/sksl/errors/OpaqueTypeInInterfaceBlock.glsl
@@ -1,5 +1,4 @@
### Compilation failed:
error: 1: variables of type 'sampler' must be global
-error: 1: opaque type 'sampler' is not permitted in an interface block
-2 errors
+1 error
diff --git a/tests/sksl/errors/OpenArray.glsl b/tests/sksl/errors/OpenArray.glsl
index ed87217..5f76399 100644
--- a/tests/sksl/errors/OpenArray.glsl
+++ b/tests/sksl/errors/OpenArray.glsl
@@ -1,4 +1,6 @@
### Compilation failed:
+error: 1: shader 'main' must be main() or main(float2)
+error: 2: unknown identifier 'color'
error: 2: expected expression, but found '='
-1 error
+3 errors
diff --git a/tests/sksl/errors/Ossfuzz26700.glsl b/tests/sksl/errors/Ossfuzz26700.glsl
index 72b3387..163e3d4 100644
--- a/tests/sksl/errors/Ossfuzz26700.glsl
+++ b/tests/sksl/errors/Ossfuzz26700.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 2: unknown identifier '_'
+error: 2: expected ';', but found '='
1 error
diff --git a/tests/sksl/errors/Ossfuzz27650.glsl b/tests/sksl/errors/Ossfuzz27650.glsl
index 37c35c1..4257eda 100644
--- a/tests/sksl/errors/Ossfuzz27650.glsl
+++ b/tests/sksl/errors/Ossfuzz27650.glsl
@@ -1,4 +1,5 @@
### Compilation failed:
error: 1: expected 'int', but found 'float'
-1 error
+error: 1: unknown identifier 'i'
+2 errors
diff --git a/tests/sksl/errors/Ossfuzz28050.glsl b/tests/sksl/errors/Ossfuzz28050.glsl
index 6fc2ee0..a73760e 100644
--- a/tests/sksl/errors/Ossfuzz28050.glsl
+++ b/tests/sksl/errors/Ossfuzz28050.glsl
@@ -1,5 +1,4 @@
### Compilation failed:
error: 2: invalid arguments to 'float[1]' constructor (expected 1 elements, but found 0)
-error: 3: function 'void wna()' is not defined
-2 errors
+1 error
diff --git a/tests/sksl/errors/Ossfuzz29444.glsl b/tests/sksl/errors/Ossfuzz29444.glsl
index 6fc2ee0..b14fedd 100644
--- a/tests/sksl/errors/Ossfuzz29444.glsl
+++ b/tests/sksl/errors/Ossfuzz29444.glsl
@@ -1,5 +1,5 @@
### Compilation failed:
error: 2: invalid arguments to 'float[1]' constructor (expected 1 elements, but found 0)
-error: 3: function 'void wna()' is not defined
+error: 2: invalid arguments to 'float[1]' constructor (expected 1 elements, but found 0)
2 errors
diff --git a/tests/sksl/errors/Ossfuzz29845.glsl b/tests/sksl/errors/Ossfuzz29845.glsl
index 2cf7d59..c25fffc 100644
--- a/tests/sksl/errors/Ossfuzz29845.glsl
+++ b/tests/sksl/errors/Ossfuzz29845.glsl
@@ -1,4 +1,5 @@
### Compilation failed:
error: 2: no type named 'l'
-1 error
+error: 2: expected a type, but found '('
+2 errors
diff --git a/tests/sksl/errors/Ossfuzz32156.glsl b/tests/sksl/errors/Ossfuzz32156.glsl
index a577fca..3be6b8f 100644
--- a/tests/sksl/errors/Ossfuzz32156.glsl
+++ b/tests/sksl/errors/Ossfuzz32156.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 1: array size must be an integer
+error: 1: expected ']', but found '*'
1 error
diff --git a/tests/sksl/errors/Ossfuzz36850.asm.frag b/tests/sksl/errors/Ossfuzz36850.asm.frag
index f0c29c1..64374ca 100644
--- a/tests/sksl/errors/Ossfuzz36850.asm.frag
+++ b/tests/sksl/errors/Ossfuzz36850.asm.frag
@@ -1,4 +1,6 @@
### Compilation failed:
-error: array must have a size
-1 error
+error: 1: expected expression, but found ']'
+error: 1: expected ']', but found ';'
+error: 2: expected ';', but found 'void'
+3 errors
diff --git a/tests/sksl/errors/Ossfuzz37469.asm.frag b/tests/sksl/errors/Ossfuzz37469.asm.frag
index f0c29c1..4dc1ef8 100644
--- a/tests/sksl/errors/Ossfuzz37469.asm.frag
+++ b/tests/sksl/errors/Ossfuzz37469.asm.frag
@@ -1,4 +1,6 @@
### Compilation failed:
-error: array must have a size
-1 error
+error: 1: expected expression, but found ']'
+error: 1: expected ']', but found ';'
+error: 1: expected ';', but found 'void'
+3 errors
diff --git a/tests/sksl/errors/OverflowFloatLiteral.glsl b/tests/sksl/errors/OverflowFloatLiteral.glsl
index cb52fae..00523fd 100644
--- a/tests/sksl/errors/OverflowFloatLiteral.glsl
+++ b/tests/sksl/errors/OverflowFloatLiteral.glsl
@@ -1,4 +1,5 @@
### Compilation failed:
error: 2: floating-point value is too large: 3.41e+38
-1 error
+error: 2: type mismatch: '=' cannot operate on 'half', 'half4'
+2 errors
diff --git a/tests/sksl/errors/OverflowUintLiteral.glsl b/tests/sksl/errors/OverflowUintLiteral.glsl
index 0de3a79..a9d1ab9 100644
--- a/tests/sksl/errors/OverflowUintLiteral.glsl
+++ b/tests/sksl/errors/OverflowUintLiteral.glsl
@@ -1,4 +1,5 @@
### Compilation failed:
+error: 2: integer is out of range for type 'uint': -1
error: 4: integer is too large: 4294967296
-1 error
+2 errors
diff --git a/tests/sksl/errors/PrivateTypes.glsl b/tests/sksl/errors/PrivateTypes.glsl
index d1287c8..2001eea 100644
--- a/tests/sksl/errors/PrivateTypes.glsl
+++ b/tests/sksl/errors/PrivateTypes.glsl
@@ -1,7 +1,7 @@
### Compilation failed:
-error: 2: type '$mat' is private
-error: 5: type 'S' is private
-error: 9: type '$ivec' is private
-error: 10: type '$genType' is private
+error: 33: type '$mat' is private
+error: 33: type '$bvec' is private
+error: 33: type '$ivec' is private
+error: 33: type '$genType' is private
4 errors
diff --git a/tests/sksl/errors/PrototypeInFuncBody.glsl b/tests/sksl/errors/PrototypeInFuncBody.glsl
index f32373f..811fa12 100644
--- a/tests/sksl/errors/PrototypeInFuncBody.glsl
+++ b/tests/sksl/errors/PrototypeInFuncBody.glsl
@@ -1,4 +1,5 @@
### Compilation failed:
error: 2: expected ';', but found '('
-1 error
+error: 2: expected expression, but found ')'
+2 errors
diff --git a/tests/sksl/errors/StaticSwitchTest.glsl b/tests/sksl/errors/StaticSwitchTest.glsl
index 309c2e7..1957293 100644
--- a/tests/sksl/errors/StaticSwitchTest.glsl
+++ b/tests/sksl/errors/StaticSwitchTest.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 4: static switch has non-static test
+error: static switch has non-static test
1 error
diff --git a/tests/sksl/errors/SwizzleMatrix.glsl b/tests/sksl/errors/SwizzleMatrix.glsl
index 2e3ee41..cbe9acc 100644
--- a/tests/sksl/errors/SwizzleMatrix.glsl
+++ b/tests/sksl/errors/SwizzleMatrix.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 3: cannot swizzle value of type 'float2x2'
+error: 3: type 'float2x2' does not have a field named 'y'
1 error
diff --git a/tests/sksl/errors/SwizzleTooManyComponents.glsl b/tests/sksl/errors/SwizzleTooManyComponents.glsl
index c12d8e1..f66fc4a 100644
--- a/tests/sksl/errors/SwizzleTooManyComponents.glsl
+++ b/tests/sksl/errors/SwizzleTooManyComponents.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 1: too many components in swizzle mask 'xxxxx'
+error: 1: too many components in swizzle mask
1 error
diff --git a/tests/sksl/errors/UnscopedVariableInDoWhile.glsl b/tests/sksl/errors/UnscopedVariableInDoWhile.glsl
index 74112d3..7ff5c6a 100644
--- a/tests/sksl/errors/UnscopedVariableInDoWhile.glsl
+++ b/tests/sksl/errors/UnscopedVariableInDoWhile.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 2: variable 'foo' must be created in a scope
+error: 944: variable 'foo' must be created in a scope
1 error
diff --git a/tests/sksl/errors/VertexEarlyReturn.glsl b/tests/sksl/errors/VertexEarlyReturn.glsl
index 8023605..50fd3a8 100644
--- a/tests/sksl/errors/VertexEarlyReturn.glsl
+++ b/tests/sksl/errors/VertexEarlyReturn.glsl
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 5: early returns from vertex programs are not supported
+error: 3: early returns from vertex programs are not supported
1 error
diff --git a/tests/sksl/metal/OpaqueTypeInInterfaceBlock.metal b/tests/sksl/metal/OpaqueTypeInInterfaceBlock.metal
index 2a23070..64433ed 100644
--- a/tests/sksl/metal/OpaqueTypeInInterfaceBlock.metal
+++ b/tests/sksl/metal/OpaqueTypeInInterfaceBlock.metal
@@ -1,5 +1,4 @@
### Compilation failed:
error: 1: variables of type 'sampler' must be global
-error: 1: opaque type 'sampler' is not permitted in an interface block
-2 errors
+1 error
diff --git a/tests/sksl/runtime_errors/ES3Types.skvm b/tests/sksl/runtime_errors/ES3Types.skvm
index 6c9e5d4..1281ad5 100644
--- a/tests/sksl/runtime_errors/ES3Types.skvm
+++ b/tests/sksl/runtime_errors/ES3Types.skvm
@@ -1,29 +1,29 @@
### Compilation failed:
-error: 1: type 'float2x3' is not supported
-error: 2: type 'float2x4' is not supported
-error: 3: type 'float3x2' is not supported
-error: 4: type 'float3x4' is not supported
-error: 5: type 'float4x2' is not supported
-error: 6: type 'float4x3' is not supported
-error: 8: type 'half2x3' is not supported
-error: 9: type 'half2x4' is not supported
-error: 10: type 'half3x2' is not supported
-error: 11: type 'half3x4' is not supported
-error: 12: type 'half4x2' is not supported
-error: 13: type 'half4x3' is not supported
-error: 15: type 'uint' is not supported
-error: 16: type 'uint2' is not supported
-error: 17: type 'uint3' is not supported
-error: 18: type 'uint4' is not supported
-error: 20: type 'ushort' is not supported
-error: 21: type 'ushort2' is not supported
-error: 22: type 'ushort3' is not supported
-error: 23: type 'ushort4' is not supported
-error: 25: type 'uint4' is not supported
-error: 26: type 'ushort' is not supported
-error: 27: type 'float2x3' is not supported
-error: 29: type 'Sh42' is not supported
-error: 30: type 'Sus' is not supported
-error: 31: type 'Sau' is not supported
+error: 37: type 'float2x3' is not supported
+error: 37: type 'float2x4' is not supported
+error: 37: type 'float3x2' is not supported
+error: 37: type 'float3x4' is not supported
+error: 37: type 'float4x2' is not supported
+error: 37: type 'float4x3' is not supported
+error: 37: type 'half2x3' is not supported
+error: 37: type 'half2x4' is not supported
+error: 37: type 'half3x2' is not supported
+error: 37: type 'half3x4' is not supported
+error: 37: type 'half4x2' is not supported
+error: 37: type 'half4x3' is not supported
+error: 37: type 'uint' is not supported
+error: 37: type 'uint2' is not supported
+error: 37: type 'uint3' is not supported
+error: 37: type 'uint4' is not supported
+error: 37: type 'ushort' is not supported
+error: 37: type 'ushort2' is not supported
+error: 37: type 'ushort3' is not supported
+error: 37: type 'ushort4' is not supported
+error: 37: type 'uint4' is not supported
+error: 37: type 'ushort' is not supported
+error: 37: type 'float2x3' is not supported
+error: 37: type 'half4x2' is not supported
+error: 37: type 'ushort' is not supported
+error: 37: type 'uint' is not supported
26 errors
diff --git a/tests/sksl/runtime_errors/FirstClassArrays.skvm b/tests/sksl/runtime_errors/FirstClassArrays.skvm
index a9dad42..8a47926 100644
--- a/tests/sksl/runtime_errors/FirstClassArrays.skvm
+++ b/tests/sksl/runtime_errors/FirstClassArrays.skvm
@@ -1,5 +1,4 @@
### Compilation failed:
-error: 3: array size must appear after variable name
error: 5: construction of array type 'float[3]' is not supported
-2 errors
+1 error
diff --git a/tests/sksl/runtime_errors/IllegalRecursionComplex.skvm b/tests/sksl/runtime_errors/IllegalRecursionComplex.skvm
index eefba2d..8f4a3f3 100644
--- a/tests/sksl/runtime_errors/IllegalRecursionComplex.skvm
+++ b/tests/sksl/runtime_errors/IllegalRecursionComplex.skvm
@@ -1,6 +1,6 @@
### Compilation failed:
-error: 16: potential recursion (function call cycle) not allowed:
+error: potential recursion (function call cycle) not allowed:
void f_one(int n)
void f_two(int n)
void f_three(int n)
diff --git a/tests/sksl/runtime_errors/IllegalRecursionMutual.skvm b/tests/sksl/runtime_errors/IllegalRecursionMutual.skvm
index 34f1b6b..8fb8155 100644
--- a/tests/sksl/runtime_errors/IllegalRecursionMutual.skvm
+++ b/tests/sksl/runtime_errors/IllegalRecursionMutual.skvm
@@ -1,6 +1,6 @@
### Compilation failed:
-error: 5: potential recursion (function call cycle) not allowed:
+error: potential recursion (function call cycle) not allowed:
bool is_odd(int n)
bool is_even(int n)
bool is_odd(int n)
diff --git a/tests/sksl/runtime_errors/IllegalRecursionSimple.skvm b/tests/sksl/runtime_errors/IllegalRecursionSimple.skvm
index 6659d20..969943a 100644
--- a/tests/sksl/runtime_errors/IllegalRecursionSimple.skvm
+++ b/tests/sksl/runtime_errors/IllegalRecursionSimple.skvm
@@ -1,6 +1,6 @@
### Compilation failed:
-error: 4: potential recursion (function call cycle) not allowed:
+error: potential recursion (function call cycle) not allowed:
int fibonacci(int n)
int fibonacci(int n)
1 error
diff --git a/tests/sksl/runtime_errors/IllegalShaderUse.skvm b/tests/sksl/runtime_errors/IllegalShaderUse.skvm
index 5dbbbfd..b5d23a0 100644
--- a/tests/sksl/runtime_errors/IllegalShaderUse.skvm
+++ b/tests/sksl/runtime_errors/IllegalShaderUse.skvm
@@ -6,7 +6,8 @@
error: 14: variables of type 'shader' must be global
error: 14: variables of type 'shader' must be uniform
error: 15: parameters of type 'shader' not allowed
+error: 15: unknown identifier 's'
error: 16: functions may not return opaque type 'shader'
error: 17: cannot construct 'shader'
error: 18: ternary expression of opaque type 'shader' not allowed
-9 errors
+10 errors
diff --git a/tests/sksl/runtime_errors/IllegalStatements.skvm b/tests/sksl/runtime_errors/IllegalStatements.skvm
index 2e15584..f8bcce7 100644
--- a/tests/sksl/runtime_errors/IllegalStatements.skvm
+++ b/tests/sksl/runtime_errors/IllegalStatements.skvm
@@ -1,7 +1,7 @@
### Compilation failed:
-error: 3: discard statement is only permitted in fragment shaders
-error: 5: do-while loops are not supported
-error: 7: while loops are not supported
-error: 9: switch statements are not supported
+error: 944: do-while loops are not supported
+error: 967: while loops are not supported
+error: 68: switch statements are not supported
+error: 9: function 'switch_stmt' can exit without returning a value
4 errors
diff --git a/tests/sksl/runtime_errors/InvalidBlendMain.skvm b/tests/sksl/runtime_errors/InvalidBlendMain.skvm
index 3d4bc70..33b2db6 100644
--- a/tests/sksl/runtime_errors/InvalidBlendMain.skvm
+++ b/tests/sksl/runtime_errors/InvalidBlendMain.skvm
@@ -2,7 +2,13 @@
error: 6: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
error: 7: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
+error: 7: unknown identifier 'src'
error: 8: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
+error: 8: unknown identifier 'src'
error: 9: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
+error: 9: unknown identifier 'src'
+error: 9: unknown identifier 'dst'
error: 10: 'main' parameters must be (vec4|float4|half4, vec4|float4|half4)
-5 errors
+error: 10: unknown identifier 'src'
+error: 10: unknown identifier 'dst'
+11 errors
diff --git a/tests/sksl/runtime_errors/InvalidColorFilterMain.skvm b/tests/sksl/runtime_errors/InvalidColorFilterMain.skvm
index b5a422a..2620888 100644
--- a/tests/sksl/runtime_errors/InvalidColorFilterMain.skvm
+++ b/tests/sksl/runtime_errors/InvalidColorFilterMain.skvm
@@ -3,5 +3,7 @@
error: 6: 'main' parameter must be 'vec4', 'float4', or 'half4'
error: 7: 'main' parameter must be 'vec4', 'float4', or 'half4'
error: 8: 'main' parameter must be 'vec4', 'float4', or 'half4'
+error: 8: unknown identifier 'color'
error: 9: 'main' parameter must be 'vec4', 'float4', or 'half4'
-4 errors
+error: 9: unknown identifier 'color'
+6 errors
diff --git a/tests/sksl/runtime_errors/InvalidShaderMain.skvm b/tests/sksl/runtime_errors/InvalidShaderMain.skvm
index 70ed247..c79a619 100644
--- a/tests/sksl/runtime_errors/InvalidShaderMain.skvm
+++ b/tests/sksl/runtime_errors/InvalidShaderMain.skvm
@@ -2,6 +2,9 @@
error: 6: 'main' parameters must be (float2, (vec4|float4|half4)?)
error: 7: 'main' parameters must be (float2, (vec4|float4|half4)?)
+error: 7: unknown identifier 'color'
error: 8: 'main' parameters must be (float2, (vec4|float4|half4)?)
+error: 8: unknown identifier 'color'
error: 9: 'main' parameters must be (float2, (vec4|float4|half4)?)
-4 errors
+error: 9: unknown identifier 'color'
+7 errors
diff --git a/tests/sksl/runtime_errors/LoopConditionErrors.skvm b/tests/sksl/runtime_errors/LoopConditionErrors.skvm
index bf5e9b4..d51fa2b 100644
--- a/tests/sksl/runtime_errors/LoopConditionErrors.skvm
+++ b/tests/sksl/runtime_errors/LoopConditionErrors.skvm
@@ -1,12 +1,12 @@
### Compilation failed:
-error: 3: missing condition
-error: 5: invalid condition
-error: 6: invalid condition
-error: 7: expected loop index on left hand side of condition
-error: 9: expected loop index on left hand side of condition
-error: 10: expected loop index on left hand side of condition
-error: 11: expected loop index on left hand side of condition
-error: 15: loop index must be compared with a constant expression
-error: 16: loop index must be compared with a constant expression
+error: 1099: missing condition
+error: 1099: invalid condition
+error: 1099: invalid condition
+error: 1099: expected loop index on left hand side of condition
+error: 1099: expected loop index on left hand side of condition
+error: 1099: expected loop index on left hand side of condition
+error: 1099: expected loop index on left hand side of condition
+error: 1099: loop index must be compared with a constant expression
+error: 1099: loop index must be compared with a constant expression
9 errors
diff --git a/tests/sksl/runtime_errors/LoopExpressionErrors.skvm b/tests/sksl/runtime_errors/LoopExpressionErrors.skvm
index d0e92e1..6390fa2 100644
--- a/tests/sksl/runtime_errors/LoopExpressionErrors.skvm
+++ b/tests/sksl/runtime_errors/LoopExpressionErrors.skvm
@@ -1,10 +1,10 @@
### Compilation failed:
-error: 3: missing loop expression
-error: 5: invalid operator in loop expression
-error: 6: loop index must be modified by a constant expression
-error: 7: invalid operator in loop expression
-error: 8: invalid operator in loop expression
-error: 12: loop index must be modified by a constant expression
-error: 13: loop index must be modified by a constant expression
+error: 1099: missing loop expression
+error: 1099: invalid operator in loop expression
+error: 1099: loop index must be modified by a constant expression
+error: 1099: invalid operator in loop expression
+error: 1099: invalid operator in loop expression
+error: 1099: loop index must be modified by a constant expression
+error: 1099: loop index must be modified by a constant expression
7 errors
diff --git a/tests/sksl/runtime_errors/LoopInitializerErrors.skvm b/tests/sksl/runtime_errors/LoopInitializerErrors.skvm
index 7916743..6e8867b 100644
--- a/tests/sksl/runtime_errors/LoopInitializerErrors.skvm
+++ b/tests/sksl/runtime_errors/LoopInitializerErrors.skvm
@@ -1,11 +1,13 @@
### Compilation failed:
-error: 3: missing init declaration
-error: 4: invalid init declaration
-error: 5: missing loop index initializer
-error: 7: invalid type for loop index
-error: 8: invalid type for loop index
+error: 1099: missing init declaration
+error: 1099: invalid init declaration
+error: 1099: missing loop index initializer
+error: 1099: invalid type for loop index
+error: 1099: invalid type for loop index
error: 9: construction of array type 'int[2]' is not supported
-error: 13: loop index initializer must be a constant expression
-error: 14: loop index initializer must be a constant expression
-8 errors
+error: 9: unknown identifier 'i'
+error: 9: unknown identifier 'i'
+error: 1099: loop index initializer must be a constant expression
+error: 1099: loop index initializer must be a constant expression
+10 errors
diff --git a/tests/sksl/runtime_errors/LoopStructureErrors.skvm b/tests/sksl/runtime_errors/LoopStructureErrors.skvm
index 1c169dc..94aa5f9 100644
--- a/tests/sksl/runtime_errors/LoopStructureErrors.skvm
+++ b/tests/sksl/runtime_errors/LoopStructureErrors.skvm
@@ -1,8 +1,8 @@
### Compilation failed:
-error: 4: loop must guarantee termination in fewer iterations
-error: 5: invalid loop expression
-error: 10: loop index must not be modified within body of the loop
-error: 11: loop index must not be modified within body of the loop
-error: 12: loop index must not be modified within body of the loop
+error: 1099: loop must guarantee termination in fewer iterations
+error: 1099: invalid loop expression
+error: 1099: loop index must not be modified within body of the loop
+error: 1099: loop index must not be modified within body of the loop
+error: 1099: loop index must not be modified within body of the loop
5 errors
diff --git a/tests/sksl/runtime_errors/ProgramTooLarge_StackDepth.skvm b/tests/sksl/runtime_errors/ProgramTooLarge_StackDepth.skvm
index 5ce57c6..f7c6930 100644
--- a/tests/sksl/runtime_errors/ProgramTooLarge_StackDepth.skvm
+++ b/tests/sksl/runtime_errors/ProgramTooLarge_StackDepth.skvm
@@ -1,6 +1,6 @@
### Compilation failed:
-error: 11: exceeded max function call depth:
+error: exceeded max function call depth:
half4 main(float2 xy)
void f1()
void f2()
diff --git a/tests/sksl/runtime_errors/UnsupportedTypeFragmentProcessor.skvm b/tests/sksl/runtime_errors/UnsupportedTypeFragmentProcessor.skvm
index 5aaadb6..54bf305 100644
--- a/tests/sksl/runtime_errors/UnsupportedTypeFragmentProcessor.skvm
+++ b/tests/sksl/runtime_errors/UnsupportedTypeFragmentProcessor.skvm
@@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'fragmentProcessor'
-1 error
+error: 1: no type named 's'
+error: 1: expected a declaration, but found ';'
+3 errors
diff --git a/tests/sksl/runtime_errors/UnsupportedTypeSampler.skvm b/tests/sksl/runtime_errors/UnsupportedTypeSampler.skvm
index 6f6f9f7..b44c950 100644
--- a/tests/sksl/runtime_errors/UnsupportedTypeSampler.skvm
+++ b/tests/sksl/runtime_errors/UnsupportedTypeSampler.skvm
@@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'sampler2D'
-1 error
+error: 1: no type named 's'
+error: 1: expected a declaration, but found ';'
+3 errors
diff --git a/tests/sksl/runtime_errors/UnsupportedTypeTexture.skvm b/tests/sksl/runtime_errors/UnsupportedTypeTexture.skvm
index b66f942..108bab9 100644
--- a/tests/sksl/runtime_errors/UnsupportedTypeTexture.skvm
+++ b/tests/sksl/runtime_errors/UnsupportedTypeTexture.skvm
@@ -1,4 +1,6 @@
### Compilation failed:
error: 1: no type named 'texture2D'
-1 error
+error: 1: no type named 's'
+error: 1: expected a declaration, but found ';'
+3 errors
diff --git a/tests/sksl/shared/ReturnBadTypeFromMain.metal b/tests/sksl/shared/ReturnBadTypeFromMain.metal
index c71f892..0890915 100644
--- a/tests/sksl/shared/ReturnBadTypeFromMain.metal
+++ b/tests/sksl/shared/ReturnBadTypeFromMain.metal
@@ -1,4 +1,4 @@
### Compilation failed:
-error: 2: Metal does not support returning 'int3' from main()
+error: Metal does not support returning 'int3' from main()
1 error