aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/sksl.include
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-08-01 13:41:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-01 18:59:15 +0000
commit93061b53442ce303e9d3ef74c7eeddc034802c4f (patch)
tree28def473e41068ccd2f62614371c52ee1f14cdd9 /src/sksl/sksl.include
parent4bd3b0905477ea1f005526818305c9a10ef2f6f8 (diff)
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>
Diffstat (limited to 'src/sksl/sksl.include')
-rw-r--r--src/sksl/sksl.include50
1 files changed, 42 insertions, 8 deletions
diff --git a/src/sksl/sksl.include b/src/sksl/sksl.include
index 5d905e3435..7b738d5845 100644
--- a/src/sksl/sksl.include
+++ b/src/sksl/sksl.include
@@ -99,6 +99,8 @@ $genIType floatBitsToInt($genType value);
$genType intBitsToFloat($genIType value);
$genType uintBitsToFloat($genUType value);
$genType fma($genType a, $genType b, $genType c);
+$genHType fma($genHType a, $genHType b, $genHType c);
+$genDType fma($genDType a, $genDType b, $genDType c);
//$genDType fma($genDType a, $genDType b, $genDType c);
$genType frexp($genType x, out $genIType exp);
//$genDType frexp($genDType x, out $genIType exp);
@@ -117,22 +119,30 @@ uint2 unpackDouble2x32(double v);
uint packHalf2x16(float2 v);
float2 unpackHalf2x16(uint v);
float length($genType x);
-//double length($genDType x);
+half length($genHType x);
+double length($genDType x);
float distance($genType p0, $genType p1);
-//double distance($genDType p0, $genDType p1);
+half distance($genHType p0, $genHType p1);
+double distance($genDType p0, $genDType p1);
float dot($genType x, $genType y);
-//double dot($genDType x, $genDType y);
+half dot($genHType x, $genHType y);
+double dot($genDType x, $genDType y);
float3 cross(float3 x, float3 y);
-//double3 cross(double3 x, double3 y);
+half3 cross(half3 x, half3 y);
+double3 cross(double3 x, double3 y);
$genType normalize($genType x);
-//$genDType normalize($genDType x);
+$genHType normalize($genHType x);
+$genDType normalize($genDType x);
float4 ftransform();
$genType faceforward($genType N, $genType I, $genType Nref);
-//$genDType faceforward($genDType N, $genDType I, $genDType Nref);
+$genHType faceforward($genHType N, $genHType I, $genHType Nref);
+$genDType faceforward($genDType N, $genDType I, $genDType Nref);
$genType reflect($genType I, $genType N);
-//$genDType reflect($genDType I, $genDType N);
+$genHType reflect($genHType I, $genHType N);
+$genDType reflect($genDType I, $genDType N);
$genType refract($genType I, $genType N, float eta);
-//$genDType refract($genDType I, $genDType N, float eta);
+$genHType refract($genHType I, $genHType N, float eta);
+$genDType refract($genDType I, $genDType N, float eta);
$mat matrixCompMult($mat x, $mat y);
float2x2 outerProduct(float2 c, float2 r);
float3x3 outerProduct(float3 c, float3 r);
@@ -159,24 +169,48 @@ float2x2 inverse(float2x2 m);
float3x3 inverse(float3x3 m);
float4x4 inverse(float4x4 m);
$bvec lessThan($vec x, $vec y);
+$bvec lessThan($hvec x, $hvec y);
+$bvec lessThan($dvec x, $dvec y);
$bvec lessThan($ivec x, $ivec y);
+$bvec lessThan($svec x, $svec y);
+$bvec lessThan($usvec x, $usvec y);
$bvec lessThan($uvec x, $uvec y);
$bvec lessThanEqual($vec x, $vec y);
+$bvec lessThanEqual($hvec x, $hvec y);
+$bvec lessThanEqual($dvec x, $dvec y);
$bvec lessThanEqual($ivec x, $ivec y);
$bvec lessThanEqual($uvec x, $uvec y);
+$bvec lessThanEqual($svec x, $svec y);
+$bvec lessThanEqual($usvec x, $usvec y);
$bvec greaterThan($vec x, $vec y);
+$bvec greaterThan($hvec x, $hvec y);
+$bvec greaterThan($dvec x, $dvec y);
$bvec greaterThan($ivec x, $ivec y);
$bvec greaterThan($uvec x, $uvec y);
+$bvec greaterThan($svec x, $svec y);
+$bvec greaterThan($usvec x, $usvec y);
$bvec greaterThanEqual($vec x, $vec y);
+$bvec greaterThanEqual($hvec x, $hvec y);
+$bvec greaterThanEqual($dvec x, $dvec y);
$bvec greaterThanEqual($ivec x, $ivec y);
$bvec greaterThanEqual($uvec x, $uvec y);
+$bvec greaterThanEqual($svec x, $svec y);
+$bvec greaterThanEqual($usvec x, $usvec y);
$bvec equal($vec x, $vec y);
+$bvec equal($hvec x, $hvec y);
+$bvec equal($dvec x, $dvec y);
$bvec equal($ivec x, $ivec y);
$bvec equal($uvec x, $uvec y);
+$bvec equal($svec x, $svec y);
+$bvec equal($usvec x, $usvec y);
$bvec equal($bvec x, $bvec y);
$bvec notEqual($vec x, $vec y);
+$bvec notEqual($hvec x, $hvec y);
+$bvec notEqual($dvec x, $dvec y);
$bvec notEqual($ivec x, $ivec y);
$bvec notEqual($uvec x, $uvec y);
+$bvec notEqual($svec x, $svec y);
+$bvec notEqual($usvec x, $usvec y);
$bvec notEqual($bvec x, $bvec y);
bool any($bvec x);
bool all($bvec x);