Skip to content

Shader compilation error #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gerkol opened this issue Mar 22, 2022 · 5 comments
Closed

Shader compilation error #238

gerkol opened this issue Mar 22, 2022 · 5 comments

Comments

@gerkol
Copy link

gerkol commented Mar 22, 2022

Hi, I'm trying to run my app using flutter pi on yocto linux (rbpi3). I created the build as follows using flutter 2.10.2

  1. flutter build bundle
~/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart \
            --verbose \
            --disable-analytics \
            --disable-dart-dev ~/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot \
            --sdk-root ~/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ \
            --target=flutter \
            --no-print-incremental-dependencies \
            -Ddart.vm.profile=false \
            -Ddart.vm.product=true \
            --aot --tfa \
            --packages .dart_tool/package_config.json \
            --output-dill .dart_tool/flutter_build/*/app.dill \
            --depfile .dart_tool/flutter_build/*/kernel_snapshot.d \
            file:./lib/main.dart
 ./gen_snapshot_linux_x64_release \
            --snapshot_kind=app-aot-elf \
            --elf=libapp.so \
            --strip \
            .dart_tool/flutter_build/*/app.dill

The app is executing using flutter-pi --release ./flutter-assets. However, I get the following error

Shader compilation error
------------------------
   1    uniform half3 u_0_edgeArray_S1[4];in half4 vcolor_S0;half4 ConvexPoly_S1(half4 _input) {
   2    half _1_alpha = 1.0;half _2_edge;(_2_edge = dot(u_0_edgeArray_S1[0], half3(float3(sk_FragCoord.xy, 1.0))));(_2_edge = half(((_2_edge >= 0.5) ? 1.0 : 0.0)));(_1_alpha *= _2_edge);(_2_edge = dot(u_0_edgeArray_S1[1], half3(float3(sk_FragCoord.xy, 1.0))));(_2_edge = half(((_2_edge >= 0.5) ? 1.0 : 0.0)));(_1_alpha *= _2_edge);(_2_edge = dot(u_0_edgeArray_S1[2], half3(float3(sk_FragCoord.xy, 1.0))));(_2_edge = half(((_2_edge >= 0.5) ? 1.0 : 0.0)));(_1_alpha *= _2_edge);(_2_edge = dot(u_0_edgeArray_S1[3], half3(float3(sk_FragCoord.xy, 1.0))));(_2_edge = half(((_2_edge >= 0.5) ? 1.0 : 0.0)));(_1_alpha *= _2_edge);return (_input * _1_alpha);}
   3    
   4    void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
   5    half4 outputColor_S0;outputColor_S0 = vcolor_S0;const half4 outputCoverage_S0 = half4(1);half4 output_S1;output_S1 = ConvexPoly_S1(outputCoverage_S0);{ // Xfer Processor: Porter Duff Shader
   6    sk_FragColor = blend_src(outputColor_S0, _dstColor);sk_FragColor = output_S1 * sk_FragColor + (half4(1.0) - output_S1) * _dstColor;}}
Errors:
error: 6: unknown identifier '_dstColor'
error: 6: unknown identifier '_dstColor'
2 errors

What could be a possible cause for that?

@ardera
Copy link
Owner

ardera commented Mar 22, 2022

I think that's most likely a flutter bug, it's best you open an issue on the flutter repo

@gerkol
Copy link
Author

gerkol commented Mar 23, 2022

Yes probably. I'll do that.

Is there any way to get access to the logs produced by the flutter app when executing it with flutter-pi?

@ardera
Copy link
Owner

ardera commented Mar 23, 2022

All logs should be dumped to stdout directly. Maybe there's flags to enable/disable specific logging, but I guess the flutter engineers will tell you that when you report the issue

@gerkol
Copy link
Author

gerkol commented Mar 28, 2022

Is there a way to pass the flag --enable-software-rendering when executing with flutter-pi?

@ardera
Copy link
Owner

ardera commented Mar 28, 2022

yeah flutter-pi /path/to/assetbundle --enable-software-rendering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants