Skip to content
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

addpkg(main/mesa-vulkan-icd-wrapper): Android Vulkan wrapper #22500

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xMeM
Copy link
Contributor

@xMeM xMeM commented Dec 10, 2024

Wrap the Android system Vulkan library into an ICD and provides X11 platform surface support.

@twaik
Copy link
Member

twaik commented Dec 10, 2024

@truboxl @licy183 @sylirre probably this driver can replace vulkan-loader-android and implement default vulkan ICD at the same time. Probably you want to test it a bit more deep.

@twaik
Copy link
Member

twaik commented Dec 10, 2024

For some reasons latest termux-x11 falls with segmentation fault if I launch vkcube. Will investigate it.

@Biswa96
Copy link
Member

Biswa96 commented Dec 10, 2024

Does this support Adreno 505 GPU? I got the following errors.

$ termux-x11 -xstartup vkcube
Selected WSI platform: xcb
Selected GPU 0: Adreno (TM) 505, type: IntegratedGpu
ERROR(/home/builder/.termux-build/vulkan-wsi-layer/src/wsi/swapchain_base.cpp:323): init_platform(device, swapchain_create_info, use_presentation_thread)
ERROR(/home/builder/.termux-build/vulkan-wsi-layer/src/layer/swapchain_api.cpp:65): Failed to initialise swapchain
23377 killed by signal 11

$ termux-x11 -xstartup vulkaninfo
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_window_system_integration uses API version 1.3 which is older than the application specified API version of 1.4. May cause issues.
...more info...

@xMeM
Copy link
Contributor Author

xMeM commented Dec 10, 2024

Uninstall vulkan-wsi-layer , it is no longer needed.

@Biswa96
Copy link
Member

Biswa96 commented Dec 10, 2024

Thanks for the hint. Now, vkcube is working but vulkaninfo fails.

$ vulkaninfo
../src/src/vulkan/wsi/wsi_common_x11.c:938: VkResult x11_surface_get_formats2(VkIcdSurfaceBase *, struct wsi_device *, const void *, uint32_t *, VkSurfaceFormat2KHR *): assertion "f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR" failed
Aborted

@twaik
Copy link
Member

twaik commented Dec 10, 2024

Does not work fine on my device. I get this in X server log.

12-10 12:33:14.825 10980 10992 E [Gralloc-ERROR]: validate_lock_input_parameters:227 Lock is not supported for AFBC enabled buffers. wxh(500 500) Internal Format:0x100000001
12-10 12:33:14.825 10980 10992 W Gralloc2: lock(0x7e50a94500, ...) failed: 7
12-10 12:33:14.825 10980 10992 E LorieNative: DRI3: AHardwareBuffer_lock failed: 7

@xMeM
Copy link
Contributor Author

xMeM commented Dec 10, 2024

Thanks for the hint. Now, vkcube is working but vulkaninfo fails.

$ vulkaninfo
../src/src/vulkan/wsi/wsi_common_x11.c:938: VkResult x11_surface_get_formats2(VkIcdSurfaceBase *, struct wsi_device *, const void *, uint32_t *, VkSurfaceFormat2KHR *): assertion "f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR" failed
Aborted

This is an issue with vulkan-tools , fixed by KhronosGroup/Vulkan-Tools@2744de9.

@twaik
Copy link
Member

twaik commented Dec 10, 2024

Is there any reason why CI built libwayland-protocols and not the actual package? @sylirre ?

@twaik twaik closed this Dec 10, 2024
@twaik twaik reopened this Dec 10, 2024
@sylirre
Copy link
Member

sylirre commented Dec 10, 2024

@twaik CI built these packages:

  • libwayland-protocols_1.38_all.deb
  • mesa-vulkan-icd-wrapper_24.3.1-1_aarch64.deb
  • mesa-vulkan-icd-wrapper_24.3.1-1_arm.deb

icd wrapper has TERMUX_PKG_BLACKLISTED_ARCHES="i686, x86_64"

I don't see missing packages.

@twaik
Copy link
Member

twaik commented Dec 10, 2024

Oh, I was checking the x86_64 version.
@xMeM is there any reason to make it only arm and arm64?

@xMeM
Copy link
Contributor Author

xMeM commented Dec 10, 2024

Not tested on x86_64 devices.

@xMeM
Copy link
Contributor Author

xMeM commented Dec 10, 2024

Does not work fine on my device. I get this in X server log.

12-10 12:33:14.825 10980 10992 E [Gralloc-ERROR]: validate_lock_input_parameters:227 Lock is not supported for AFBC enabled buffers. wxh(500 500) Internal Format:0x100000001
12-10 12:33:14.825 10980 10992 W Gralloc2: lock(0x7e50a94500, ...) failed: 7
12-10 12:33:14.825 10980 10992 E LorieNative: DRI3: AHardwareBuffer_lock failed: 7

I changed the Usage of AHardwareBuffer, can you try again?

@twaik
Copy link
Member

twaik commented Dec 10, 2024

Unfortunately the package is stripped and debug symbols are disabled so there is no much info.

