/third_party/skia/resources/sksl/folding/ |
D | VectorVectorFolding.sksl | 2 uniform half4 colorRed, colorGreen; 8 ok = ok && (half4(half2(1), half2(2, 3)) + half4(5, 6, 7, 8)) == half4(6, 7, 9, 11); 9 ok = ok && (half4(8, half3(10)) - half4(1)) == half4(7, 9, 9, 9); 10 ok = ok && (half4(2) * half4(1, 2, 3, 4)) == half4(2, 4, 6, 8); 11 ok = ok && (half4(12) / half4(1, 2, 3, 4)) == half4(12, 6, 4, 3); 12 ok = ok && !(half4(1) == half4(2)); 16 ok = ok && (half4(1) == half4(half2(1), half2(1))); 17 ok = ok && (half4(half3(1), 1) == half4(half2(1), half2(1))); 18 ok = ok && !(half4(half3(1), 1) == half4(half2(1), 1, 0)); 20 ok = ok && !(half4(1) != half4(half2(1), half2(1))); [all …]
|
D | VectorScalarFolding.sksl | 1 uniform half4 colorRed, colorGreen; 8 half4 x = half4(half2(1), half2(2, 3)) + 5; 9 ok = ok && (x == half4(6, 6, 7, 8)); 10 x = half4(8, half3(10)) - 1; 11 ok = ok && (x == half4(7, 9, 9, 9)); 12 x = half4(half2(8), half2(9)) + 1; 13 ok = ok && (x == half4(9, 9, 10, 10)); 15 ok = ok && (x == half4(6, 6, 6, 10)); 17 ok = ok && (x == half4(3, 3, 6, 10)); 20 x = (half4(12) / 2).yxwz; [all …]
|
/third_party/skia/tests/sksl/shared/ |
D | SwizzleConstants.metal | 5 half4 testInputs; 6 half4 colorGreen; 7 half4 colorRed; 12 half4 sk_FragColor [[color(0)]]; 17 half4 v = _uniforms.testInputs; 18 v = half4(v.x, 1.0h, 1.0h, 1.0h); 19 v = half4(v.xy, 1.0h, 1.0h); 20 v = half4(v.x, 1.0h, 1.0h, 1.0h); 21 v = half4(0.0h, v.y, 1.0h, 1.0h); 22 v = half4(v.xyz, 1.0h); [all …]
|
D | DeadStripFunctions.metal | 5 half4 colorGreen; 6 half4 colorRed; 11 half4 sk_FragColor [[color(0)]]; 13 half4 unpremul_h4h4(half4 color) { 14 return half4(color.xyz / max(color.w, 9.9999997473787516e-05h), color.w); 16 half4 live_fn_h4h4h4(half4 a, half4 b) { 22 half4 a; 23 half4 b; 25 a = live_fn_h4h4h4(half4(3.0h), half4(-5.0h)); 28 b = unpremul_h4h4(half4(1.0h)); [all …]
|
D | SwizzleOpt.metal | 5 half4 colorRed; 6 half4 colorGreen; 7 half4 testInputs; 12 half4 sk_FragColor [[color(0)]]; 14 half fn_hh4(half4 v) { 22 half4 v = _uniforms.testInputs; 23 v = half4(0.0h, v.zyx); 24 v = half4(0.0h, 0.0h, v.xw); 25 v = half4(1.0h, 1.0h, v.wx); 26 v = half4(v.zy, 1.0h, 1.0h); [all …]
|
D | SwizzleByConstantIndex.metal | 5 half4 testInputs; 6 half4 colorGreen; 7 half4 colorRed; 12 half4 sk_FragColor [[color(0)]]; 17 half4 _0_v = _uniforms.testInputs; 22 half4 a = half4(_1_x, _2_y, _3_z, _4_w); 27 half4 b = half4(_9_x, _10_y, _11_z, _12_w); 28 half4 _13_v = half4(0.0h, 1.0h, 2.0h, 3.0h); 33 half4 c = half4(_14_x, _15_y, _16_z, _17_w); 34 ….sk_FragColor = (all(a == half4(-1.25h, 0.0h, 0.75h, 2.25h)) && all(b == half4(-1.25h, 0.0h, 0.75h…
|
D | CommaSideEffects.metal | 5 half4 colorRed; 6 half4 colorGreen; 7 half4 colorWhite; 8 half4 colorBlack; 13 half4 sk_FragColor [[color(0)]]; 15 void setToColorBlack_vh4(Uniforms _uniforms, thread half4& x); 16 void _skOutParamHelper0_setToColorBlack_vh4(Uniforms _uniforms, thread half4& d) { 17 half4 _var0; 21 void setToColorBlack_vh4(Uniforms _uniforms, thread half4& x) { 27 half4 a; [all …]
|
D | VectorScalarMath.metal | 5 half4 colorRed; 6 half4 colorGreen; 12 half4 sk_FragColor [[color(0)]]; 58 half4 _1_inputRed = _uniforms.colorRed; 59 half4 _2_inputGreen = _uniforms.colorGreen; 60 half4 _3_x = _1_inputRed + 2.0h; 61 _0_ok = _0_ok && all(_3_x == half4(3.0h, 2.0h, 2.0h, 3.0h)); 63 _0_ok = _0_ok && all(_3_x == half4(-1.0h, -1.0h, -2.0h, -2.0h)); 65 _0_ok = _0_ok && all(_3_x == half4(2.0h, 1.0h, 1.0h, 2.0h)); 67 _0_ok = _0_ok && all(_3_x == half4(9.0h, 9.0h, 9.0h, 2.0h)); [all …]
|
/third_party/skia/src/sksl/ |
D | sksl_gpu.sksl | 159 half2x4 outerProduct(half4 c, half2 r); 160 half4x2 outerProduct(half2 c, half4 r); 161 half3x4 outerProduct(half4 c, half3 r); 162 half4x3 outerProduct(half3 c, half4 r); 233 half4 sample(sampler1D s, float P); 234 half4 sample(sampler1D s, float P, float bias); 235 half4 sample(sampler2D s, float2 P); 237 half4 sample(samplerExternalOES s, float2 P, float bias); 238 half4 sample(samplerExternalOES s, float2 P); 240 half4 sample(sampler2DRect s, float2 P); [all …]
|
/third_party/skia/resources/sksl/shared/ |
D | DeadStripFunctions.sksl | 3 uniform half4 colorGreen, colorRed; 5 half4 dead_fn(half4 a, half4 b) { 9 half4 live_fn(half4 a, half4 b) { 13 half4 main(float2 coords) { 15 half4 a, b; 19 half4 unused = dead_fn(half4(0.5), half4(2)); 22 a = live_fn(half4(3), half4(-5)); 27 b = unpremul(half4(1)); 33 return (a != half4(0) && b != half4(0)) ? colorGreen : colorRed;
|
D | SwizzleByConstantIndex.sksl | 1 uniform half4 testInputs, colorGreen, colorRed; 3 half4 constant_swizzle() { 4 half4 v = testInputs; 9 return half4(x, y, z, w); // -1.25, 0, 0.75, 2.25 12 half4 foldable_index() { 18 return half4(x, y, z, w); // -1.25, 0, 0.75, 2.25 21 half4 foldable() { 22 half4 v = half4(0, 1, 2, 3); 27 return half4(x, y, z, w); // 0, 1, 2, 3 30 half4 main(float2 coords) { [all …]
|
D | Negation.sksl | 1 uniform half4 colorGreen, colorRed; 6 const half4 one_splat = half4(1); 7 const half4 one_compound = half4(1, 1, 1, 1); 10 ok = ok && (half4(-1) == -one_splat); 11 ok = ok && (half4(-1, -1, -1, -1) == -one_splat); 12 ok = ok && (half4(-1) == -one_compound); 13 ok = ok && (half4(-1, -1, -1, -1) == -one_compound); 14 ok = ok && (-half4(1) == -one_splat); 15 ok = ok && (-half4(1, 1, 1, 1) == -one_splat); 16 ok = ok && (-half4(1) == -one_compound); [all …]
|
D | FunctionPrototype.sksl | 1 uniform half4 colorGreen; 4 half4 this_function_is_defined_before_use(half4 x); 5 half4 this_function_is_defined_after_use(half4 x); 6 half4 this_function_is_defined_near_the_end(half4 x); 8 half4 this_function_is_defined_before_use(half4 x) { 14 half4 main(float2 coords) { 18 half4 this_function_is_defined_after_use(half4 x) { 22 half4 this_function_is_defined_near_the_end(half4 x) {
|
D | SwizzleConstants.sksl | 1 uniform half4 testInputs, colorGreen, colorRed; 3 half4 main(float2 coords) { 4 half4 v = testInputs; 5 v = half4(v.x, 1, 1, 1); 6 v = half4(v.xy, 1, 1); 7 v = half4(v.x1, 1, 1); 8 v = half4(v.0y, 1, 1); 9 v = half4(v.xyz, 1); 10 v = half4(v.xy1, 1); 11 v = half4(v.x0z, 1); [all …]
|
D | VectorScalarMath.sksl | 1 uniform half4 colorRed, colorGreen; 6 half4 inputRed = colorRed; 7 half4 inputGreen = colorGreen; 10 half4 x = inputRed + 2; 11 ok = ok && (x == half4(3, 2, 2, 3)); 13 ok = ok && (x == half4(-1, -1, -2, -2)); 15 ok = ok && (x == half4(2, 1, 1, 2)); 17 ok = ok && (x == half4(9, 9, 9, 2)); 19 ok = ok && (x == half4(18, 4, 9, 2)); 23 ok = ok && (x == half4(0, 5, 5, 0)); [all …]
|
/third_party/skia/resources/sksl/runtime_errors/ |
D | InvalidBlendMain.rtb | 6 half4 main() { return half4(1); } 7 half4 main(half4 src) { return src; } 8 half4 main(half2 coords, half4 src) { return src; } 9 half4 main(half2 coords, half4 src, half4 dst) { return src * dst; } 10 half4 main(half4 src, half4 dst, half4 bonusColor) { return src * dst; } 12 half4 main(half4 src, half4 dst) { return src * dst; } // the correct signature is allowed
|
D | IllegalShaderSampling.rts | 8 uniform half4 color; 10 half4 eval_shader_xy_color() { return s.eval(xy, color); } 11 half4 eval_shader_color() { return s.eval(color); } 12 half4 eval_shader_color_xy() { return s.eval(color, xy); } 13 half4 eval_shader_empty() { return s.eval(); } 14 half4 eval_shader_matrix() { return s.eval(float3x3(1)); } 16 half4 eval_colorFilter_empty() { return f.eval(); } 17 half4 eval_colorFilter_xy() { return f.eval(xy); } 18 half4 eval_colorFilter_xy_color() { return f.eval(xy, color); } 20 half4 eval_blender_empty() { return b.eval(); } [all …]
|
D | InvalidShaderMain.rts | 6 half4 main() { return half4(1); } 7 half4 main(half4 color) { return color; } 8 half4 main(float2 xy, half4 color, half4 bonusColor) { return color; } 9 half4 main(half4 outOfOrderColor, float2 outOfOrderXy) { return color; } 11 half4 main(float2 xy, half4 color) { return color; } // the correct signature is allowed
|
/third_party/skia/resources/sksl/intrinsics/ |
D | MixFloat.sksl | 1 uniform half4 colorGreen, colorRed, colorBlack, colorWhite, testInputs; 3 half4 main(float2 coords) { 4 const half4 constBlack = half4(0, 0, 0, 1); 5 const half4 constWhite = half4(1); 6 const half4 constVal = half4(-1.25, 0, 0.75, 2.25); 7 half4 expectedBW = half4(0.5, 0.5, 0.5, 1); 8 half4 expectedWT = half4(1, 0.5, 1, 2.25); 10 return (mix(colorGreen, colorRed, 0) == half4(0, 1, 0, 1) && 11 mix(colorGreen, colorRed, 0.25) == half4(0.25, 0.75, 0, 1) && 12 mix(colorGreen, colorRed, 0.75) == half4(0.75, 0.25, 0, 1) && [all …]
|
D | FaceForward.sksl | 1 uniform half4 N, I, NRef; 2 uniform half4 colorGreen, colorRed; 4 half4 main(float2 xy) { 6 const half4 constN = half4(1, 2, 3, 4); 7 const half4 constI = half4(1, 1, -100, 1); 8 const half4 constNRef = half4(1); 10 half4 expectedPos = half4(1, 2, 3, 4); 11 half4 expectedNeg = -half4(1, 2, 3, 4);
|
D | ClampFloat.sksl | 1 uniform half4 testInputs; 2 uniform half4 colorGreen, colorRed; 4 half4 main(float2 coords) { 5 half4 expectedA = half4(-1, 0, 0.75, 1); 7 const half4 clampLow = half4(-1, -2, -2, 1); 8 const half4 constVal = half4(-1.25, 0, 0.75, 2.25); 9 half4 expectedB = half4(-1, 0, 0.5, 2.25); 10 const half4 clampHigh = half4( 1, 2, 0.5, 3);
|
/third_party/skia/tests/sksl/intrinsics/ |
D | MixFloat.metal | 5 half4 colorGreen; 6 half4 colorRed; 7 half4 colorBlack; 8 half4 colorWhite; 9 half4 testInputs; 14 half4 sk_FragColor [[color(0)]]; 19 half4 expectedBW = half4(0.5h, 0.5h, 0.5h, 1.0h); 20 half4 expectedWT = half4(1.0h, 0.5h, 1.0h, 2.25h); 21 …half4(0.0h, 1.0h, 0.0h, 1.0h)) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.25h) == half…
|
/third_party/skia/resources/sksl/inliner/ |
D | InlineWithInoutArgument.sksl | 1 uniform half4 colorGreen; 3 inline void outParameterWrite(out half4 x) { 7 inline void outParameterWriteIndirect(out half4 c) { 11 inline void inoutParameterWrite(inout half4 x) { 15 inline void inoutParameterWriteIndirect(inout half4 x) { 19 inline void inoutParameterRead(inout half4 x) { 20 half4 scratch = x * x; 23 inline void inoutParameterIgnore(inout half4 x) { 24 half4 scratch = colorGreen * colorGreen; 27 inline void outParameterIgnore(out half4 x) { [all …]
|
D | TrivialArgumentsInlineDirectly.sksl | 1 uniform half4 colorGreen; 5 half4 ah4[1]; 7 half4 h4; 13 half4 funcb(bool b) { 14 return half4(b, b, b, !b); 17 half4 func1(half h) { 21 half4 func2(half2 h2) { 25 half4 func3(half3 h3) { 29 half4 func4(half4 h4) { 33 half4 main(float2 coords) { [all …]
|
/third_party/skia/tests/sksl/errors/ |
D | BinaryTypeCoercion.glsl | 6 error: 18: type mismatch: '=' cannot operate on 'half4', 'float4' 7 error: 19: type mismatch: '=' cannot operate on 'half4', 'float4' 8 error: 20: type mismatch: '*=' cannot operate on 'half4', 'float4' 9 error: 24: type mismatch: '=' cannot operate on 'half4', 'float4' 10 error: 25: type mismatch: '=' cannot operate on 'half4', 'float4' 11 error: 30: type mismatch: '=' cannot operate on 'half4', 'float4' 12 error: 31: type mismatch: '=' cannot operate on 'half4', 'float4' 13 error: 32: type mismatch: '*=' cannot operate on 'half4', 'float' 14 error: 36: type mismatch: '=' cannot operate on 'half4', 'float4' 15 error: 37: type mismatch: '=' cannot operate on 'half4', 'float4' [all …]
|