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 1 commit 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

@Xtr126
Copy link

Xtr126 commented Dec 11, 2024

Even though the blacklist was removed it does not work on x86_64:

 ~ $ termux-x11 -xstartup vkcube
Selected WSI platform: xcb
12183 killed by signal 11

vulkaninfo and glxgears with zink works fine somehow.

@hansm629
Copy link

@xMeM
In the latest version, virpipe does not work with OpenGL. (Segmentation fault)
but OpenGL ES works.

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2
Segmentation fault

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2-es2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    virgl (ANGLE (Samsung Electronics Co. Ltd., Vulkan 1.3.264 ...)
    GL_VERSION:     OpenGL ES 3.2 Mesa 24.3.1
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 119 FrameTime: 8.458 ms
=======================================================
                                  glmark2 Score: 118 
=======================================================

@George-Seven
Copy link

George-Seven commented Dec 27, 2024

I'm getting this error logs with mesa-vulkan-icd-wrapper_24.3.1-4_aarch64.deb -

Enabled instance extensions:
- VK_KHR_surface
- VK_KHR_xlib_surface
- VK_KHR_get_physical_device_properties2
- VK_KHR_external_semaphore_capabilities
- VK_KHR_external_memory_capabilities
Available physical devices:
- Adreno (TM) 750
Selected physical device: Adreno (TM) 750
- Vendor: 5143, Device: 43051401
- Driver Version: 512.744.12
Warning: extension not available: VK_EXT_memory_budget
Enabled device extensions:
- VK_KHR_external_semaphore
- VK_KHR_external_memory
- VK_KHR_external_memory_fd
- VK_KHR_external_semaphore_fd
- VK_EXT_custom_border_color
- VK_EXT_provoking_vertex
VUID-VkMemoryAllocateInfo-pNext-00639(ERROR / SPEC): msgNum: -49292556 - Validation Error: [ VUID-VkMemoryAllocateInfo-pNext-00639 ] Object 0: handle = 0x8b600000008b6, type = VK_OBJECT_TYPE_IMAGE; Object 1: handle = 0x8b700000008b7, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xfd0fdaf4 | vkBindImageMemory(): memory (VkDeviceMemory 0x8b700000008b7[]) has VkExportMemoryAllocateInfo::handleTypes with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT flag set, which requires dedicated allocation for the image created with format (VK_FORMAT_R8G8B8A8_UNORM), type (VK_IMAGE_TYPE_2D), tiling (VK_IMAGE_TILING_LINEAR), usage (VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT), flags (VkImageCreateFlags(0)), but the memory is allocated without dedicated allocation support.
The Vulkan spec states: If the pNext chain includes a VkExportMemoryAllocateInfo structure, and any of the handle types specified in VkExportMemoryAllocateInfo::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 in VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures, or by vkGetPhysicalDeviceExternalBufferProperties in VkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures, the pNext chain must include a VkMemoryDedicatedAllocateInfo or VkDedicatedAllocationMemoryAllocateInfoNV structure with either its image or buffer member set to a value other than VK_NULL_HANDLE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00639)
    Objects: 2
        [0] 0x8b600000008b6, type: 10, name: NULL
        [1] 0x8b700000008b7, type: 8, name: NULL

Is it possible to have VK_EXT_memory_budget extension?

@TomJo2000
Copy link
Member

I've compiled Xemu Xbox emulator for Termux and it's working normally but slowly with llvmpipe.

I'm trying to use Vulkan backend.

But it is giving error logs with mesa-vulkan-icd-wrapper_24.3.1-4_aarch64.deb -

https://github.com/George-Seven/Termux-XEMU?tab=readme-ov-file#vulkan-backend-attempts

I would like to point out for the record that it would have been infinitely easier to just throw all that stuff into a build.sh and a couple patches.
Packages don't need to work perfectly from the initial state of the PR, they can be worked on iteratively.
In this current state we can not vouch for or condone this xemu package.

@George-Seven
Copy link

