Add tokens for highp/mediump/lowp.
At present, they aren't hooked up to anything. They will be made functional in followup CLs. Change-Id: I4bfc25eb4e19fce4c36ea0b55494bf37b2a9ee23 Bug: skia:12248 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430637 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
a7a9443104
commit
b6a7319f21
@ -343,6 +343,7 @@ sksl_shared_tests = [
|
||||
"/sksl/shared/OutParamsNoInline.sksl",
|
||||
"/sksl/shared/OutParamsTricky.sksl",
|
||||
"/sksl/shared/Overflow.sksl",
|
||||
"/sksl/shared/PrecisionQualifiers.sksl",
|
||||
"/sksl/shared/RectangleTexture.sksl",
|
||||
"/sksl/shared/ResizeMatrix.sksl",
|
||||
"/sksl/shared/ResizeMatrixNonsquare.sksl",
|
||||
|
9
resources/sksl/shared/PrecisionQualifiers.sksl
Normal file
9
resources/sksl/shared/PrecisionQualifiers.sksl
Normal file
@ -0,0 +1,9 @@
|
||||
uniform half4 colorGreen;
|
||||
|
||||
half4 main(float2 coords) {
|
||||
highp vec4 zero = 0;
|
||||
mediump vec4 green = colorGreen;
|
||||
lowp vec4 one = 1;
|
||||
|
||||
return green * one + zero;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,9 @@ struct Token {
|
||||
TK_HASSIDEEFFECTS,
|
||||
TK_STRUCT,
|
||||
TK_LAYOUT,
|
||||
TK_HIGHP,
|
||||
TK_MEDIUMP,
|
||||
TK_LOWP,
|
||||
TK_IDENTIFIER,
|
||||
TK_DIRECTIVE,
|
||||
TK_LPAREN,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1327,7 +1327,7 @@ static uint8_t SKSL_INCLUDE_sksl_public[] = {4,2,
|
||||
45,139,1,2,
|
||||
1,
|
||||
44,
|
||||
54,138,1,0,3,0,1,2,46,
|
||||
54,138,1,0,3,0,1,2,49,
|
||||
26,
|
||||
45,123,0,155,0,2,
|
||||
44,
|
||||
@ -1344,7 +1344,7 @@ static uint8_t SKSL_INCLUDE_sksl_public[] = {4,2,
|
||||
45,142,1,2,
|
||||
1,
|
||||
44,
|
||||
54,141,1,0,3,0,1,2,46,
|
||||
54,141,1,0,3,0,1,2,49,
|
||||
26,
|
||||
45,115,0,147,0,2,
|
||||
44,
|
||||
|
@ -39,6 +39,9 @@ NOINLINE = "noinline"
|
||||
HASSIDEEFFECTS = "sk_has_side_effects"
|
||||
STRUCT = "struct"
|
||||
LAYOUT = "layout"
|
||||
HIGHP = "highp"
|
||||
MEDIUMP = "mediump"
|
||||
LOWP = "lowp"
|
||||
IDENTIFIER = [a-zA-Z_$]([0-9]|[a-zA-Z_$])*
|
||||
DIRECTIVE = #[a-zA-Z_$]([0-9]|[a-zA-Z_$])*
|
||||
LPAREN = "("
|
||||
|
4
tests/sksl/shared/PrecisionQualifiers.asm.frag
Normal file
4
tests/sksl/shared/PrecisionQualifiers.asm.frag
Normal file
@ -0,0 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: expected expression, but found 'highp'
|
||||
1 error
|
4
tests/sksl/shared/PrecisionQualifiers.glsl
Normal file
4
tests/sksl/shared/PrecisionQualifiers.glsl
Normal file
@ -0,0 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: expected expression, but found 'highp'
|
||||
1 error
|
4
tests/sksl/shared/PrecisionQualifiers.metal
Normal file
4
tests/sksl/shared/PrecisionQualifiers.metal
Normal file
@ -0,0 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 4: expected expression, but found 'highp'
|
||||
1 error
|
Loading…
Reference in New Issue
Block a user