-
Notifications
You must be signed in to change notification settings - Fork 9
Support render texture for Vulkan+Impeller #129
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
base: master
Are you sure you want to change the base?
Support render texture for Vulkan+Impeller #129
Conversation
* modify_code * Type conversion * code format
1.Add GetDevice method insted of device_ variable. 2.Refactor variable name for pixel buffer. 3.Add GetMemoryFDProperty method insted of variable.
|
@JSUYA Do you have time to review this PR? |
I'll start soon |
JSUYA
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tested with video_player, app has crashed. please check it out.
plugins/packages/video_player/example (master) 17:52:58 $ flutter-tizen run --enable-impeller --dart-define=USE_FLUTTER_TIZEN_EXPERIMENTAL=true
Launching tizen/flutter/generated_main.dart on Tizen rpi4 in debug mode...
The platform profile is used for signing.
Building a Tizen application in debug mode... 12.2s
✓ Built build/tizen/tpk/org.tizen.video_player_tizen_example-1.0.0.tpk (40.1MB)
Installing build/tizen/tpk/org.tizen.video_player_tizen_example-1.0.0.tpk... 17.8s
[E] [WARNING:flutter/impeller/renderer/backend/vulkan/driver_info_vk.cc(263)] Unknown GPU Driver Vendor: 5348. This is not an error.
[E] [IMPORTANT:flutter/shell/platform/embedder/embedder_surface_vulkan_impeller.cc(80)] Using the Impeller rendering backend (Vulkan).
Syncing files to device Tizen rpi4... 55ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on Tizen rpi4 is available at: http://127.0.0.1:40659/g52b_wtUP5E=/
The Flutter DevTools debugger and profiler on Tizen rpi4 is available at: http://127.0.0.1:39049?uri=http://127.0.0.1:40659/g52b_wtUP5E=/
....
[E] globalapps/org.tizen.video_player_tizen_example/bin/Runner.dll: ../src/vulkan/runtime/vk_image.c:279: vk_image_expand_aspect_mask: Assertion `image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_MASK_MESA' failed.
flutter/shell/platform/tizen/external_texture_surface_vulkan_buffer.cc
Outdated
Show resolved
Hide resolved
flutter/shell/platform/tizen/external_texture_surface_vulkan.cc
Outdated
Show resolved
Hide resolved
| void ExternalTexturePixelVulkan::CopyBufferToImage(const uint8_t* src_buffer, | ||
| VkDeviceSize size) { | ||
| void* data; | ||
| vkMapMemory(GetDevice(), staging_buffer_memory_, 0, size, 0, &data); | ||
| memcpy(data, src_buffer, static_cast<size_t>(size)); | ||
| vkUnmapMemory(GetDevice(), staging_buffer_memory_); | ||
| VkCommandBuffer command_buffer = vulkan_renderer_->BeginSingleTimeCommands(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested webRTC. As far as I know, webRTC is the only way to test PixelBuffer. Does it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have implemented a sample code for pixel buffer, it can be worked on RPI4.
However, my computer is under repair. I will upload the sample code once it's fixed.
I will update the RPI4 image and check it |
1.rename texture callback parameter name. 2.add null check for vulkan texture. 3.rename PopulateOpenGLTexture to PopulateGLTexture. 4.change DRM_FORMAT to vulkan format.
…render-texture-002
…render-texture-002
|
I have verified the PR on RPI4 with latest version, there will be an out-of-memory issue: |
I have updated the RPI4 image(tizen-10.0-unified_20251209.112952), no such issue, but I found a memory issue, I will check it. |
…render-texture-002
If want to render texture with Vulakn + Impeller, you should apply this flutter-tizen/flutter#17