ardera / flutter-pi

A light-weight Flutter Engine Embedder for Raspberry Pi that runs without X.
MIT License
1.49k stars 154 forks source link

Could not resolve EGL procedure eglCreatePlatformWindowSurface #328

Closed berkutta closed 11 months ago

berkutta commented 1 year ago

Hi

I'm trying to get the flutter-pi project working on a Rockchip PX30 Board. My setup consists of the Rockchip/Linaro Debian 10 rootfs and their 4.4 Kernel.

The glmark2-es2 utility is running fine on this Board. But flutter-pi isn't able to resolve the eglCreatePlatformWindowSurface. Is it possible that the Rockchip implementation doesn't implement this procedure, or is another configuration issue more likely?

root@linaro-alip:~# ./flutter-pi/build/flutter-pi /home/linaro/flutter_assets
==============Locale==============
Flutter locale:
  default: en_US
  locales: en_US en.UTF-8 en.UTF-8 en.UTF-8 en_US en en.UTF-8
===================================
===================================
display mode:
  resolution: 720 x 1280
  refresh rate: 60Hz
  physical size: 68mm x 121mm
  flutter device pixel ratio: 2.786378
===================================
[flutter-pi] FATAL: Could not resolve EGL procedure eglCreatePlatformWindowSurface
[flutter-pi] Could not load EGL / GL ES procedure addresses! error: Invalid argument
ardera commented 1 year ago

Yep that could be the case. Can you try the feature/compositor-ng branch? I have some fixes for that here.

berkutta commented 1 year ago

Hi

Thank you, I have tried the branch. For me, it looks like it still tries to resolve the eglCreatePlatformWindowSurface procedure and fails with that.

Do I need to change something in the Header file to "force" it into another GL "mode"? Can I somehow provide more debug informations?

root@linaro-alip:~# ./flutter-pi-comp/build/flutter-pi flutter_assets
[EGL/GL renderer] Could not resolve EGL/GL symbol "eglCreatePlatformWindowSurface"
[EGL/GL renderer] Could not get EGL display from GBM device. eglGetPlatformDisplay: 0x00003000
[flutter-pi] Couldn't create EGL/OpenGL renderer.
ardera commented 1 year ago

You can compile flutter-pi in debug mode: cmake -DCMAKE_BUILD_TYPE=Debug ..., that will print some more info. Apart form that, I don't know what driver your system is using internally. You can try doing MESA_DEBUG=1 LIBGL_DEBUG=verbose flutter-pi ... and seeing if that prints a bit more info.

The error is actually not that it can't resolve eglCreatePlatformWindowSurface. It should work without that. It's that eglGetPlatformDisplay is failing, which is weird

I just pushed a some commits that makes it fall back to eglGetPlatformDisplayEXT if eglGetPlatformDisplay fails. Same for surface creation too, in anticipation something might fail there as well :smile: Can you try the feature/compositor-ng branch again?

EDIT: Also, does kmscube work for you?

berkutta commented 1 year ago

With the branch updated, I now Interestingly get a Segmentation fault. Will try the other things you suggested tomorrow:

root@linaro-alip:~# ./flutter-pi-comp/build/flutter-pi flutter_assets
[EGL/GL renderer] Could not get EGL display from GBM device. eglGetPlatformDisplay: EGL_SUCCESS
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
Segmentation fault
ardera commented 1 year ago

Interesting. Have you already configured debug mode yet with -DCMAKE_BUILD_TYPE=Debug?

Btw, in this repo, it seems like there's multiple variants of libmali for different window systems. Can you make sure you're linking against the gbm variant? Maybe check ldd flutter-pi.

berkutta commented 1 year ago

Oops, didn't notice that assertion is just active in Debug, sorry (logical, no question)

So with debug, we indeed get a assert:

root@linaro-alip:~# MESA_DEBUG=1 LIBGL_DEBUG=verbose ./flutter-pi-comp-debug/build/flutter-pi flutter_assets
[fs layout] icudtl file not found at /root/flutter_assets/icudtl.dat.
[fs layout] icudtl file not found at /usr/share/flutter/icudtl.dat.
==============Locale==============
Flutter locale:
  default: en_US
  locales: en_US en.UTF-8 en.UTF-8 en.UTF-8 en_US en en.UTF-8