Selected WSI platform: xlib
Selected GPU 0: Mali-G77, type: IntegratedGpu                                                   
Segmentation fault                                                                              
--------- beginning of crash
12-10 16:32:52.306  9822  9822 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), faul
t addr 0xe0 in tid 9822 (vkcube), pid 9822 (vkcube)
--------- beginning of main                                                                     
12-10 16:32:52.324  9831  9831 I crash_dump64: obtaining output fd from tombstoned, type: kDebug
gerdTombstoneProto                                                                              
12-10 16:32:52.326  9831  9831 I crash_dump64: performing dump of process 9822 (target tid = 982
2)                                                                                              
12-10 16:32:52.369  9831  9831 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *
** *** ***                                                                                      
12-10 16:32:52.369  9831  9831 F DEBUG   : Build fingerprint: 'samsung/r8sxx/r8s:13/TP1A.220624.
014/G780FXXSLFXK8:user/release-keys'
12-10 16:32:52.369  9831  9831 F DEBUG   : Revision: '5'                                        
12-10 16:32:52.369  9831  9831 F DEBUG   : ABI: 'arm64'
12-10 16:32:52.369  9831  9831 F DEBUG   : Processor: '4'                                       
12-10 16:32:52.369  9831  9831 F DEBUG   : Timestamp: 2024-12-10 16:32:52.330705687+0200        
12-10 16:32:52.369  9831  9831 F DEBUG   : Process uptime: 1s                                   
12-10 16:32:52.369  9831  9831 F DEBUG   : Cmdline: vkcube                                      
12-10 16:32:52.369  9831  9831 F DEBUG   : pid: 9822, tid: 9822, name: vkcube  >>> vkcube <<<   
12-10 16:32:52.369  9831  9831 F DEBUG   : uid: 10677                                           
12-10 16:32:52.369  9831  9831 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr
 0x00000000000000e0                                                                             
12-10 16:32:52.369  9831  9831 F DEBUG   : Cause: null pointer dereference                      
12-10 16:32:52.369  9831  9831 F DEBUG   :     x0  0000000000000000  x1  00000074a6c02800  x2  0
0000074a9a6a008  x3  000000000000001d                                                           
12-10 16:32:52.369  9831  9831 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0
000000000000000  x7  7f7f7f7f7f7f7f7f
12-10 16:32:52.369  9831  9831 F DEBUG   :     x8  0a032e85271b5fb7  x9  0a032e85271b5fb7  x10 0
0000074a6c00ae0  x11 00000074a6c01450                                                           
12-10 16:32:52.369  9831  9831 F DEBUG   :     x12 00000074a6c01430  x13 0000000000081708  x14 0
000000000080308  x15 ffffffffffffffff
12-10 16:32:52.369  9831  9831 F DEBUG   :     x16 00000074a71d2a60  x17 00000074a71c227c  x18 0
0000074a9574000  x19 0000007fe2413590
12-10 16:32:52.369  9831  9831 F DEBUG   :     x20 0000005a79ed9180  x21 0000005a79e89f09  x22 0
0000074a6d71754  x23 0000000000000001
12-10 16:32:52.369  9831  9831 F DEBUG   :     x24 0000005a79ed7000  x25 0000000000000000  x26 0
000000000000055  x27 0000007fe2413590                                                           
12-10 16:32:52.369  9831  9831 F DEBUG   :     x28 0000000000000000  x29 0000007fe2414690
12-10 16:32:52.369  9831  9831 F DEBUG   :     lr  0000005a79e9de24  sp  0000007fe24134d0  pc  0
000005a79e9de28  pst 0000000060000000
12-10 16:32:52.369  9831  9831 F DEBUG   : backtrace:                                           
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE: Function names and BuildId information is mis
sing for some frames due                                                                        
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE: to unreadable libraries. For unwinds of apps,
 only shared libraries
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE: found under the lib/ directory are readable.
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE: On this device, run setenforce 0 to make the 
libraries readable.
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE: Unreadable libraries:
12-10 16:32:52.369  9831  9831 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/bin/vkcube
12-10 16:32:52.369  9831  9831 F DEBUG   :       #00 pc 000000000001de28  /data/data/com.termux/
files/usr/bin/vkcube
12-10 16:32:52.369  9831  9831 F DEBUG   :       #01 pc 0000000000083198  /apex/com.android.runt
ime/lib64/bionic/libc.so (__libc_init+96) (BuildId: ae97b4676db8ce3f620ba6bf7932eba6)
12-10 16:32:52.376  9831  9831 E crash_dump64: AM data write failed: Broken pipe
~/.../downloads/debs $

@hansm629
Copy link

@xMeM
Xclipse 940 GPU : vkmark [clear] flickering issue

vkmark_clear_flickering_issue.mp4

@hansm629
Copy link

@xMeM
Adreno 750 GPU : clvk not work Issue

~$ clinfo
[CLVK] Could not initialise any device!

@hansm629
Copy link

@xMeM
Could you please make MESA_VK_WSI_DEBUG=nosync environment variable work like it did in the old debug build version?

@Artewar67
Copy link

Artewar67 commented Dec 10, 2024

This version (24.3.1) stopped working with all applications except vulkaninfo compared to 24.2.5. I tested all variations of 24.3.1 and none of them works.

Selected WSI platform: xcb
Selected GPU 0: Mali-G76, type: IntegratedGpu
termux :0 -xstartup "vkmark"
7482 killed by signal 11

@paulowesll
Copy link

It's working with lasted termux-x11 update

https://github.com/termux/termux-x11/releases/tag/nightly

This version (24.3.1) stopped working with all applications except vulkaninfo compared to 24.2.5. I tested all variations of 24.3.1 and none of them works.

Selected WSI platform: xcb
Selected GPU 0: Mali-G76, type: IntegratedGpu
termux :0 -xstartup "vkmark"
7482 killed by signal 11

@Artewar67
Copy link

It's working with lasted termux-x11 update

https://github.com/termux/termux-x11/releases/tag/nightly

Updated termux-x11 and install new version of termux-x11-nightly. Nothing change

@twaik
Copy link
Member

twaik commented Dec 10, 2024

I managed to get better crash log