I would like to point out for the record that it would have been infinitely easier to just throw all that stuff into a build.sh and a couple patches. Packages don't need to work perfectly from the initial state of the PR, they can be worked on iteratively. In this current state we can not vouch for or condone this xemu package.

You're right, I didn't think of implementing Termux package build system. Meanwhile, I've removed irrelevant details from the comment to reflect only errors related to the driver.

@hansm629
Copy link

hansm629 commented Jan 4, 2025

@xMeM
Hello Sir
Could you please tell me when the next pull request build will be?
It seems like most of the issues are minor, so I think it will be perfect once they are all resolved.
:)

@sabamdarif
Copy link

i think it already perfect, i am just waiting when it will be merged, also most of the errors are related to opengl where this wrapper for vulkan ?

@TomJo2000
Copy link
Member

i think it already perfect, i am just waiting when it will be merged, also most of the errors are related to opengl where this wrapper for vulkan ?

If and when a PR is merged is up to the author and the maintainers that are handling a given PR.
If you don't want to wait for that you can always run the CI artifacts of the package(s).

@hansm629
Copy link

hansm629 commented Jan 4, 2025

@sabamdarif
There is still an issue. It does not work with virpipe and in some cases it outputs an error message.

@sabamdarif
Copy link

sabamdarif commented Jan 4, 2025

If and when a PR is merged is up to the author and the maintainers that are handling a given PR. If you don't want to wait for that you can always run the CI artifacts of the package(s).

I know, 😆 I think you understand it wrong, I say I am waiting it to get merged, it's really good than what termux currently have, if it get merged then I don't have to check for update in the pr section, that's what I mean

@hansm629
Copy link

hansm629 commented Jan 6, 2025

@xMeM
Here is a list of currently confirmed issues.

1. When resizing vulkan demo & zink demo, the following message is displayed

../src/src/vulkan/wsi/wsi_common_x11.c:1929: Swapchain status changed to VK_SUBOPTIMAL_KHR

2. When the glmark2 benchmark is completed, the following message is displayed

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

