Slion / Fulguris

⚡Web Browser
http://fulguris.slions.net
Other
489 stars 48 forks source link

Hardware acceleration broken #616

Open Slion opened 6 months ago

Slion commented 6 months ago

On Windows 11 hardware acceleration stopped working for some reason. The first tab you load after starting the app works and renders properly but as soon you switch tabs it fails and web pages are empty.

Shader linkage fails but I think it basically fails to init EGL earlier. It's really odd cause I think that worked just fine at some point. If you disable hardware acceleration it works just fine. Definitly an issue with ANGLE failing to init EGL it seems. I could not track the issue to recent code changes though it started failing after recompile or app update. Both debug and release builds are affected. Also WebGL is not working and it used to work before that bug hit. Running on NVIDIA GeForce RTX 3070.

Might have been a regression introduced between 1.9.21 and 1.9.25.

It is not. Though at some point I had v1.9.21 and v1.9.25 running side by side the former working fine and the later broken. However after recompiling v1.9.21 it is broken too. That means the issue could have been introduced by the Android Studio tool chain somehow.

To workaround that issue search the code for LAYER_TYPE_HARDWARE and replace it with LAYER_TYPE_SOFTWARE.

Our WebViewDemo is still working so somehow we must have broken that with changes to Fulguris.

2024-03-24 22:27:00.574  4180-4277  chromium                net....fulguris.full.download.debug  W  [WARNING:angle_platform_impl.cc(49)] ProgramGL.cpp:959 (checkLinkStatus): Program link or binary loading failed with no info log.
2024-03-24 22:27:00.574  4180-4277  chromium                net....fulguris.full.download.debug  E  [ERROR:shared_context_state.cc(98)] Skia shader compilation error
                                                                                                    ------------------------
                                                                                                    // Vertex SKSL
                                                                                                    uniform float4 sk_RTAdjust;in float2 position;in float2 localCoord;out float2 vlocalCoord_S0;void main() {// Primitive Processor QuadPerEdgeAAGeometryProcessor
                                                                                                    vlocalCoord_S0 = localCoord;sk_Position = position.xy01;}
                                                                                                    // Fragment SKSL
                                                                                                    sampler2D uTextureSampler_0_S0;
                                                                                                    in float2 vlocalCoord_S0;void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
                                                                                                    half4 outputColor_S0 = half4(1);float2 texCoord;texCoord = vlocalCoord_S0;outputColor_S0 = (blend_modulate(sample(uTextureSampler_0_S0, texCoord), half4(1)));const half4 outputCoverage_S0 = half4(1);{ // Xfer Processor: Porter Duff
                                                                                                    sk_FragColor = outputColor_S0 * outputCoverage_S0;}}
                                                                                                    // Vertex GLSL
                                                                                                    #version 300 es

                                                                                                    precision mediump float;
                                                                                                    precision mediump sampler2D;
                                                                                                    uniform highp vec4 sk_RTAdjust;
                                                                                                    in highp vec2 position;
                                                                                                    in highp vec2 localCoord;
                                                                                                    out highp vec2 vlocalCoord_S0;
                                                                                                    void main() {
                                                                                                        vlocalCoord_S0 = localCoord;
                                                                                                        gl_Position = vec4(position, 0.0, 1.0);
                                                                                                        gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
                                                                                                    }

                                                                                                    // Fragment GLSL
                                                                                                    #version 300 es

                                                                                                    precision mediump float;
                                                                                                    precision mediump sampler2D;
                                                                                                    out mediump vec4 sk_FragColor;
                                                                                                    uniform sampler2D uTextureSampler_0_S0;
                                                                                                    in highp vec2 vlocalCoord_S0;
                                                                                                    void main() {
                                                                                                        mediump vec4 outputColor_S0 = vec4(1.0);
                                                                                                        highp vec2 texCoord = vlocalCoord_S0;
                                                                                                        outputColor_S0 = texture(uTextureSampler_0_S0, texCoord, -0.5);
                                                                                                        {
                                                                                                            sk_FragColor = outputColor_S0;
                                                                                                        }
                                                                                                    }

                                                                                                    Errors:
                                                                                                    link failed but did not provide an info log