twaik@twaik:~/termux-x11$ adb -s phone:5555 logcat -c; adb -s phone:5555 logcat | ~/Android/Sdk/ndk/28.0.12674087/ndk-stack -i /dev/stdin --sym=/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/src/vulkan/wrapper
********** Crash dump: **********
Build fingerprint: 'samsung/r8sxx/r8s:13/TP1A.220624.014/G780FXXSLFXK8:user/release-keys'
#00 0x000000000076dacc /vendor/lib64/egl/libGLES_mali.so (vulkan::image::image_init_info::handle_image_format(gfx::host_mem_allocator&)+216) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#01 0x000000000076e46c /vendor/lib64/egl/libGLES_mali.so (vulkan::image::image_init_info::parse_image_info(gfx::host_mem_allocator&, bool, hal::surface_metadata const*)+376) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#02 0x000000000076b5b4 /vendor/lib64/egl/libGLES_mali.so (vulkan::image::init(vulkan::device*, VkImageCreateInfo const&, gfx::host_mem_allocator const&, bool, hal::surface_metadata const*, unsigned long const*, unsigned long const*)+276) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#03 0x000000000076f8cc /vendor/lib64/egl/libGLES_mali.so (vulkan::image::init_external_common(vulkan::device*, VkImageCreateInfo const&, unsigned long const*, unsigned long const*, gfx::host_mem_allocator const&, bool, hal::surface_metadata const&, int, hal::drm_format_modifier)+272) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#04 0x0000000000783960 /vendor/lib64/egl/libGLES_mali.so (vulkan::android_deferred_image_init_and_bind(vulkan::device*, vulkan::image*, vulkan::device_memory*)+612) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#05 0x000000000076baf4 /vendor/lib64/egl/libGLES_mali.so (vkBindImageMemory+20) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#06 0x00000000001f7f60 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_create_ahardware_buffer_blit_context
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:2359:13
#07 0x00000000001f4b70 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_create_image
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:777:13
#08 0x00000000001fce0c /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
x11_image_init
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common_x11.c:2073:13
#09 0x00000000001fbb90 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
x11_surface_create_swapchain
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common_x11.c:2791:16
#10 0x00000000001f52e0 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_CreateSwapchainKHR
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:1058:22
#11 0x000000000007a254 /data/data/com.termux/files/usr/lib/libvulkan.so.1.3.302
#12 0x000000000007c0ec /data/data/com.termux/files/usr/lib/vkmark/xcb.so
#13 0x000000000005c0c4 /data/data/com.termux/files/usr/lib/vkmark/xcb.so
#14 0x00000000000501d4 /data/data/com.termux/files/usr/lib/vkmark/xcb.so
#15 0x00000000000ad458 /data/data/com.termux/files/usr/bin/vkmark
#16 0x0000000000083198 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: ae97b4676db8ce3f620ba6bf7932eba6)
Crash dump is completed

********** Crash dump: **********
Build fingerprint: 'samsung/r8sxx/r8s:13/TP1A.220624.014/G780FXXSLFXK8:user/release-keys'
#00 0x000000000076dacc /vendor/lib64/egl/libGLES_mali.so (vulkan::image::image_init_info::handle_image_format(gfx::host_mem_allocator&)+216) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#01 0x000000000076e46c /vendor/lib64/egl/libGLES_mali.so (vulkan::image::image_init_info::parse_image_info(gfx::host_mem_allocator&, bool, hal::surface_metadata const*)+376) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#02 0x000000000076b5b4 /vendor/lib64/egl/libGLES_mali.so (vulkan::image::init(vulkan::device*, VkImageCreateInfo const&, gfx::host_mem_allocator const&, bool, hal::surface_metadata const*, unsigned long const*, unsigned long const*)+276) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#03 0x000000000076f8cc /vendor/lib64/egl/libGLES_mali.so (vulkan::image::init_external_common(vulkan::device*, VkImageCreateInfo const&, unsigned long const*, unsigned long const*, gfx::host_mem_allocator const&, bool, hal::surface_metadata const&, int, hal::drm_format_modifier)+272) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#04 0x0000000000783960 /vendor/lib64/egl/libGLES_mali.so (vulkan::android_deferred_image_init_and_bind(vulkan::device*, vulkan::image*, vulkan::device_memory*)+612) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#05 0x000000000076baf4 /vendor/lib64/egl/libGLES_mali.so (vkBindImageMemory+20) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
#06 0x00000000001f7f60 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_create_ahardware_buffer_blit_context
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:2359:13
#07 0x00000000001f4b70 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_create_image
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:777:13
#08 0x00000000001fce0c /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
x11_image_init
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common_x11.c:2073:13
#09 0x00000000001fbb90 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
x11_surface_create_swapchain
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common_x11.c:2791:16
#10 0x00000000001f52e0 /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
wsi_CreateSwapchainKHR
/home/twaik/.termux-build/mesa-vulkan-icd-wrapper/build/../src/src/vulkan/wsi/wsi_common.c:1058:22
#11 0x000000000007a254 /data/data/com.termux/files/usr/lib/libvulkan.so.1.3.302
#12 0x000000000001f8ac /data/data/com.termux/files/usr/bin/vkcube
#13 0x000000000001e70c /data/data/com.termux/files/usr/bin/vkcube
#14 0x0000000000083198 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: ae97b4676db8ce3f620ba6bf7932eba6)
Crash dump is completed

@paulowesll
Copy link

It's working with lasted termux-x11 update
https://github.com/termux/termux-x11/releases/tag/nightly

Updated termux-x11 and install new version of termux-x11-nightly. Nothing change

It's working here with lasted mesa wrapper and lasted termux-x11

~ $ termux-x11 -xstartup vkcube
Selected WSI platform: xcb
Selected GPU 0: Samsung Xclipse 530, type: IntegratedGpu

@twaik
Copy link
Member

twaik commented Dec 10, 2024

@xMeM suggestion. Some devices support BGRA format of AHardwareBuffers. It is enough to pass 5 as AHardwareBuffer_Desc::format to make it work. It will work on most devices (works fine in termux-x11), but you can write a runtime check for it (probe for this feature and check for errors?). So you can avoid blitting in this case and improve performance.

@Artewar67
Copy link

Artewar67 commented Dec 10, 2024

I also that when running vulkaninfo with termux-x11 this error occurs