3. Cannot be used with LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe (but OpenGL ES works ex: glmark2-es2)

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2
Segmentation fault

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2-es2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    virgl (ANGLE (Samsung Electronics Co. Ltd., Vulkan 1.3.264 ...)
    GL_VERSION:     OpenGL ES 3.2 Mesa 24.3.1
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 119 FrameTime: 8.458 ms
=======================================================
                                  glmark2 Score: 118 
=======================================================

4. Is it possible to add an environment variable similar to MESA_VK_WSI_DEBUG=nosync?

@hansm629
Copy link

hansm629 commented Jan 7, 2025

@xMeM
Thank you!
Almost all issues are fixed!

But it still seems that virpipe(OpenGL) does not work at the same time.

XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :1.0 & > /dev/null 2>&1
sleep 1

am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity > /dev/null 2>&1
sleep 1

virgl_test_server_android --angle-vulkan & > /dev/null 2>&1

env DISPLAY=:1.0 MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink  dbus-launch --exit-with-session xfce4-session & > /dev/null 2>&1

After booting XFCE4 with zink as above

When running virpipe with the command below, OpenGL does not work and only OpenGL ES works.

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2
Segmentation fault

~$ LIBGL_KOPPER_DISABLE=1 GALLIUM_DRIVER=virpipe glmark2-es2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    virgl (ANGLE (Samsung Electronics Co. Ltd., Vulkan 1.3.264 ...)
    GL_VERSION:     OpenGL ES 3.1 Mesa 24.3.1
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 141 FrameTime: 7.135 ms
=======================================================
                                  glmark2 Score: 140 

@sabamdarif
Copy link

sabamdarif commented Jan 7, 2025

@xMeM, sorry for bothering you but the latest driver doesn't working on mali g76, working fine before

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:[1]    16272 segmentation fault  vkmark
Log
01-07 19:42:47.483 21598 21598 W logcat  : type=1400 audit(0.0:26364): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="dm-32" ino=655548 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26365): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26366): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26367): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26368): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:43:07.602 23186 23208 W Parcel  : Expecting binder but got null!
01-07 19:43:10.067 25693 25693 W zsh     : type=1400 audit(0.0:26375): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26376): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26377): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26378): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W vkmark  : type=1400 audit(0.0:26379): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.092 27437 27480 I GED     : [GT]_get_procNameprocess pid(27437)
01-07 19:43:10.092 27437 27480 I GED     : [GT]_getprocess name(/system/bin/app_process)
01-07 19:43:10.093 27437 27480 I app_process: [GT] ret(1) gt_status(00000000) aniso_debug_level(0) gt_aniso_max_level(16) ani so mask(00000001) tri mask(00000002)
01-07 19:43:10.096 27437 27480 I GED     : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0
01-07 19:43:10.100 27437 27499 D gles-renderer: renderer: buffer changed 0xb400006f705b2b70 0 0
01-07 19:43:10.162 22306 22306 D PQCommon: [PQ_PROT] [PQCust] libpq_cust_base.so OK, libpq_cust.so absent
01-07 19:43:10.191 22306 22306 I Gralloc4: Adding additional valid usage bits: 0x0
01-07 19:43:10.192 22306 22306 E ion     : ioctl c0044901 failed with code -1: Invalid argument
01-07 19:43:10.230 22306 22306 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 22306 (vkmark), pid 22306 (vkmark)
01-07 19:43:10.249 22323 22323 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
01-07 19:43:10.251 22323 22323 I crash_dump64: performing dump of process 22306 (target tid = 22306)
01-07 19:43:10.283 22323 22323 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-07 19:43:10.283 22323 22323 F DEBUG   : Build fingerprint: 'realme/RMX3085/RMX3085L1:12/SP1A.210812.016/R.GDPR.11887c9-1:user/release-keys'
01-07 19:43:10.283 22323 22323 F DEBUG   : Revision: '0'
01-07 19:43:10.283 22323 22323 F DEBUG   : ABI: 'arm64'
01-07 19:43:10.283 22323 22323 F DEBUG   : Timestamp: 2025-01-07 19:43:10.253407427+0530
01-07 19:43:10.283 22323 22323 F DEBUG   : Process uptime: 1s
01-07 19:43:10.283 22323 22323 F DEBUG   : Cmdline: vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   : pid: 22306, tid: 22306, name: vkmark  >>> vkmark <<<
01-07 19:43:10.283 22323 22323 F DEBUG   : uid: 10518
01-07 19:43:10.283 22323 22323 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   : Cause: null pointer dereference
01-07 19:43:10.283 22323 22323 F DEBUG   :     x0  0000000000000001  x1  0000000000000001  x2  0000007fc6b67480  x3  0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   :     x4  0000007fc6b675a8  x5  0000007fc6b674c8  x6  0000007fc6b674d0  x7  0000007fc6b67234
01-07 19:43:10.283 22323 22323 F DEBUG   :     x8  0000000001000000  x9  00000074983d8828  x10 0000000000008000  x11 0000000000000001
01-07 19:43:10.283 22323 22323 F DEBUG   :     x12 000000002fc1bc18  x13 0000000000000008  x14 00000000ffffffff  x15 0000000000000005
01-07 19:43:10.283 22323 22323 F DEBUG   :     x16 00000074983d7728  x17 000000772fded178  x18 0000007734db4000  x19 0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   :     x20 0000007fc6b67480  x21 0000000000000001  x22 0000000000000000  x23 0000007fc6b67480
01-07 19:43:10.283 22323 22323 F DEBUG   :     x24 b40000752fc1bc10  x25 0000007fc6b67480  x26 0000007fc6b67560  x27 0000000000000001
01-07 19:43:10.283 22323 22323 F DEBUG   :     x28 0000000000000048  x29 0000007fc6b67450
01-07 19:43:10.283 22323 22323 F DEBUG   :     lr  0000007497e65608  sp  0000007fc6b67450  pc  0000007497e6560c  pst 0000000060001000
01-07 19:43:10.283 22323 22323 F DEBUG   : backtrace:
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: Function names and BuildId information is missing for some frames due
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: found under the lib/ directory are readable.
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: On this device, run setenforce 0 to make the libraries readable.
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: Unreadable libraries:
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
01-07 19:43:10.283 22323 22323 F DEBUG   :       #00 pc 000000000001e60c  /system/lib64/libvulkan.so (vulkan::driver::QueueSubmit(VkQueue_T*, unsigned int, VkSubmitInfo const*, VkFence_T*)+40) (BuildId: 0e0ef8537782565fd16b7f0ce6ef0046)
01-07 19:43:10.283 22323 22323 F DEBUG   :       #01 pc 00000000001a5dfc  /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
01-07 19:43:10.283 22323 22323 F DEBUG   :       #02 pc 0000000000052aa0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #03 pc 00000000000514c0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #04 pc 000000000004856c  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #05 pc 00000000000783b0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #06 pc 000000000007815c  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #07 pc 000000000007edc0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #08 pc 0000000000042a64  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #09 pc 000000000004b13c  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 086e70f1671d5268d060cdf12f12a59a)
01-07 19:43:10.312 27437 27480 I GED     : [GT]_get_procNameprocess pid(27437)
01-07 19:43:10.313 27437 27480 I GED     : [GT]_getprocess name(/system/bin/app_process)
01-07 19:43:10.313 27437 27480 I app_process: [GT] ret(1) gt_status(00000000) aniso_debug_level(0) gt_aniso_max_level(16) ani so mask(00000001) tri mask(00000002)
01-07 19:43:10.314 27437 27480 I GED     : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0
01-07 19:43:10.321 27437 27499 D gles-renderer: renderer: buffer changed 0xb400006f705b4650 0 0
01-07 19:43:11.448 23186 23208 W Parcel  : Expecting binder but got null!
Log
vkmark                                        
INFO:              Vulkan Loader Version 1.4.304
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              No valid vk_loader_settings.json file found, no loader settings will be active
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_ENABLE
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_DISABLE
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_ALLOW
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_IMPLICIT_LAYER_PATH
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_IMPLICIT_LAYER_PATH
LAYER:             Searching for implicit layer manifest files
LAYER:                In following locations:
LAYER:                   /data/data/com.termux/files/home/.config/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/xdg/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/home/.local/share/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/share/vulkan/implicit_layer.d
LAYER:                Found no files
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_LAYER_PATH
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_LAYER_PATH
LAYER:             Searching for explicit layer manifest files
LAYER:                In following locations:
LAYER:                   /data/data/com.termux/files/home/.config/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/xdg/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/home/.local/share/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/share/vulkan/explicit_layer.d
LAYER:                Found no files
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_DRIVERS_SELECT
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_DRIVERS_DISABLE
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_DRIVER_FILES
INFO:              Loader is using non-secure environment variable lookup for VK_ICD_FILENAMES
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_DRIVER_FILES
DRIVER:            Searching for driver manifest files
DRIVER:               In following locations:
DRIVER:                  /data/data/com.termux/files/home/.config/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/etc/xdg/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/etc/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/home/.local/share/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/share/vulkan/icd.d
DRIVER:               Found the following files:
DRIVER:                  /data/data/com.termux/files/usr/share/vulkan/icd.d/wrapper_icd.aarch64.json
DRIVER:            Found ICD manifest file /data/data/com.termux/files/usr/share/vulkan/icd.d/wrapper_icd.aarch64.json, version 1.0.0
DEBUG | DRIVER:    Searching for ICD drivers named /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
WARNING | LAYER:   env var 'VK_INSTANCE_LAYERS' defined and adding layers "VK_LAYER_KHRONOS_validation"
ERROR | LAYER:     Layer "VK_LAYER_KHRONOS_validation" was not found but was requested by env var VK_INSTANCE_LAYERS!
WARNING | LAYER:   env var 'VK_INSTANCE_LAYERS' defined and adding layers "VK_LAYER_KHRONOS_validation"
ERROR | LAYER:     Layer "VK_LAYER_KHRONOS_validation" was not found but was requested by env var VK_INSTANCE_LAYERS!
LAYER:             vkCreateInstance layer callstack setup to:
LAYER:                <Application>
LAYER:                  ||
LAYER:                <Loader>
LAYER:                  ||
LAYER:                <Drivers>
INFO | DRIVER:     linux_read_sorted_physical_devices:
INFO | DRIVER:          Original order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:          Sorted order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:     linux_read_sorted_physical_devices:
INFO | DRIVER:          Original order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:          Sorted order:
INFO | DRIVER:                [0] Mali-G76 MC4
DEBUG | DRIVER:    Copying old device 0 into new device 0
DRIVER | LAYER:    vkCreateDevice layer callstack setup to:
DRIVER | LAYER:       <Application>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Loader>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Device>
DRIVER | LAYER:           Using "Mali-G76 MC4" with driver: "/data/data/com.termux/files/usr/lib/libvulkan_wrapper.so"
Unsupported MESA_VK_WSI_PRESENT_MODE value!
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x13B5
    Device ID:      0x72110000
    Device Name:    Mali-G76 MC4
    Driver Version: 109051904
    Device UUID:    ba510acd8d9038a7a29282d5780482e5
