Skip to content

Conversation

@xiaowei-guan
Copy link
Contributor

@xiaowei-guan xiaowei-guan commented Nov 12, 2025

If want to render texture with Vulakn + Impeller, you should apply this flutter-tizen/flutter#17

@xiaowei-guan xiaowei-guan marked this pull request as draft November 12, 2025 09:44
@xiaowei-guan xiaowei-guan marked this pull request as ready for review November 14, 2025 09:28
@xiaowei-guan
Copy link
Contributor Author

#128

1.Add GetDevice method insted of device_ variable.
2.Refactor variable name for pixel buffer.
3.Add GetMemoryFDProperty method insted of variable.
@xiaowei-guan
Copy link
Contributor Author

@JSUYA Do you have time to review this PR?

@JSUYA
Copy link
Member

JSUYA commented Dec 5, 2025

@JSUYA Do you have time to review this PR?

I'll start soon

Copy link
Member

@JSUYA JSUYA left a 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.

Comment on lines +197 to +203
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();
Copy link
Member

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?

Copy link
Contributor Author

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.

@xiaowei-guan
Copy link
Contributor Author

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.

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.
@xiaowei-guan
Copy link
Contributor Author

I have verified the PR on RPI4 with latest version, there will be an out-of-memory issue:

A Dart VM Service on Tizen rpi4 is available at: http://127.0.0.1:38915/8-T6wewQGS8=/
The Flutter DevTools debugger and profiler on Tizen rpi4 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:38915/8-T6wewQGS8=/
[I] lifecycle_channel.cc: AppIsResumed(37) > Sending AppLifecycleState.resumed message.
[I] tizen_window_ecore_wl2.cc: UpdateFlutterCursor(806) > UpdateFlutterCursor is not supported.
[I] external_texture_surface_vulkan.cc: PopulateVulkanTexture(108) > gpu_surface is null for texture ID: 2
[I] external_texture_surface_vulkan.cc: PopulateVulkanTexture(108) > gpu_surface is null for texture ID: 2
[I] lifecycle_channel.cc: AppIsPaused(42) > Sending AppLifecycleState.paused message.
[I] lifecycle_channel.cc: AppIsDetached(47) > Sending AppLifecycleState.detached message.
[E] globalapps/org.tizen.video_player_tizen_example/bin/Runner.dll: ../src/broadcom/vulkan/v3dv_queue.c:957: handle_cl_job: Assertion `bo_idx == submit.bo_handle_count' failed.
[E] onSigabrt called
Lost connection to device.

@xiaowei-guan
Copy link
Contributor Author

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.

I will update the RPI4 image and check it

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.

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

Successfully merging this pull request may close these issues.

3 participants