~ $ termux-x11 -xstartup "vulkaninfo"
../src/src/vulkan/wsi/wsi_common_x11.c:938: VkResult x11_surface_get_formats2(VkIcdSurfaceBase *, struct wsi_device *, const void *, uint32_t *, VkSurfaceFormat2KHR *): assertion "f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR" failed
19564 killed by signal 6

This error also occurs in version 24.2.5 vulkan wrapper

@Artewar67
Copy link

vulkaninfo and glxgears with zink works fine somehow.

You are using mesa or mesa-zink from tur-repo?

@paulowesll
Copy link

paulowesll commented Dec 11, 2024

It's working again with the new one, but with dxvk it's still broken.

~ $ termux-x11 -xstartup vkcube Selected WSI platform: xcb Selected GPU 0: Samsung Xclipse 530, type: IntegratedGpu

@hansm629
Copy link

@xMeM
In the latest build, Xclipse 940 GPU doesn't work with anything except vkcube.

mesa-vulkan-icd-wrapper
https://github.com/termux/termux-packages/actions/runs/12273282857/job/34243753503?pr=22500

Termux-X11
https://github.com/termux/termux-x11/actions/runs/12270752818

~$ vkcube
Selected WSI platform: xcb
Selected GPU 0: Samsung Xclipse 940, type: IntegratedGpu

~$ vkmark
Error: vk::Device::createSwapchainKHR: ErrorUnknown

~$ glxgears
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
X Error of failed request:  GLXBadCurrentWindow
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  62
  Current serial number in output stream:  62

 ~$ glmark2
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 24.3.1
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain
[build] use-vbo=false:X Error of failed request:  GLXBadCurrentWindow
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  85
  Current serial number in output stream:  85

~$ glxinfo -B
name of display: :1.0
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain
display: :1  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0x144d)
    Device: zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY)) (0x2600200)
    Version: 24.3.1
    Accelerated: yes
    Video memory: 8256MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 8254 MB, largest block: 8254 MB
    VBO free aux. memory - total: 0 MB, largest block: 0 MB
    Texture free memory - total: 8254 MB, largest block: 8254 MB
    Texture free aux. memory - total: 0 MB, largest block: 0 MB
    Renderbuffer free memory - total: 8254 MB, largest block: 8254 MB
    Renderbuffer free aux. memory - total: 0 MB, largest block: 0 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8256 MB
    Total available memory: 8256 MB
    Currently available dedicated video memory: 8254 MB
OpenGL vendor string: Mesa
OpenGL renderer string: zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
OpenGL core profile version string: 4.6 (Compatibility Profile) Mesa 24.3.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: no-error
OpenGL core profile profile mask: compatibility profile
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.3.1
OpenGL shading language version string: 4.60
OpenGL context flags: no-error
OpenGL profile mask: compatibility profile
MESA: error: CreateSwapchainKHR failed with VK_ERROR_UNKNOWN
MESA: error: zink: could not create swapchain

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.3.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

@Xtr126
Copy link

Xtr126 commented Dec 11, 2024

vulkaninfo and glxgears with zink works fine somehow.

You are using mesa or mesa-zink from tur-repo?

mesa-zink from tur-repo. glxgears -info reports that it is using zink.

@hansm629
Copy link

hansm629 commented Dec 11, 2024

@xMeM
Great!!
In the latest version
Xclipse 940 GPU : vkmark [clear] flickering issue
The above issue is fixed!

Now it seems that only the following issues remain!

issue list

  • Adreno 750 GPU: clvk not work Issue
  • Commonness1 : MESA_VK_WSI_DEBUG=nosync environment variable not work issue
  • Commonness2 : vulkaninfo not work issue (vulkan-tools issue?)

@paulowesll
Copy link

@xMeM dxvk is working again with Xclipse GPU and latest update. Thanks.

@hansm629
Copy link

@xMeM
When will the next pull request build be?
For now, I'll just fix the issues I mentioned, but I think Adreno series and Xclipse series will work perfectly!

issue list

  • Adreno 750 GPU: clvk not work Issue
  • Commonness : MESA_VK_WSI_DEBUG=nosync environment variable not work issue

@hansm629
Copy link

@xMeM
When completing glmark2 on Xclipse 940 GPU, I am getting the following error message:

../src/src/vulkan/wsi/wsi_common_x11.c:1925: Swapchain status changed to VK_ERROR_SURFACE_LOST_KHR

This error does not occur in glmark2-es2.

~$ glmark2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 24.3.1
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 685 FrameTime: 1.460 ms
[build] use-vbo=true: FPS: 737 FrameTime: 1.359 ms
[texture] texture-filter=nearest: FPS: 721 FrameTime: 1.388 ms
[texture] texture-filter=linear: FPS: 713 FrameTime: 1.404 ms
[texture] texture-filter=mipmap: FPS: 739 FrameTime: 1.354 ms
[shading] shading=gouraud: FPS: 720 FrameTime: 1.391 ms
[shading] shading=blinn-phong-inf: FPS: 515 FrameTime: 1.942 ms
[shading] shading=phong: FPS: 581 FrameTime: 1.722 ms
[shading] shading=cel: FPS: 568 FrameTime: 1.762 ms
[bump] bump-render=high-poly: FPS: 449 FrameTime: 2.231 ms
[bump] bump-render=normals: FPS: 477 FrameTime: 2.100 ms
[bump] bump-render=height: FPS: 571 FrameTime: 1.754 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 555 FrameTime: 1.802 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 516 FrameTime: 1.939 ms
[pulsar] light=false:quads=5:texture=false: FPS: 551 FrameTime: 1.817 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 373 FrameTime: 2.684 ms
[desktop] effect=shadow:windows=4: FPS: 406 FrameTime: 2.466 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 204 FrameTime: 4.926 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 201 FrameTime: 4.993 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 247 FrameTime: 4.050 ms
[ideas] speed=duration: FPS: 584 FrameTime: 1.714 ms
[jellyfish] <default>: FPS: 439 FrameTime: 2.281 ms
[terrain] <default>: FPS: 229 FrameTime: 4.380 ms
[shadow] <default>: FPS: 419 FrameTime: 2.390 ms
[refract] <default>: FPS: 240 FrameTime: 4.177 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 592 FrameTime: 1.690 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 565 FrameTime: 1.772 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 491 FrameTime: 2.040 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 592 FrameTime: 1.690 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 562 FrameTime: 1.781 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 571 FrameTime: 1.753 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 589 FrameTime: 1.700 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 493 FrameTime: 2.029 ms
=======================================================
                                  glmark2 Score: 510 
