diff options
author | 2017-08-01 19:29:48 +0000 | |
---|---|---|
committer | 2017-08-01 19:30:04 +0000 | |
commit | 0e9605542444a7653359f4fc610f7620df9f6313 (patch) | |
tree | c9edebc09b883c9500b0da4565fab0e2d08570af /src/gpu/effects | |
parent | d310879427018ee3727d61c3a0780f0a17c93935 (diff) |
Revert "support for 'half' types in sksl, plus general numeric type improvements"
This reverts commit 93061b53442ce303e9d3ef74c7eeddc034802c4f.
Reason for revert: bot failures
Original change's description:
> support for 'half' types in sksl, plus general numeric type improvements
>
> Bug: skia:
> Change-Id: Id285262fda8291847f11343d499b5df62ddb4b09
> Reviewed-on: https://skia-review.googlesource.com/28980
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=bsalomon@google.com,ethannicholas@google.com
Change-Id: Ie8672271d35b9fcdf567f8bc3674084748be66ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/29600
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrDitherEffect.cpp | 12 | ||||
-rw-r--r-- | src/gpu/effects/GrDitherEffect.fp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index 17b94ff087..3b70493338 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -28,12 +28,12 @@ public: "0.0039215686274509803;\n break;\n case 1:\n range = " "0.015873015873015872;\n break;\n default:\n range = " "0.0083333333333333332;\n break;\n}\n@if (sk_Caps.integerSupport) {\n " - "uint x = uint(sk_FragCoord.x);\n uint y = uint(sk_FragCoord.y);\n uint m = " - "(((((y & 1) << 5 | (x & 1) << 4) | (y & 2) << 2) | (x & 2) << 1) | (y & 4) >> 1) " - "| (x & 4) >> 2;\n value = float(m) / 64.0 - 0.4921875;\n} else {\n value = " - "fract(sin(dot(sk_FragCoord.xy, float2(12.989800000000001, 78.233000000000004))) * " - "43758.545299999998) - 0.5;\n}\n%s = float4(clamp(%s.xyz + value * range, 0.0, " - "%s.w), %s.w);\n", + "int x = int(sk_FragCoord.x);\n int y = int(sk_FragCoord.y);\n uint m = " + "uint((((((y & 1) << 5 | (x & 1) << 4) | (y & 2) << 2) | (x & 2) << 1) | (y & 4) " + ">> 1) | (x & 4) >> 2);\n value = float(m) / 64.0 - 0.4921875;\n} else {\n " + "value = fract(sin(dot(sk_FragCoord.xy, float2(12.989800000000001, " + "78.233000000000004))) * 43758.545299999998) - 0.5;\n}\n%s = float4(clamp(%s.xyz + " + "value * range, 0.0, %s.w), %s.w);\n", _outer.rangeType(), args.fOutputColor, args.fInputColor ? args.fInputColor : "float4(1)", args.fInputColor ? args.fInputColor : "float4(1)", diff --git a/src/gpu/effects/GrDitherEffect.fp b/src/gpu/effects/GrDitherEffect.fp index 308e02ed43..f983702f2b 100644 --- a/src/gpu/effects/GrDitherEffect.fp +++ b/src/gpu/effects/GrDitherEffect.fp @@ -48,8 +48,8 @@ void main() { } @if (sk_Caps.integerSupport) { // This ordered-dither code is lifted from the cpu backend. - uint x = uint(sk_FragCoord.x); - uint y = uint(sk_FragCoord.y); + int x = int(sk_FragCoord.x); + int y = int(sk_FragCoord.y); uint m = (y & 1) << 5 | (x & 1) << 4 | (y & 2) << 2 | (x & 2) << 1 | (y & 4) >> 1 | (x & 4) >> 2; |