=======================================================
[vertex] device-local=true:[2]    4686 segmentation fault  vkmark

@sabamdarif
Copy link

sabamdarif commented Jan 7, 2025

by the way @hansm629 virpipe(OpenGL) working for me, both glmark2 and glmark2-es2 and it was working before too

@hansm629
Copy link

hansm629 commented Jan 7, 2025

@sabamdarif
When booting XFCE4 with the MESA_LOADER_DRIVER_OVERRIDE=zink environment variable, virpipe(OpenGL) does not work.

@sabamdarif
Copy link

@sabamdarif When booting XFCE4 with the MESA_LOADER_DRIVER_OVERRIDE=zink environment variable, virpipe(OpenGL) does not work.

zink never work for me because of compatibility issue between proprietary driver so i will never know

@hansm629
Copy link

hansm629 commented Jan 7, 2025

@sabamdarif
Xclipse GPU series is almost the only Android GPU that works at a level where zink is available.

  • glmark2 & glmark2-es2 benchmarks can be completed
  • No GUI bugs when using XFCE4

@olegos2
Copy link

olegos2 commented Jan 9, 2025

@xMeM I found two issues with wrapper on my Qualcomm Kona when trying to use custom proprietary driver (v615, v786):

  1. On SD865 newer driver from Quest 2 reports VK_KHR_timeline_semaphore as present, but it doesn't really work and any attempt to initialize a window with vulkan in wine causes crash.
  2. Not only on SD865 but on most Qualcomm android SoCs with newer driver extension VK_EXT_float_controls is reported as present, but also has problems, and dxvk newer than 1.7.3 crashes, since it tries to utilize that extension.
    Can you add some way to force hide these extensions?