=======================================================
../src/src/vulkan/wsi/wsi_common_x11.c:1925: Swapchain status changed to VK_ERROR_SURFACE_LOST_KHR

@sabamdarif
Copy link

sabamdarif commented Dec 15, 2024

@xMeM,
i tried this latest version both mali-g76 and adreno 619, at first both have problems

although mali's problem get fixed
In mali-67 if i run vkmark / vkcube without this environment variable (MESA_VK_WSI_DEBUG=blit) it give me a error like this

~ $ vkmark
Segmentation fault

~ $ vkcube                                           
Selected WSI platform: xcb
Selected GPU 0: Mali-G76 MC4, type: IntegratedGpu
Segmentation fault

And with this variable

~ $ env MESA_VK_WSI_DEBUG=blit termux-x11 -xstartup vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x13B5
    Device ID:      0x72110000
    Device Name:    Mali-G76 MC4
    Driver Version: 109051904
    Device UUID:    ba510acd8d9038a7a29282d5780482e5
=======================================================
[vertex] device-local=true: FPS: 1850 FrameTime: 0.541 ms
[vertex] device-local=false:

~ $ vkcube
Selected WSI platform: xcb
Selected GPU 0: Mali-G76 MC4, type: IntegratedGpu

But for Adreno I couldn't find any way to fix it

