flutter-tizen / engine

The Flutter engine
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
6 stars 19 forks source link

Add vulkan renderer #342

Closed zhouleonlei closed 1 year ago

zhouleonlei commented 2 years ago

Add vulkan renderer based on the Ecore window.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

bbrto21 commented 2 years ago

I tried to use this, but it didn't work. And I got the following log:

E/ConsoleMessage( 3025): FlutterApplication.cs: Run(116) > Unhandled exception: System.DllNotFoundException: Unable to load shared library 'flutter_tizen.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libflutter_tizen.so: cannot open shared object file: No such file or directory
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.Interop.FlutterDesktopEngineCreate(FlutterDesktopEngineProperties& engine_properties)
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterEngine..ctor(String assetsPath, String icuDataPath, String aotLibraryPath, String dartEntrypoint, List`1 dartEntrypointArgs) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterEngine.cs:line 54
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterEngine..ctor(String dartEntrypoint, List`1 dartEntrypointArgs) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterEngine.cs:line 29
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterApplication.OnCreate() in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterApplication.cs:line 126
E/ConsoleMessage( 3025):    at Runner.App.OnCreate() in /home/boram/Work/f-project/sample/gallery/tizen/App.cs:line 10
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreBackend.UICoreBackend.OnCreateNative(IntPtr data)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreBackend.UICoreBackend.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreApplication.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreUIApplication.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterApplication.Run(String[] args) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterApplication.cs:line 119
E/ConsoleMessage( 3025):    at Runner.App.Main(String[] args) in /home/boram/Work/f-project/sample/gallery/tizen/App.cs:line
zhouleonlei commented 2 years ago

I tried to use this, but it didn't work. And I got the following log:

E/ConsoleMessage( 3025): FlutterApplication.cs: Run(116) > Unhandled exception: System.DllNotFoundException: Unable to load shared library 'flutter_tizen.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libflutter_tizen.so: cannot open shared object file: No such file or directory
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.Interop.FlutterDesktopEngineCreate(FlutterDesktopEngineProperties& engine_properties)
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterEngine..ctor(String assetsPath, String icuDataPath, String aotLibraryPath, String dartEntrypoint, List`1 dartEntrypointArgs) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterEngine.cs:line 54
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterEngine..ctor(String dartEntrypoint, List`1 dartEntrypointArgs) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterEngine.cs:line 29
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterApplication.OnCreate() in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterApplication.cs:line 126
E/ConsoleMessage( 3025):    at Runner.App.OnCreate() in /home/boram/Work/f-project/sample/gallery/tizen/App.cs:line 10
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreBackend.UICoreBackend.OnCreateNative(IntPtr data)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreBackend.UICoreBackend.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreApplication.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Applications.CoreUIApplication.Run(String[] args)
E/ConsoleMessage( 3025):    at Tizen.Flutter.Embedding.FlutterApplication.Run(String[] args) in /home/boram/Work/f-project/flutter-tizen/embedding/csharp/Tizen.Flutter.Embedding/FlutterApplication.cs:line 119
E/ConsoleMessage( 3025):    at Runner.App.Main(String[] args) in /home/boram/Work/f-project/sample/gallery/tizen/App.cs:line

Hello Which device did you use? Please install rpms below:

  1. Driver TV(PONTUSM, NIKEM2) ---> soc-gpu-ddk-nike-tv-23.0-0.armv7l.rpm RPI4 --->mesa-22.1.7-0.armv7l.rpm
  2. vulkan-headers-1.3.208-0.armv7l.rpm
  3. vulkan-loader-1.3.208-0.armv7l.rpm
  4. vulkan-wsi-layer-1.0.5-0.armv7l.rpm

Thanks

bbrto21 commented 2 years ago

I used TM1 and mobile emulator. both are Tizen 6.5. Why do I need to install more rpms manually?

xuelian-bai commented 2 years ago

I used TM1 and mobile emulator. both are Tizen 6.5. Why do I need to install more rpms manually?

I think you can't run vulkan on emluator. On emulator, GLES API is translated into GL API via yagl module, though vulkan is cross-platform, yagl still need to do something to forward vulkan API, I think this part isn't implemented yet.

zhouleonlei commented 2 years ago

I used TM1 and mobile emulator. both are Tizen 6.5. Why do I need to install more rpms manually?

Why do I need to install more rpms manually? --->Because current Tizen images didn't include vulkan related libraries and header flies

swift-kim commented 1 year ago

You may reopen this in https://github.com/flutter-tizen/embedder if necessary.

swift-kim commented 1 year ago

Can external textures be used with the Vulkan renderer?

xuelian-bai commented 1 year ago

no, it can't, it's not fully implemented

swift-kim commented 1 year ago

Yeah, it's not (yet) implemented. Is it technically possible to implement the external texture support in the future?

xuelian-bai commented 1 year ago

it's possible, we have implemented prototype last year, but since Impeller could be used in the future, we have suspend this implementation, and didn't fixed bugs. On the other way, since skia is designed for opengl, even we use vulkan backend, performance may not be enhanced, Imepller is designed for modern graphic APIs(Vulkan, metal), so I guess using impeller vulkan backend will have better performance.