@olegos2
Copy link

olegos2 commented Jan 10, 2025

And also Qualcomm v615 driver does not have multiViewport feature, but faking it in qgl_config.txt seems to work well with any dxvk, could also be added to wrapper.

@hansm629
Copy link

@xMeM
In the latest version,
textureCompressionBC is showing as false.

Can you please change it back to true?

Screenshot_2025-01-27_02-26-30

@hansm629
Copy link

hansm629 commented Feb 5, 2025

@xMeM
Hello Sir :)
When will the next package update be?

There seem to be 2 remaining issues:

  • textureCompressionBC -> false
  • Cannot use virpipe simultaneously when running XFCE4 session with zink

@paulowesll
Copy link

paulowesll commented Feb 5, 2025

@xMeM Hello Sir :) When will the next package update be?

There seem to be 2 remaining issues:

  • textureCompressionBC -> false
  • Cannot use virpipe simultaneously when running XFCE4 session with zink

New builds you need to define WRAPPER_DEBUG=bc,placed to have it working

@hansm629
Copy link

hansm629 commented Feb 5, 2025

@paulowesll
Thank you! It worked!

@sabamdarif
Copy link

sabamdarif commented Feb 5, 2025

@paulowesll do you have any idea how can i fix this issue it's happened in the latest build, before that it's working fine

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:[1]    16272 segmentation fault  vkmark
Log
01-07 19:42:47.483 21598 21598 W logcat  : type=1400 audit(0.0:26364): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="dm-32" ino=655548 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26365): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26366): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26367): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:42:47.487 21598 21598 W logcat  : type=1400 audit(0.0:26368): avc: denied { search } for name="tests" dev="dm-32" ino=122 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.termux
01-07 19:43:07.602 23186 23208 W Parcel  : Expecting binder but got null!
01-07 19:43:10.067 25693 25693 W zsh     : type=1400 audit(0.0:26375): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26376): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26377): avc: granted { execute } for name="vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W zsh     : type=1400 audit(0.0:26378): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.067 22306 22306 W vkmark  : type=1400 audit(0.0:26379): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/vkmark" dev="dm-32" ino=843871 scontext=u:r:untrusted_app_27:s0:c6,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c258,c512,c768 tclass=file app=com.termux
01-07 19:43:10.092 27437 27480 I GED     : [GT]_get_procNameprocess pid(27437)
01-07 19:43:10.092 27437 27480 I GED     : [GT]_getprocess name(/system/bin/app_process)
01-07 19:43:10.093 27437 27480 I app_process: [GT] ret(1) gt_status(00000000) aniso_debug_level(0) gt_aniso_max_level(16) ani so mask(00000001) tri mask(00000002)
01-07 19:43:10.096 27437 27480 I GED     : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0
01-07 19:43:10.100 27437 27499 D gles-renderer: renderer: buffer changed 0xb400006f705b2b70 0 0
01-07 19:43:10.162 22306 22306 D PQCommon: [PQ_PROT] [PQCust] libpq_cust_base.so OK, libpq_cust.so absent
01-07 19:43:10.191 22306 22306 I Gralloc4: Adding additional valid usage bits: 0x0
01-07 19:43:10.192 22306 22306 E ion     : ioctl c0044901 failed with code -1: Invalid argument
01-07 19:43:10.230 22306 22306 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 22306 (vkmark), pid 22306 (vkmark)
01-07 19:43:10.249 22323 22323 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
01-07 19:43:10.251 22323 22323 I crash_dump64: performing dump of process 22306 (target tid = 22306)
01-07 19:43:10.283 22323 22323 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-07 19:43:10.283 22323 22323 F DEBUG   : Build fingerprint: 'realme/RMX3085/RMX3085L1:12/SP1A.210812.016/R.GDPR.11887c9-1:user/release-keys'
01-07 19:43:10.283 22323 22323 F DEBUG   : Revision: '0'
01-07 19:43:10.283 22323 22323 F DEBUG   : ABI: 'arm64'
01-07 19:43:10.283 22323 22323 F DEBUG   : Timestamp: 2025-01-07 19:43:10.253407427+0530
01-07 19:43:10.283 22323 22323 F DEBUG   : Process uptime: 1s
01-07 19:43:10.283 22323 22323 F DEBUG   : Cmdline: vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   : pid: 22306, tid: 22306, name: vkmark  >>> vkmark <<<
01-07 19:43:10.283 22323 22323 F DEBUG   : uid: 10518
01-07 19:43:10.283 22323 22323 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   : Cause: null pointer dereference
01-07 19:43:10.283 22323 22323 F DEBUG   :     x0  0000000000000001  x1  0000000000000001  x2  0000007fc6b67480  x3  0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   :     x4  0000007fc6b675a8  x5  0000007fc6b674c8  x6  0000007fc6b674d0  x7  0000007fc6b67234
01-07 19:43:10.283 22323 22323 F DEBUG   :     x8  0000000001000000  x9  00000074983d8828  x10 0000000000008000  x11 0000000000000001
01-07 19:43:10.283 22323 22323 F DEBUG   :     x12 000000002fc1bc18  x13 0000000000000008  x14 00000000ffffffff  x15 0000000000000005
01-07 19:43:10.283 22323 22323 F DEBUG   :     x16 00000074983d7728  x17 000000772fded178  x18 0000007734db4000  x19 0000000000000000
01-07 19:43:10.283 22323 22323 F DEBUG   :     x20 0000007fc6b67480  x21 0000000000000001  x22 0000000000000000  x23 0000007fc6b67480
01-07 19:43:10.283 22323 22323 F DEBUG   :     x24 b40000752fc1bc10  x25 0000007fc6b67480  x26 0000007fc6b67560  x27 0000000000000001
01-07 19:43:10.283 22323 22323 F DEBUG   :     x28 0000000000000048  x29 0000007fc6b67450
01-07 19:43:10.283 22323 22323 F DEBUG   :     lr  0000007497e65608  sp  0000007fc6b67450  pc  0000007497e6560c  pst 0000000060001000
01-07 19:43:10.283 22323 22323 F DEBUG   : backtrace:
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: Function names and BuildId information is missing for some frames due
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: found under the lib/ directory are readable.
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: On this device, run setenforce 0 to make the libraries readable.
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE: Unreadable libraries:
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :   NOTE:   /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
01-07 19:43:10.283 22323 22323 F DEBUG   :       #00 pc 000000000001e60c  /system/lib64/libvulkan.so (vulkan::driver::QueueSubmit(VkQueue_T*, unsigned int, VkSubmitInfo const*, VkFence_T*)+40) (BuildId: 0e0ef8537782565fd16b7f0ce6ef0046)
01-07 19:43:10.283 22323 22323 F DEBUG   :       #01 pc 00000000001a5dfc  /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
01-07 19:43:10.283 22323 22323 F DEBUG   :       #02 pc 0000000000052aa0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #03 pc 00000000000514c0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #04 pc 000000000004856c  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #05 pc 00000000000783b0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #06 pc 000000000007815c  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #07 pc 000000000007edc0  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #08 pc 0000000000042a64  /data/data/com.termux/files/usr/bin/vkmark
01-07 19:43:10.283 22323 22323 F DEBUG   :       #09 pc 000000000004b13c  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 086e70f1671d5268d060cdf12f12a59a)
01-07 19:43:10.312 27437 27480 I GED     : [GT]_get_procNameprocess pid(27437)
01-07 19:43:10.313 27437 27480 I GED     : [GT]_getprocess name(/system/bin/app_process)
01-07 19:43:10.313 27437 27480 I app_process: [GT] ret(1) gt_status(00000000) aniso_debug_level(0) gt_aniso_max_level(16) ani so mask(00000001) tri mask(00000002)
01-07 19:43:10.314 27437 27480 I GED     : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0
01-07 19:43:10.321 27437 27499 D gles-renderer: renderer: buffer changed 0xb400006f705b4650 0 0
01-07 19:43:11.448 23186 23208 W Parcel  : Expecting binder but got null!
Log
vkmark                                        
INFO:              Vulkan Loader Version 1.4.304
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              No valid vk_loader_settings.json file found, no loader settings will be active
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_ENABLE
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_DISABLE
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_LAYERS_ALLOW
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_IMPLICIT_LAYER_PATH
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_IMPLICIT_LAYER_PATH
LAYER:             Searching for implicit layer manifest files
LAYER:                In following locations:
LAYER:                   /data/data/com.termux/files/home/.config/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/xdg/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/home/.local/share/vulkan/implicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/share/vulkan/implicit_layer.d
LAYER:                Found no files
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_LAYER_PATH
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_LAYER_PATH
LAYER:             Searching for explicit layer manifest files
LAYER:                In following locations:
LAYER:                   /data/data/com.termux/files/home/.config/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/xdg/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/etc/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/home/.local/share/vulkan/explicit_layer.d
LAYER:                   /data/data/com.termux/files/usr/share/vulkan/explicit_layer.d
LAYER:                Found no files
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_DRIVERS_SELECT
INFO:              Loader is using non-secure environment variable lookup for VK_LOADER_DRIVERS_DISABLE
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_CONFIG_DIRS
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_HOME
INFO:              Loader is using non-secure environment variable lookup for XDG_DATA_DIRS
INFO:              Loader is using non-secure environment variable lookup for HOME
INFO:              Loader is using non-secure environment variable lookup for VK_DRIVER_FILES
INFO:              Loader is using non-secure environment variable lookup for VK_ICD_FILENAMES
INFO:              Loader is using non-secure environment variable lookup for VK_ADD_DRIVER_FILES
DRIVER:            Searching for driver manifest files
DRIVER:               In following locations:
DRIVER:                  /data/data/com.termux/files/home/.config/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/etc/xdg/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/etc/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/home/.local/share/vulkan/icd.d
DRIVER:                  /data/data/com.termux/files/usr/share/vulkan/icd.d
DRIVER:               Found the following files:
DRIVER:                  /data/data/com.termux/files/usr/share/vulkan/icd.d/wrapper_icd.aarch64.json
DRIVER:            Found ICD manifest file /data/data/com.termux/files/usr/share/vulkan/icd.d/wrapper_icd.aarch64.json, version 1.0.0
DEBUG | DRIVER:    Searching for ICD drivers named /data/data/com.termux/files/usr/lib/libvulkan_wrapper.so
WARNING | LAYER:   env var 'VK_INSTANCE_LAYERS' defined and adding layers "VK_LAYER_KHRONOS_validation"
ERROR | LAYER:     Layer "VK_LAYER_KHRONOS_validation" was not found but was requested by env var VK_INSTANCE_LAYERS!
WARNING | LAYER:   env var 'VK_INSTANCE_LAYERS' defined and adding layers "VK_LAYER_KHRONOS_validation"
ERROR | LAYER:     Layer "VK_LAYER_KHRONOS_validation" was not found but was requested by env var VK_INSTANCE_LAYERS!
LAYER:             vkCreateInstance layer callstack setup to:
LAYER:                <Application>
LAYER:                  ||
LAYER:                <Loader>
LAYER:                  ||
LAYER:                <Drivers>
INFO | DRIVER:     linux_read_sorted_physical_devices:
INFO | DRIVER:          Original order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:          Sorted order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:     linux_read_sorted_physical_devices:
INFO | DRIVER:          Original order:
INFO | DRIVER:                [0] Mali-G76 MC4
INFO | DRIVER:          Sorted order:
INFO | DRIVER:                [0] Mali-G76 MC4
DEBUG | DRIVER:    Copying old device 0 into new device 0
DRIVER | LAYER:    vkCreateDevice layer callstack setup to:
DRIVER | LAYER:       <Application>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Loader>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Device>
DRIVER | LAYER:           Using "Mali-G76 MC4" with driver: "/data/data/com.termux/files/usr/lib/libvulkan_wrapper.so"
Unsupported MESA_VK_WSI_PRESENT_MODE value!
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x13B5
    Device ID:      0x72110000
    Device Name:    Mali-G76 MC4
    Driver Version: 109051904
    Device UUID:    ba510acd8d9038a7a29282d5780482e5
=======================================================
[vertex] device-local=true:[2]    4686 segmentation fault  vkmark

@sabamdarif
Copy link

@paulowesll do you have any idea how can i fix this issue it's happened in the latest build, before that it's working fine

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:[1]    16272 segmentation fault  vkmark

Log

Log

fixed now and the performance mean the fps is feel higher, although not that much from 800-1000 to 1353-1500

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.