this is the problem with adreno 619 ( also it in termux not proot-distro that's a zsh theme)

Screenshot_20241214-134824_Termux_X11

this (https://github.com/xMeM/termux-packages/actions/runs/12167061648) build and the previous build before that have no issue at all

@xMeM
Copy link
Contributor Author

xMeM commented Dec 15, 2024

@hansm629 MESA_VK_WSI_DEBUG=nosync does not work and will not be implemented.

@sabamdarif
Copy link

sabamdarif commented Dec 15, 2024

@xMeM, in the new build mali-g76 problems fixed
working without those variables, let me try adreno 619

@xMeM
Copy link
Contributor Author

xMeM commented Dec 15, 2024

@sabamdarif Does your Adreno 619 device use the latest termux-x11? If not, try to update it.

@sabamdarif
Copy link

sabamdarif commented Dec 15, 2024

@sabamdarif Does your Adreno 619 device use the latest termux-x11? If not, try to update it.

yes i use the latest termux x11, i will make a fresh install with the new build and let's you know what happened

@Artewar67
Copy link

I can also confirm that with the new build Mali-G76 started working too

@sabamdarif
Copy link

@xMeM yes adreno 619 also working

@PhytochromeFr
Copy link

PhytochromeFr commented Dec 17, 2024

Screenshot_2024-12-17-18-00-49-85_00df01c412509efb9bd6450c382822af
Screenshot_2024-12-17-18-04-18-16_00df01c412509efb9bd6450c382822af
Screenshot_2024-12-17-18-09-39-18_84d3000e3f4017145260f7618db1d683
Screenshot_2024-12-17-18-13-22-82_00df01c412509efb9bd6450c382822af

H/W : ONEPLUS 13/S8E/24GB

i tried this and failed. termux native & proot are same. what i missed?

vulkaninfo worked, but vkcube not and other things too.
vulkaninfo.zip

@PhytochromeFr
Copy link

(xfce4-session:27926): xfce4-session-WARNING **: 21:52:08.424: No SSH authentication agent found
MESA: error: kopper: could not create texture from pixmap (4)
MESA: error: ZINK: vkCreateGraphicsPipelines failed (VK_ERROR_UNKNOWN)
xfce4-panel: No window manager registered on screen 0. To start the panel without this check, run with --disable-wm-check.
No window manager registered on screen 0. To start the xfdesktop without this check, run with --disable-wm-check.
``
** (xfdesktop:28003): WARNING **: 21:52:14.220: Failed to get system bus: Could not connect: No such file or directory #```

i tried another build. it still crashs.

@sabamdarif
Copy link

@PhytochromeFr i don't that much about adreno but for my Mali-G76 the Segmentation fault problem fixed after launching vkmark with this environment variable MESA_VK_WSI_DEBUG=blit

try MESA_VK_WSI_DEBUG=blit vkamrk
or try changing the blit to rgba / noahb

@PhytochromeFr
Copy link

@sabamdarif
thanks for answer. but, it still doesn't work.

@xMeM
Copy link
Contributor Author

xMeM commented Dec 18, 2024

@PhytochromeFr Please use the latest build to get more error information.

@PhytochromeFr
Copy link

PhytochromeFr commented Dec 18, 2024

~ $ termux-x11 -xstartup "vulkaninfo"           ../src/src/vulkan/wsi/wsi_common_x11.c:942: VkResult x11_surface_get_formats2(VkIcdSurfaceBase *, struct wsi_device *, const void *, uint32_t *, VkSurfaceFormat2KHR *): assertion "f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR" failed
4010 killed by signal 6                         ~ $ termux-x11 -xstartup "vkmark"               11522 killed by signal 11
~ $ termux-x11 -xstartup "vkcube"               Selected WSI platform: xcb                      11762 killed by signal 11
~ $ termux-x11 -xstartup "glmark2"              =======================================================
    glmark2 2023.01                             =======================================================
    OpenGL Information                              GL_VENDOR:      Mesa                            GL_RENDERER:    zink Vulkan 1.3(Adreno (TM) 830 (QUALCOMM_PROPRIETARY))                         GL_VERSION:     4.6 (Compatibility Profile) Mesa 24.2.8
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0                             Surface Size:   800x600 windowed
=======================================================                                         [build] use-vbo=false:
 FPS: 925 FrameTime: 1.081 ms                   [build] use-vbo=true: FPS: 909 FrameTime: 1.101 ms                                              [texture] texture-filter=nearest: FPS: 850 FrameTime: 1.177 ms
[texture] texture-filter=linear: FPS: 759 FrameTime: 1.319 ms                                   [texture] texture-filter=mipmap: FPS: 761 FrameTime: 1.315 ms
[shading] shading=gouraud: FPS: 721 FrameTime: 1.388 ms
[shading] shading=blinn-phong-inf: FPS: 785 FrameTime: 1.275 ms
[shading] shading=phong: FPS: 683 FrameTime: 1.465 ms
[shading] shading=cel: FPS: 712 FrameTime: 1.405 ms                                             [bump] bump-render=high-poly: FPS: 637 FrameTime: 1.572 ms                                      [bump] bump-render=normals: FPS: 835 FrameTime: 1.198 ms
[bump] bump-render=height: FPS: 810 FrameTime: 1.235 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 671 FrameTime: 1.491 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 554 FrameTime: 1.808 ms
[pulsar] light=false:quads=5:texture=false: FPS: 737 FrameTime: 1.358 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 425 FrameTime: 2.355 ms                                             [desktop] effect=shadow:windows=4: FPS: 648 FrameTime: 1.545 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 248 FrameTime: 4.040 ms                 [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 433 FrameTime: 2.313 ms             [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 314 FrameTime: 3.190 ms
[ideas] speed=duration:MESA: error: ZINK: vkCreateGraphicsPipelines failed (VK_ERROR_UNKNOWN)   12147 killed by signal 11

@PhytochromeFr
Copy link

logcat.txt

@twaik
Copy link
Member

twaik commented Dec 18, 2024

New version works more or less fine on Mali-G77 (SM-G780F)
glmark2 works (via zink) (terrain and ideas benchamrks are a bit broken but still rendered).
vkcube and vkmark are fine too.

~ $ vkcube
Selected WSI platform: xcb
Selected GPU 0: Mali-G77, type: IntegratedGpu
../src/src/vulkan/wsi/wsi_common_x11.c:1929: Swapchain status changed to VK_SUBOPTIMAL_KHR
^C
~ $ vkmark 
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x13B5
    Device ID:      0x90800011
    Device Name:    Mali-G77
    Driver Version: 159387648
    Device UUID:    16aa93e98d5fd6615868deea353f486e
=======================================================
[vertex] device-local=true: FPS: 804 FrameTime: 1.244 ms
[vertex] device-local=false: FPS: 778 FrameTime: 1.285 ms
[texture] anisotropy=0: FPS: 938 FrameTime: 1.066 ms
[texture] anisotropy=16: FPS: 886 FrameTime: 1.129 ms
[shading] shading=gouraud: FPS: 605 FrameTime: 1.653 ms
[shading] shading=blinn-phong-inf: FPS: 606 FrameTime: 1.650 ms
[shading] shading=phong: FPS: 548 FrameTime: 1.825 ms
[shading] shading=cel: FPS: 600 FrameTime: 1.667 ms
[effect2d] kernel=edge: FPS: 534 FrameTime: 1.873 ms
[effect2d] kernel=blur: FPS: 526 FrameTime: 1.901 ms
[desktop] <default>: FPS: 953 FrameTime: 1.049 ms
[cube] <default>: FPS: 1384 FrameTime: 0.723 ms
[clear] <default>: FPS: 1065 FrameTime: 0.939 ms
=======================================================
                                   vkmark Score: 786
=======================================================
~ $ glmark2
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Mali-G77) doesn't support base Zink requirements: feats.features.logicOp feats.features.fillModeNonSolid feats.features.shaderClipDistance 
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.1(Mali-G77 (ARM_PROPRIETARY))
    GL_VERSION:     3.1 Mesa 24.2.8
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false:MESA: warning: WARNING: Incorrect rendering will happen because the Vulkan device doesn't support the 'VK_EXT_depth_clip_enable' feature
 FPS: 793 FrameTime: 1.261 ms
[build] use-vbo=true: FPS: 782 FrameTime: 1.279 ms
[texture] texture-filter=nearest: FPS: 831 FrameTime: 1.204 ms
[texture] texture-filter=linear: FPS: 828 FrameTime: 1.208 ms
[texture] texture-filter=mipmap: FPS: 839 FrameTime: 1.193 ms
[shading] shading=gouraud: FPS: 683 FrameTime: 1.465 ms
[shading] shading=blinn-phong-inf: FPS: 737 FrameTime: 1.357 ms
[shading] shading=phong: FPS: 619 FrameTime: 1.618 ms
[shading] shading=cel: FPS: 607 FrameTime: 1.649 ms
[bump] bump-render=high-poly: FPS: 332 FrameTime: 3.013 ms
[bump] bump-render=normals: FPS: 899 FrameTime: 1.113 ms
[bump] bump-render=height: FPS: 953 FrameTime: 1.050 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 526 FrameTime: 1.903 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 290 FrameTime: 3.453 ms
[pulsar] light=false:quads=5:texture=false: FPS: 813 FrameTime: 1.230 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 261 FrameTime: 3.845 ms
[desktop] effect=shadow:windows=4: FPS: 605 FrameTime: 1.654 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 236 FrameTime: 4.247 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 220 FrameTime: 4.554 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 239 FrameTime: 4.190 ms
[ideas] speed=duration: FPS: 370 FrameTime: 2.707 ms
[jellyfish] <default>: FPS: 553 FrameTime: 1.810 ms
[terrain] <default>: FPS: 121 FrameTime: 8.267 ms
[shadow] <default>: FPS: 489 FrameTime: 2.045 ms
[refract] <default>: FPS: 186 FrameTime: 5.404 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 873 FrameTime: 1.146 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 815 FrameTime: 1.227 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 835 FrameTime: 1.198 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 819 FrameTime: 1.222 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 735 FrameTime: 1.362 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 747 FrameTime: 1.340 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 739 FrameTime: 1.354 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 718 FrameTime: 1.395 ms
=======================================================
                                  glmark2 Score: 607 
=======================================================
../src/src/vulkan/wsi/wsi_common_x11.c:1929: Swapchain status changed to VK_ERROR_SURFACE_LOST_KHR

Pay attention to ../src/src/vulkan/wsi/wsi_common_x11.c:1929: Swapchain status changed to VK_SUBOPTIMAL_KHR and ../src/src/vulkan/wsi/wsi_common_x11.c:1929: Swapchain status changed to VK_ERROR_SURFACE_LOST_KHR messages, probably it is better to hide them.

xfce4-session+zink fail to start window manager so windows are rendered without decorations.

glxgears (via zink) fails with segfault, it is unable to create graphics pipeline.

~ $ logcat -c 
~ $ glxgears
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Mali-G77) doesn't support base Zink requirements: feats.features.logicOp feats.features.fillModeNonSolid feats.features.shaderClipDistance 
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
MESA: warning: WARNING: Incorrect rendering will happen because the Vulkan device doesn't support the 'VK_EXT_depth_clip_enable' feature
Segmentation fault
~ $ logcat
--------- beginning of main
12-18 08:31:50.052 17488 17488 I shmem   : int libandroid_shmdt(const void *): unmapped addr 0x7469297000 for FD 11 ID 0 shmid 4450000f
12-18 08:31:50.052 17488 17488 I shmem   : int libandroid_shmdt(const void *): deleting shmid 4450000f
12-18 08:31:50.054 17488 17488 I shmem   : void *libandroid_shmat(int, const void *, int): mapped addr 0x7469297000 for FD 11 ID 0
12-18 08:31:50.054 17488 17488 I shmem   : int libandroid_shmctl(int, int, struct shmid64_ds *): IPC_RMID for shmid=44500010
12-18 08:31:50.085 18562 18562 I Gralloc4: mapper 4.x is not supported
12-18 08:31:50.086 18562 18562 W Gralloc3: mapper 3.x is not supported
12-18 08:31:50.089 18562 18562 I gralloc : Arm Module v1.0
12-18 08:31:50.091 18562 18562 W Gralloc4: allocator 4.x is not supported
12-18 08:31:50.091 18562 18562 W Gralloc3: allocator 3.x is not supported
--------- beginning of crash
12-18 08:31:50.210 18562 18575 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40 in tid 18575 (glxgears:gdrv0), pid 18562 (glxgears)
12-18 08:31:50.262 18581 18581 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
12-18 08:31:50.264 18581 18581 I crash_dump64: performing dump of process 18562 (target tid = 18575)
12-18 08:31:50.534 18581 18581 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-18 08:31:50.534 18581 18581 F DEBUG   : Build fingerprint: 'samsung/r8sxx/r8s:13/TP1A.220624.014/G780FXXSLFXK8:user/release-keys'
12-18 08:31:50.534 18581 18581 F DEBUG   : Revision: '5'
12-18 08:31:50.534 18581 18581 F DEBUG   : ABI: 'arm64'
12-18 08:31:50.534 18581 18581 F DEBUG   : Processor: '5'
12-18 08:31:50.534 18581 18581 F DEBUG   : Timestamp: 2024-12-18 08:31:50.266932958+0200
12-18 08:31:50.534 18581 18581 F DEBUG   : Process uptime: 1s
12-18 08:31:50.534 18581 18581 F DEBUG   : Cmdline: glxgears
12-18 08:31:50.534 18581 18581 F DEBUG   : pid: 18562, tid: 18575, name: glxgears:gdrv0  >>> glxgears <<<
12-18 08:31:50.534 18581 18581 F DEBUG   : uid: 10677
12-18 08:31:50.534 18581 18581 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000040
12-18 08:31:50.534 18581 18581 F DEBUG   : Cause: null pointer dereference
12-18 08:31:50.534 18581 18581 F DEBUG   :     x0  000000726eaa41a8  x1  0000000000000001  x2  0000000000000001  x3  000000726fc9b1c0
12-18 08:31:50.534 18581 18581 F DEBUG   :     x4  000000726fc9b1e8  x5  0000000000000000  x6  0000000000000000  x7  7f7f7f7f7f7f7f7f
12-18 08:31:50.534 18581 18581 F DEBUG   :     x8  0000000000000000  x9  0000000000000000  x10 0000000000000002  x11 0000000000003003
12-18 08:31:50.535 18581 18581 F DEBUG   :     x12 0000007273cd625c  x13 000000726e9fc9e0  x14 0000007273ad1210  x15 0000000000000000
12-18 08:31:50.535 18581 18581 F DEBUG   :     x16 000000732758fa60  x17 000000732757f27c  x18 0000007272d0e000  x19 0000007273ad1850
12-18 08:31:50.535 18581 18581 F DEBUG   :     x20 000000726eaa41a8  x21 0000000000000000  x22 0000000000000000  x23 0000000000000000
12-18 08:31:50.535 18581 18581 F DEBUG   :     x24 0000000000000000  x25 0000000000000001  x26 0000000000000001  x27 000000000000098d
12-18 08:31:50.535 18581 18581 F DEBUG   :     x28 0000007273ad6010  x29 0000007273ad12f0
12-18 08:31:50.535 18581 18581 F DEBUG   :     lr  0000007280b28a18  sp  0000007273ad12f0  pc  0000007280c268d4  pst 0000000080000000
12-18 08:31:50.535 18581 18581 F DEBUG   : backtrace:
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE: Function names and BuildId information is missing for some frames due
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE: found under the lib/ directory are readable.
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE: On this device, run setenforce 0 to make the libraries readable.
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE: Unreadable libraries:
12-18 08:31:50.535 18581 18581 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.535 18581 18581 F DEBUG   :       #00 pc 00000000018108d4  /vendor/lib64/egl/libGLES_mali.so (cmpbep_node_get_child+20) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #01 pc 0000000001712a14  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::GetMappedChild(cmpbe_node const*, int)+24) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #02 pc 00000000017275ec  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::convert_ld_attr(cmpbe_node const*)+484) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #03 pc 0000000001713628  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::ConvertNodeInternal(cmpbe_node const*)+116) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #04 pc 0000000001714e68  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::TraverseBBs(_tag_mempool*, cmpbe_bb*, bool)+332) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #05 pc 0000000001715a78  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::ConvertFunction(cmpbe_function*, cmpbep_attribs*)+1052) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #06 pc 0000000001716430  /vendor/lib64/egl/libGLES_mali.so (LIR2LLVMConverter::DoConvert()+636) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #07 pc 00000000017169a0  /vendor/lib64/egl/libGLES_mali.so (lir2llvm(cmpbep_pass_manager_context*)+136) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #08 pc 00000000017e52f4  /vendor/lib64/egl/libGLES_mali.so (cmpbep_run_pass+320) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #09 pc 00000000017e5408  /vendor/lib64/egl/libGLES_mali.so (cmpbep_run_pass_sequence+64) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #10 pc 0000000001711540  /vendor/lib64/egl/libGLES_mali.so (cmpbe_compile_gles_shader+484) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #11 pc 0000000001738ef0  /vendor/lib64/egl/libGLES_mali.so (do_single_part2_compilation+204) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #12 pc 000000000173890c  /vendor/lib64/egl/libGLES_mali.so (cmpbe_v2_compile_multiple_shaders+6072) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.535 18581 18581 F DEBUG   :       #13 pc 00000000015d1f78  /vendor/lib64/egl/libGLES_mali.so (gfx::compiler::compile_shaders(gfx::shader_set const&, gfx::shader_set&, hal::shader_language, gfx::shader_state const&, gfx::pipeline_cache*, gfx::mem_allocator&, bool*, unsigned long*)+6536) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.536 18581 18581 F DEBUG   :       #14 pc 000000000077811c  /vendor/lib64/egl/libGLES_mali.so (vulkan::graphics_pipeline::init(vulkan::device*, VkGraphicsPipelineCreateInfo const&, gfx::host_mem_allocator const&, gfx::host_mem_allocator&)+7992) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.536 18581 18581 F DEBUG   :       #15 pc 0000000000776100  /vendor/lib64/egl/libGLES_mali.so (vkCreateGraphicsPipelines+540) (BuildId: 6ee02575d06e4ab1887c2e4c9f5e690b)
12-18 08:31:50.536 18581 18581 F DEBUG   :       #16 pc 0000000000d34bf4  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #17 pc 0000000000ce15fc  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #18 pc 0000000000ce4624  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #19 pc 0000000000ce3638  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #20 pc 0000000000bd8a5c  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #21 pc 0000000000bd99c0  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #22 pc 00000000007cdec0  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #23 pc 00000000007e0d9c  /data/data/com.termux/files/usr/lib/libgallium-24.2.8.so
12-18 08:31:50.536 18581 18581 F DEBUG   :       #24 pc 00000000000ef678  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: ae97b4676db8ce3f620ba6bf7932eba6)
12-18 08:31:50.536 18581 18581 F DEBUG   :       #25 pc 000000000008c30c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ae97b4676db8ce3f620ba6bf7932eba6)
12-18 08:31:50.548 18581 18581 E crash_dump64: AM data write failed: Broken pipe

@twaik
Copy link
Member

twaik commented Dec 18, 2024

Works fine on Redmi Note 8 too.

~ $ vkcube
Selected WSI platform: xcb
Selected GPU 0: Adreno (TM) 610, type: IntegratedGpu
^C
~ $ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x5143
    Device ID:      0x6010000
    Device Name:    Adreno (TM) 610
    Driver Version: 2149539840
    Device UUID:    f8273e00435100000000000001060000
=======================================================
[vertex] device-local=true: FPS: 541 FrameTime: 1.848 ms
[vertex] device-local=false: FPS: 594 FrameTime: 1.684 ms
[texture] anisotropy=0: FPS: 573 FrameTime: 1.745 ms
[texture] anisotropy=16: FPS: 640 FrameTime: 1.562 ms
[shading] shading=gouraud: FPS: 748 FrameTime: 1.337 ms
[shading] shading=blinn-phong-inf: FPS: 572 FrameTime: 1.748 ms
[shading] shading=phong: FPS: 475 FrameTime: 2.105 ms
[shading] shading=cel: FPS: 524 FrameTime: 1.908 ms
[effect2d] kernel=edge: FPS: 455 FrameTime: 2.198 ms
[effect2d] kernel=blur: FPS: 301 FrameTime: 3.322 ms
[desktop] <default>: FPS: 544 FrameTime: 1.838 ms
[cube] <default>: FPS: 635 FrameTime: 1.575 ms
[clear] <default>: FPS: 647 FrameTime: 1.546 ms
=======================================================
                                   vkmark Score: 557
=======================================================

For some reason glxgears and glmark2 (Zink) do not start with

../src/src/util/xmlconfig.c:1266: unsigned char driQueryOptionb(const driOptionCache *, const char *): assertion "cache->info[i].name != NULL" failed

Any suggestions how to fix it?

@xMeM
Copy link
Contributor Author

xMeM commented Dec 18, 2024

@twaik Set the MESA_LOADER_DRIVER_OVERRIDE=zink environment variable.

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.

10 participants