===================================
[modesetting] Unknown DRM connector property: brightness
[modesetting] Unknown DRM connector property: contrast
[modesetting] Unknown DRM connector property: saturation
[modesetting] Unknown DRM connector property: hue
[modesetting] Unknown DRM crtc property: left margin
[modesetting] Unknown DRM crtc property: right margin
[modesetting] Unknown DRM crtc property: top margin
[modesetting] Unknown DRM crtc property: bottom margin
[modesetting] Unknown DRM crtc property: CABC_LUT
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: CABC_STAGE_UP
[modesetting] Unknown DRM crtc property: CABC_STAGE_DOWN
[modesetting] Unknown DRM crtc property: CABC_GLOBAL_DN
[modesetting] Unknown DRM crtc property: CABC_CALC_PIXEL_NUM
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: ALPHA_SCALE
[modesetting] Unknown DRM crtc property: FEATURE
[modesetting] Unknown DRM crtc property: left margin
[modesetting] Unknown DRM crtc property: right margin
[modesetting] Unknown DRM crtc property: top margin
[modesetting] Unknown DRM crtc property: bottom margin
[modesetting] Unknown DRM crtc property: CABC_LUT
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: CABC_STAGE_UP
[modesetting] Unknown DRM crtc property: CABC_STAGE_DOWN
[modesetting] Unknown DRM crtc property: CABC_GLOBAL_DN
[modesetting] Unknown DRM crtc property: CABC_CALC_PIXEL_NUM
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: ALPHA_SCALE
[modesetting] Unknown DRM crtc property: FEATURE
[EGL/GL renderer] Could not get EGL display from GBM device. eglGetPlatformDisplay: EGL_SUCCESS
[EGL/GL renderer] Attempting eglGetPlatformDisplayEXT...
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
===================================
EGL information:
  version: 1.4 Bifrost-"g2p0-01eac0"
  vendor: ARM
  client extensions: EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_KHR_platform_gbm
  display extensions: EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_KHR_no_config_context EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_yuv_surface EGL_EXT_pixel_format_float EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_image_gl_colorspace EGL_EXT_create_context_robustness
===================================
===================================
OpenGL ES information:
  version: "OpenGL ES 3.2 v1.g2p0-01eac0.796838503c260f189e8a4714d3d9ebda"
  shading language version: "OpenGL ES GLSL ES 3.20"
  vendor: "ARM"
  renderer: "Mali-G31"
  extensions: "GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_EXT_texture_compression_astc_decode_mode GL_EXT_texture_compression_astc_decode_mode_rgb9e5 GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_shader_non_constant_global_initializers GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_YUV_target GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_draw_elements_base_vertex GL_OES_draw_elements_base_vertex GL_EXT_buffer_storage GL_ARM_texture_unnormalized_coordinates "
===================================
display mode:
  resolution: 720 x 1280
  refresh rate: 59.994188Hz
  physical size: 68mm x 121mm
  flutter device pixel ratio: 2.786378
  pixel format: (any)
