we just updated to Skia M91( I know it's a little older version, we started long back and then had to pause due to some other work). We are noticing some issues with gradients in M91. Some gradients are not rendering at all. On digging deep I found out one shader is failing with the below error.
"error: 9: function 'UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1' can exit without returning a value\n1 error\n"
Have you guys seen anthing similar?? if not can you please point me the code where I should start digging?
Below is the complete generated shader code.
uniform float3x3 umatrix_Stage1_c0_c0_c0;uniform float4 uscale0_1_Stage1_c0_c0_c1;uniform float4 uscale2_3_Stage1_c0_c0_c1;uniform float4 uscale4_5_Stage1_c0_c0_c1;uniform float4 ubias0_1_Stage1_c0_c0_c1;uniform float4 ubias2_3_Stage1_c0_c0_c1;uniform float4 ubias4_5_Stage1_c0_c0_c1;uniform half4 uthresholds1_7_Stage1_c0_c0_c1;uniform half4 uthresholds9_13_Stage1_c0_c0_c1;in half4 vcolor_Stage0;in float vcoverage_Stage0;in float2 vTransformedCoords_0_Stage0;half4 LinearGradientLayout_Stage1_c0_c0_c0_c0(half4 _input) {
return half4(half(vTransformedCoords_0_Stage0.x) + 9.9999997473787516e-06, 1.0, 0.0, 0.0);
}
half4 MatrixEffect_Stage1_c0_c0_c0(half4 _input) {
return LinearGradientLayout_Stage1_c0_c0_c0_c0(_input);
}
half4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1(half4 _input, float2 _coords) {
}
half4 TiledGradientEffect_Stage1_c0_c0(half4 _input) {
half4 t = MatrixEffect_Stage1_c0_c0_c0(_input);
if (!true && t.y < 0.0) {
return half4(0.0);
} else {
@if (true) {
half t_1 = t.x - 1.0;
half tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
if (sk_Caps.mustDoOpBetweenFloorAndAbs) {
tiled_t = clamp(tiled_t, -1.0, 1.0);
}
t.x = abs(tiled_t);
} else {
t.x = fract(t.x);
}
@if (!false) {
return UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1(_input, float2(half2(t.x, 0.0)));
} else {
half4 outColor = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1(_input, float2(half2(t.x, 0.0)));
return outColor * half4(outColor.www, 1.0);
}
}
}
half4 OverrideInputFragmentProcessor_Stage1_c0(half4 _input) {
return TiledGradientEffect_Stage1_c0_c0(false ? half4(0) : half4(1.000000, 1.000000, 1.000000, 1.000000));
}
void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
half4 outputColor_Stage0;outputColor_Stage0 = vcolor_Stage0;float coverage = vcoverage_Stage0;half4 outputCoverage_Stage0 = half4(half(coverage));half4 output_Stage1;output_Stage1 = OverrideInputFragmentProcessor_Stage1_c0(outputColor_Stage0);{ // Xfer Processor: Porter Duff
sk_FragColor = output_Stage1 * outputCoverage_Stage0;}}