[plugin registry] Initialized plugins: services, text input, raw keyboard plugin, 
[native windows] Flutter requested render surface before supplying surface dimensions.
flutter-pi: /root/flutter-pi-comp/src/modesetting.c:501: drm_plane_foreach_modified_format: Assertion `plane->supports_modifiers' failed.
Aborted

The same build without debug runs into a Segmentation fault:

root@linaro-alip:~# MESA_DEBUG=1 LIBGL_DEBUG=verbose ./flutter-pi-comp/build/flutter-pi flutter_assets
[EGL/GL renderer] Could not get EGL display from GBM device. eglGetPlatformDisplay: EGL_SUCCESS
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
Segmentation fault

After removing the assert on :501 also the debug build runs into a Segmentation fault. Running it with gdb results in this:

[native windows] Flutter requested render surface before supplying surface dimensions.

Thread 9 "flutter-pi" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fadd00fd0 (LWP 12097)]
0x0000005555572d18 in drm_plane_foreach_modified_format (plane=0x5555631f90, callback=0x5555589600 <count_modifiers_for_pixel_format>, 
    userdata=0x7fadd002c0) at /root/flutter-pi-comp-debug/src/modesetting.c:502
502     ASSERT_EQUALS(plane->supported_modified_formats_blob->version, FORMAT_BLOB_CURRENT);
(gdb) 

Both tested with commit be323fc8cfb5b0338cf23e8930f9758f1697aae7.

kmscube seems to run:

root@linaro-alip:~# kmscube 
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
Using display 0x55ac953c00 with EGL version 1.4
===================================
EGL information:
  version: "1.4 Bifrost-"g2p0-01eac0""
  vendor: "ARM"
  client extensions: "EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_KHR_platform_gbm"
  display extensions: "EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_KHR_no_config_context EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_yuv_surface EGL_EXT_pixel_format_float EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_image_gl_colorspace EGL_EXT_create_context_robustness"
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 3.2 v1.g2p0-01eac0.796838503c260f189e8a4714d3d9ebda"
  shading language version: "OpenGL ES GLSL ES 3.20"
  vendor: "ARM"
  renderer: "Mali-G31"
  extensions: "GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_EXT_texture_compression_astc_decode_mode GL_EXT_texture_compression_astc_decode_mode_rgb9e5 GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_shader_non_constant_global_initializers GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_YUV_target GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_draw_elements_base_vertex GL_OES_draw_elements_base_vertex GL_EXT_buffer_storage GL_ARM_texture_unnormalized_coordinates "
===================================

Need to double check the results later..

ardera commented 1 year ago

Ah, I know what's going on. Seems like your GPU doesn't support modifiers. In that case the whole plane->supported_modified_formats_blob is unset.

The code in https://github.com/ardera/flutter-pi/blob/be323fc8cfb5b0338cf23e8930f9758f1697aae7/src/window.c#L1331-L1365 should check for that case. I'll fix it.

ardera commented 1 year ago

Just wanted to push the fix, but github seems to have problems 🤷‍♂️ https://www.githubstatus.com/

ardera commented 1 year ago

Can you try: https://github.com/ardera/flutter-pi/commit/599d5d6068629ac33d29af264b25d6b9c0188385

berkutta commented 1 year ago

Wow, thank you, you are lightning fast!

Looks like this commit runs fine. Unfortunately, I don't have access to the device/screen right now to check if it also displays something useful.. Will check tomorrow.

root@linaro-alip:~# ./flutter-pi-comp-debug/build/flutter-pi flutter_assets
[fs layout] icudtl file not found at /root/flutter_assets/icudtl.dat.
[fs layout] icudtl file not found at /usr/share/flutter/icudtl.dat.
==============Locale==============
Flutter locale:
  default: en_US
  locales: en_US en.UTF-8 en.UTF-8 en.UTF-8 en_US en en.UTF-8
===================================
[modesetting] Unknown DRM connector property: brightness
[modesetting] Unknown DRM connector property: contrast
[modesetting] Unknown DRM connector property: saturation
[modesetting] Unknown DRM connector property: hue
[modesetting] Unknown DRM crtc property: left margin
[modesetting] Unknown DRM crtc property: right margin
[modesetting] Unknown DRM crtc property: top margin
[modesetting] Unknown DRM crtc property: bottom margin
[modesetting] Unknown DRM crtc property: CABC_LUT
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: CABC_STAGE_UP
[modesetting] Unknown DRM crtc property: CABC_STAGE_DOWN
[modesetting] Unknown DRM crtc property: CABC_GLOBAL_DN
[modesetting] Unknown DRM crtc property: CABC_CALC_PIXEL_NUM
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: ALPHA_SCALE
[modesetting] Unknown DRM crtc property: FEATURE
[modesetting] Unknown DRM crtc property: left margin
[modesetting] Unknown DRM crtc property: right margin
[modesetting] Unknown DRM crtc property: top margin
[modesetting] Unknown DRM crtc property: bottom margin
[modesetting] Unknown DRM crtc property: CABC_LUT
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: CABC_STAGE_UP
[modesetting] Unknown DRM crtc property: CABC_STAGE_DOWN
[modesetting] Unknown DRM crtc property: CABC_GLOBAL_DN
[modesetting] Unknown DRM crtc property: CABC_CALC_PIXEL_NUM
[modesetting] Unknown DRM crtc property: CABC_MODE
[modesetting] Unknown DRM crtc property: ALPHA_SCALE
[modesetting] Unknown DRM crtc property: FEATURE
[EGL/GL renderer] Could not get EGL display from GBM device. eglGetPlatformDisplay: EGL_SUCCESS
[EGL/GL renderer] Attempting eglGetPlatformDisplayEXT...
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
===================================
EGL information:
  version: 1.4 Bifrost-"g2p0-01eac0"
  vendor: ARM
  client extensions: EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_KHR_platform_gbm
  display extensions: EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_KHR_no_config_context EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_yuv_surface EGL_EXT_pixel_format_float EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_image_gl_colorspace EGL_EXT_create_context_robustness
===================================
===================================
OpenGL ES information:
  version: "OpenGL ES 3.2 v1.g2p0-01eac0.796838503c260f189e8a4714d3d9ebda"
  shading language version: "OpenGL ES GLSL ES 3.20"
  vendor: "ARM"
  renderer: "Mali-G31"
  extensions: "GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_EXT_texture_compression_astc_decode_mode GL_EXT_texture_compression_astc_decode_mode_rgb9e5 GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_shader_non_constant_global_initializers GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_YUV_target GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_draw_elements_base_vertex GL_OES_draw_elements_base_vertex GL_EXT_buffer_storage GL_ARM_texture_unnormalized_coordinates "
===================================
display mode:
  resolution: 720 x 1280
  refresh rate: 59.994188Hz
  physical size: 68mm x 121mm
  flutter device pixel ratio: 2.786378
  pixel format: (any)
[plugin registry] Initialized plugins: services, text input, raw keyboard plugin, 
[native windows] Flutter requested render surface before supplying surface dimensions.
[EGL/GL renderer] Choosing EGL config with pixel format ARGB 8:8:8:8...
flutter: The Dart VM service is listening on http://127.0.0.1:36444/PvXmqkc8Nlw=/
ardera commented 1 year ago

Wow, thank you, you are lightning fast!

Only sometimes 😄

Looks like this commit runs fine. Unfortunately, I don't have access to the device/screen right now to check if it also displays something useful.. Will check tomorrow.

sounds good 👍

berkutta commented 1 year ago

It seems to work, also with way better performance than Software rendering.

But something is weird, I was just able to get it displaying something when lightdm runs at the same time. Not yet sure if this is a weird thing of this Rockchip BSP or where this behavior is coming from.

I will check later if I can further narrow that down.

(Just tested with running the flutter app in debug, still need to test it with a release flutter app build)

ardera commented 1 year ago

does it log any errors when it doesn't display something?

can you do sudo bash -c 'cat /sys/kernel/debug/dri/*/state' when flutter-pi is running, one time when the output is working (with lightdm) and one time when it's not and send me the output of that?

AndroidDesigner commented 1 year ago

Hello I have a debian 10 buster system and got the same error with both debug & release build:

[locales] Warning: The system has no configured locale. The default "C" locale may or may not be supported by the app.
[modesetting] Could not set DRM client atomic capable. drmSetClientCap: Invalid argument
[flutter-pi] Could not create drmdev from device at "/dev/dri/card1". Continuing.
[flutter-pi] WARNING: display has non-square pixels. Non-square-pixels are not supported by flutter.
==============Locale==============
Flutter locale:
  default: C.UTF-8
  locales: C.UTF-8 C.UTF-8 C.UTF-8 C.UTF-8 C
===================================
===================================
display mode:
  resolution: 800 x 1280
  refresh rate: 56Hz
  physical size: 155mm x 86mm
  flutter device pixel ratio: 1.358234
===================================
[flutter-pi] FATAL: Could not resolve EGL procedure eglCreatePlatformWindowSurface
[flutter-pi] Could not load EGL / GL ES procedure addresses! error: Invalid argument

A you said, I used compositor-ng branch and application started successfully. So is it the final solution?

ardera commented 1 year ago

@AndroidDesigner yep that's the final solution for this issue. I'll merge feature/compositor-ng into master soon

Though, just for reference, what board are you using?

Btw, since it's DSI and the display does not have dimensions set, flutter-pi just assumes it's official Raspberry Pi 7inch display and uses those dimensions (physical size: 155mm x 86mm)

Those are obviously wrong in your case so it's best to specify the correct dimensions via command-line flutter-pi -d "123x456" for example. Otherwise the rendering may look off

AndroidDesigner commented 1 year ago

Though, just for reference, what board are you using?

I'm using this debian 10 touch panel (aarach64)

Btw, since it's DSI and the display does not have dimensions set, flutter-pi just assumes it's official Raspberry Pi 7inch display and uses those dimensions (physical size: 155mm x 86mm)

Those are obviously wrong in your case so it's best to specify the correct dimensions via command-line flutter-pi -d "123x456" for example. Otherwise the rendering may look off

My Touch Panel is 1280*800 and the rendering is good. But as I said here, I don't know why the touch does not work correctly (although touch is working fine in its desktop environment, and I know the flutter-pi does not use X11).

AndroidDesigner commented 1 year ago

I found a solution for the touch problem too with the help of this issue.

github-actions[bot] commented 11 months ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens and logs. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.