termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.98k stars 2.98k forks source link

[Package]: Vulkan WSI Layer for using system vulkan driver #19460

Open chaitan3 opened 6 months ago

chaitan3 commented 6 months ago

Why is it worth to add this package?

The vulkan-wsi-layer package along with the sysvk vulkan driver allows for using the vulkan driver from the system with termux-x11. I haven't personally tested it, but from the repo, the author claims it is working quite well for vkcube and vkmark.

Home page URL

No response

Source code URL

https://github.com/xMeM/vulkan-wsi-layer

Packaging policy acknowledgement

Additional information

Link to sysvk driver: https://github.com/xMeM/sysvk

licy183 commented 6 months ago

Yeah, I've tested locally and confirmed that it works for vkcube and vkmark, but it gives a strange FPS.

The debs can be downloaded from the workflow linked with https://github.com/termux/termux-packages/tree/dev/sysvk.

Ping @xMeM @twaik

twaik commented 6 months ago

AFAIK it uses the same DRI3 mechanism as turnip (patched by xMeM).

xMeM commented 6 months ago

My WSI implementation is bad, I suggest trying virglrenderer venus before someone implements it correctly.

I have some patches to make Venus work on Adreno GPU (but not with zink yet), and this documentation says Venus supports mali GPU.

twaik commented 6 months ago

My WSI implementation is bad

Even if it is bad, currently it is the best option now. Probably because it is the only option (DRI3 capable one).

chaitan3 commented 6 months ago

Thanks, just tested vulkan-wsi-layer and the fps is indeed wonky for vkcube, but vkmark is fine. Also, zink does not work. This is on Mali GPU.

I agree with twaik, this is the best we have for phones with Mali GPU. If venus is better than this package, then maybe it can be officially packaged instead?

hansm629 commented 5 months ago

@licy183 hello. In Termux native XFCE environment (host device: Galaxy S24+ Exynos2400) I want to test the WSI Layer.

Where can I download related packages?

https://packages-cf.termux.dev/apt/termux-main Can I download it from the repo above?

vulkan-loader-generic vulkan-header

Is it correct to install two packages?

I am wondering if there is anything that needs to be set separately after that. What are the environment variables used with zink?

licy183 commented 5 months ago

You can download the deb files in https://github.com/termux/termux-packages/actions/runs/8245027247.

IIRC it doesn't work with zink.

hansm629 commented 5 months ago

@licy183

It works very well! When combined with mesa zink

glmark2 (OpenGL4.6) and glmark2-es2 (OpenGL ES3.2) are around 650 to 800 FPS. Screenshot_2024-03-30_21-09-53 Screenshot_2024-03-30_21-10-51 Screenshot_2024-03-30_21-13-40

vkcube also ran well.

However, although the frames (3800~4300FPS) come out fine in vkmark, artifacts occur. looks like the early turnip dri3 patch v1.

Screenshot_2024-03-30_21-18-41

If only this part is improved and only VK_KHR_xlib_surface is supported, it will be perfect!

Trass3r commented 5 months ago

You can download the deb files in https://github.com/termux/termux-packages/actions/runs/8245027247.

Crashes for me.

$ vkcube
Selected GPU 0: Mali-G715-Immortalis MC11, type: IntegratedGpu
MIT-SHM enabled.
Present enabled.
present mode fifo.
create swapchain.
format: 44
HardwareBuffer alloc success.
Segmentation fault
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000007f750d2514 in wsi_layer_vkGetSwapchainImagesKHR ()
from /data/data/com.termux/files/usr/share/vulkan/implicit_layer.d/libVkLayer_window_system_integration.so
twaik commented 5 months ago

@xMeM?

xMeM commented 5 months ago

You can download the deb files in https://github.com/termux/termux-packages/actions/runs/8245027247.

Crashes for me.

$ vkcube
Selected GPU 0: Mali-G715-Immortalis MC11, type: IntegratedGpu
MIT-SHM enabled.
Present enabled.
present mode fifo.
create swapchain.
format: 44
HardwareBuffer alloc success.
Segmentation fault
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000007f750d2514 in wsi_layer_vkGetSwapchainImagesKHR ()
from /data/data/com.termux/files/usr/share/vulkan/implicit_layer.d/libVkLayer_window_system_integration.so

Failed to import AHardwareBuffer, now changing to export AHardwareBuffer from VkDeviceMemory. Please try using the latest source code.

twaik commented 5 months ago

@xMeM can wsi layer be ported (somehow) to work with GLES?

hansm629 commented 5 months ago

@xMeM Can the artifacts that appear when running vkmark on Xclipse 940 GPU be improved?

Screenshot_2024-03-30_21-18-41

Trass3r commented 5 months ago

Failed to import AHardwareBuffer, now changing to export AHardwareBuffer from VkDeviceMemory. Please try using the latest source code.

Thanks, vkcube works now with https://github.com/termux/termux-packages/actions/runs/8497864850 zink still doesn't but I take it that's known. Edit: it actually seems to work with MESA_LOADER_DRIVER_OVERRIDE=zink instead of GALLIUM_DRIVER=zink.

glxinfo ```sh $ glxinfo -B name of display: :1 MESA-LOADER: dlopen(/data/data/com.termux/files/usr/lib/dri/zink_dri.so) did not find extension DRI_CopySubBuffer version 1 WARNING: Some incorrect rendering might occur because the selected Vulkan device (Mali-G715-Immortalis MC11) doesn't support base Zink requirements: feats.features.logicOp feats.features.fillModeNonSolid feats.features.shaderClipDistance display: :1 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa (0x13b5) Device: zink Vulkan 1.3(Mali-G715-Immortalis MC11 (ARM_PROPRIETARY)) (0xb8a21020) Version: 24.0.4 Accelerated: yes Video memory: 11296MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.1 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 2.0 OpenGL vendor string: Mesa OpenGL renderer string: zink Vulkan 1.3(Mali-G715-Immortalis MC11 (ARM_PROPRIETARY)) ```

While es2gears_x11 -info works apart from a libEGL warning: DRI3: Screen seems not DRI3 capable glxgears -info crashes though, oddly enough in a kms_swrast_dri.so libGLES_mali.so cmpbe_v2_compile_multiple_shaders thread, even though zink definitely seems to be active.

``` MESA: warning: WARNING: Incorrect rendering will happen because the Vulkan device doesn't support the 'VK_EXT_depth_clip_enable' feature Thread 8 "glxgears:gdrv0" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x1a54 (LWP 6740)] 0x0000007f4d9544c8 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so (gdb) bt #0 0x0000007f4d9544c8 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so ... #11 0x0000007f4d862fb4 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so #12 0x0000007f4d86263c in cmpbe_v2_compile_multiple_shaders () from /vendor/lib64/egl/mt6985/libGLES_mali.so #13 0x0000007f4d6da598 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so #14 0x0000007f4c813224 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so #15 0x0000007f4c8111c0 in ?? () from /vendor/lib64/egl/mt6985/libGLES_mali.so #16 0x0000007f692ceb90 in ?? () from /data/data/com.termux/files/usr/lib/dri/kms_swrast_dri.so ... #23 0x0000007f68d8bd80 in ?? () from /data/data/com.termux/files/usr/lib/dri/kms_swrast_dri.so #24 0x0000007ff015aad0 in __pthread_start(void*) () from /apex/com.android.runtime/lib64/bionic/libc.so ```
twaik commented 5 months ago

Can someone please test this artifact and tell me if vulkan-wsi-layer and turnip are not broken? I changed dri3 related code and need to make sure it is not broken before pushing this code to master.

@xMeM @hansm629 @licy183 please?

No binary blobs or m4 additions in the archive

update.zip diff.txt

hansm629 commented 5 months ago

@twaik

After installing the newly built update.zip

https://github.com/termux/termux-packages/actions/runs/8497864850 I installed the above wsi-layer and sysvk and tested it on the Galaxy Tab S9 Ultra 5G (Adreno 740).

https://github.com/termux/termux-packages/assets/101167173/185f389a-51b4-423c-8245-5e8a436cd5f0

Artifacts (or broken) still occur in vkmark.

twaik commented 5 months ago

I did not mean old issue with rendering. I meant new issues with xserver segmentation fault or something similar. Let's wait for a few more responses.

twaik commented 5 months ago

That seems like old issue with sending incomplete frames, @xMeM said he will fix it to wait for fences. But he did not say when.

hansm629 commented 5 months ago

@twaik I also tested it with mesa-vulkan-icd-freedreno-dri3 and it seems to work well.

https://github.com/termux/termux-packages/assets/101167173/351fa424-b2ba-4ff3-80d2-dccec08f1ee6

But it's strange. When I run vkmark with turnip dri3, the overall shader appears dark.

It seems that what you see is different from when you run vkmark on another Linux PC. Is this an issue with turnip itself?

twaik commented 5 months ago

I have no idea. I know no details about how turnip works.

hansm629 commented 5 months ago

@twaik After work, I will also test Galaxy S24+ Xclipse 940 GPU (with WSI Layer).

Trass3r commented 5 months ago

https://github.com/termux/termux-packages/actions/runs/8497864850 I installed the above wsi-layer Artifacts (or broken) still occur in vkmark.

Note that this is missing https://github.com/xMeM/vulkan-wsi-layer/commit/9277c26d35dba4d63b14af626aa6db2d1cf96536 afaict, @licy183

Does MESA_LOADER_DRIVER_OVERRIDE=zink glxgears -info work for you? https://github.com/termux/termux-packages/issues/19460#issuecomment-2028936060

hansm629 commented 5 months ago

@Trass3r @twaik

These are the results of additional testing. The host device is Galaxy S24+ (Exynos2400 ver).

first https://github.com/termux/termux-packages/actions/runs/8497864850

These are the test results for mesa 24.0.4 in the above build package and main-repo.

In the XFCE desktop, the vlbank_mode value is set from auto to off. (If set to auto, only the mouse pointer will be visible on a black screen when booting XFCE with zink.)

$ MESA_LOADER_DRIVER_OVERRIDE=zink 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.0.4
    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: 96 FrameTime: 10.466 ms
[build] use-vbo=true: FPS: 87 FrameTime: 11.598 ms
[texture] texture-filter=nearest: FPS: 70 FrameTime: 14.463 ms
[texture] texture-filter=linear: FPS: 74 FrameTime: 13.694 ms
[texture] texture-filter=mipmap: FPS: 72 FrameTime: 13.941 ms
[shading] shading=gouraud: FPS: 69 FrameTime: 14.539 ms
[shading] shading=blinn-phong-inf: FPS: 70 FrameTime: 14.416 ms
[shading] shading=phong: FPS: 65 FrameTime: 15.419 ms
[shading] shading=cel: FPS: 65 FrameTime: 15.486 ms
[bump] bump-render=high-poly: FPS: 64 FrameTime: 15.681 ms
[bump] bump-render=normals: FPS: 65 FrameTime: 15.579 ms
[bump] bump-render=height: FPS: 65 FrameTime: 15.424 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 67 FrameTime: 14.993 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 71 FrameTime: 14.253 ms
cannot create thread specific key for __cxa_get_globals()
Aborted

Combining Xclipse 940's host Vulkan driver with mesa 24.0.4 zink It supports OpenGL4.6!

But the performance is disastrous.

and

cannot create thread specific key for __cxa_get_globals() A message will appear and the benchmark will be forced to quit.

$ MESA_LOADER_DRIVER_OVERRIDE=zink glmark2-es2
libEGL warning: DRI3: Screen seems not DRI3 capable
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
    GL_VERSION:     OpenGL ES 3.2 Mesa 24.0.4
    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: 128 FrameTime: 7.854 ms
[build] use-vbo=true: FPS: 135 FrameTime: 7.451 ms
[texture] texture-filter=nearest: FPS: 128 FrameTime: 7.854 ms
[texture] texture-filter=linear: FPS: 131 FrameTime: 7.638 ms
[texture] texture-filter=mipmap: FPS: 127 FrameTime: 7.880 ms
[shading] shading=gouraud: FPS: 133 FrameTime: 7.558 ms
[shading] shading=blinn-phong-inf: FPS: 132 FrameTime: 7.623 ms
[shading] shading=phong: FPS: 126 FrameTime: 7.985 ms
[shading] shading=cel: FPS: 124 FrameTime: 8.069 ms
[bump] bump-render=high-poly: FPS: 121 FrameTime: 8.303 ms
[bump] bump-render=normals: FPS: 144 FrameTime: 6.959 ms
[bump] bump-render=height: FPS: 133 FrameTime: 7.576 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 140 FrameTime: 7.189 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 139 FrameTime: 7.214 ms
[pulsar] light=false:quads=5:texture=false: FPS: 88 FrameTime: 11.470 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 89 FrameTime: 11.261 ms
[desktop] effect=shadow:windows=4: FPS: 89 FrameTime: 11.340 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 63 FrameTime: 15.885 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 67 FrameTime: 15.099 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 67 FrameTime: 14.927 ms
[ideas] speed=duration: FPS: 67 FrameTime: 15.015 ms
[jellyfish] <default>: FPS: 68 FrameTime: 14.741 ms
[terrain] <default>: FPS: 60 FrameTime: 16.701 ms
[shadow] <default>: FPS: 103 FrameTime: 9.718 ms
[refract] <default>: FPS: 65 FrameTime: 15.606 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 72 FrameTime: 14.010 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 70 FrameTime: 14.312 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 73 FrameTime: 13.801 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 73 FrameTime: 13.843 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 79 FrameTime: 12.772 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 82 FrameTime: 12.223 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 81 FrameTime: 12.389 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 70 FrameTime: 14.295 ms
=======================================================
                                  glmark2 Score: 98 
=======================================================

glmark-es2 completed the benchmark to the end. but, the performance is still not satisfactory.

And when I run Blender 3D, the entire window is displayed in a broken state. Screenshot_2024-04-06_02-57-35

The following was tested in combination with mesa-zink 22.0.5 (tur-repo) before Kopper was merged.

$ GALLIUM_DRIVER=zink MESA_NO_ERROR=1 MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2 glmark2
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Collabora Ltd
    GL_RENDERER:    zink (Samsung Xclipse 940)
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 22.0.5
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=false: FPS: 300 FrameTime: 3.342 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=true: FPS: 338 FrameTime: 2.961 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=nearest: FPS: 328 FrameTime: 3.050 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=linear: FPS: 324 FrameTime: 3.087 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=mipmap: FPS: 331 FrameTime: 3.027 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shading] shading=gouraud: FPS: 330 FrameTime: 3.036 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shading] shading=blinn-phong-inf: FPS: 324 FrameTime: 3.091 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shading] shading=phong: FPS: 321 FrameTime: 3.124 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shading] shading=cel: FPS: 330 FrameTime: 3.038 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[bump] bump-render=high-poly: FPS: 273 FrameTime: 3.673 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[bump] bump-render=normals: FPS: 211 FrameTime: 4.758 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[bump] bump-render=height: FPS: 205 FrameTime: 4.897 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 224 FrameTime: 4.465 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 200 FrameTime: 5.014 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[pulsar] light=false:quads=5:texture=false: FPS: 214 FrameTime: 4.679 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 126 FrameTime: 7.967 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[desktop] effect=shadow:windows=4: FPS: 148 FrameTime: 6.794 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 134 FrameTime: 7.484 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 139 FrameTime: 7.197 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 151 FrameTime: 6.654 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[ideas] speed=duration: FPS: 233 FrameTime: 4.304 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[jellyfish] <default>: FPS: 294 FrameTime: 3.402 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[terrain] <default>: FPS: 115 FrameTime: 8.761 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shadow] <default>: FPS: 236 FrameTime: 4.249 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[refract] <default>: FPS: 149 FrameTime: 6.716 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 285 FrameTime: 3.521 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 208 FrameTime: 4.810 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 210 FrameTime: 4.779 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[function] fragment-complexity=low:fragment-steps=5: FPS: 210 FrameTime: 4.779 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[function] fragment-complexity=medium:fragment-steps=5: FPS: 211 FrameTime: 4.762 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 207 FrameTime: 4.836 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 202 FrameTime: 4.955 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 197 FrameTime: 5.099 ms
=======================================================
                                  glmark2 Score: 232 
=======================================================

It shows much more stable performance than mesa 24.0.4(main-repo) zink .

There are times when a maximum 360~420 score is achieved.

GALLIUM_DRIVER=zink glmark2-es2
libEGL warning: DRI3: Screen seems not DRI3 capable
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Collabora Ltd
    GL_RENDERER:    zink (Samsung Xclipse 940)
    GL_VERSION:     OpenGL ES 3.2 Mesa 22.0.5
    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: 176 FrameTime: 5.689 ms
[build] use-vbo=true: FPS: 164 FrameTime: 6.112 ms
[texture] texture-filter=nearest: FPS: 150 FrameTime: 6.698 ms
[texture] texture-filter=linear: FPS: 162 FrameTime: 6.182 ms
[texture] texture-filter=mipmap: FPS: 139 FrameTime: 7.212 ms
[shading] shading=gouraud: FPS: 131 FrameTime: 7.659 ms
[shading] shading=blinn-phong-inf: FPS: 162 FrameTime: 6.186 ms
[shading] shading=phong: FPS: 139 FrameTime: 7.238 ms
[shading] shading=cel: FPS: 135 FrameTime: 7.425 ms
[bump] bump-render=high-poly: FPS: 150 FrameTime: 6.709 ms
[bump] bump-render=normals: FPS: 139 FrameTime: 7.208 ms
[bump] bump-render=height: FPS: 158 FrameTime: 6.364 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 162 FrameTime: 6.174 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 152 FrameTime: 6.585 ms
[pulsar] light=false:quads=5:texture=false: FPS: 149 FrameTime: 6.745 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 109 FrameTime: 9.227 ms
[desktop] effect=shadow:windows=4: FPS: 119 FrameTime: 8.461 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 94 FrameTime: 10.696 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 111 FrameTime: 9.017 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 104 FrameTime: 9.708 ms
[ideas] speed=duration: FPS: 110 FrameTime: 9.158 ms
[jellyfish] <default>: FPS: 144 FrameTime: 6.984 ms
[terrain] <default>: FPS: 67 FrameTime: 15.006 ms
[shadow] <default>: FPS: 121 FrameTime: 8.308 ms
[refract] <default>: FPS: 94 FrameTime: 10.659 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 134 FrameTime: 7.469 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 172 FrameTime: 5.845 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 177 FrameTime: 5.659 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 139 FrameTime: 7.220 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 146 FrameTime: 6.881 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 184 FrameTime: 5.451 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 200 FrameTime: 5.019 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 209 FrameTime: 4.807 ms
=======================================================
                                  glmark2 Score: 141 
=======================================================

glmark2-es2 is also high than mesa 24.0.4.

And surprisingly Combining mesa-zink 22.0.5 and WSI-Layer Blender 3D works great!

Screenshot_2024-04-06_02-28-16

Just what I tested Almost all functions and rendering worked.

Exynos 2400 is It is an ARMv9 10-core CPU with a combination of Cortex-X4 MP1 + Cortex-A720 MP2 + Cortex-A720 MP3 + Cortex-A520MP4.

You can do 3D rendering using 10 cores!

@licy183 @xMeM Oh, I found something interesting!

https://github.com/termux/termux-packages/actions/runs/8245027247

I tested it by installing the WSI-Layer + sysvk above that was initially built. It shows much better performance when combined with mesa 24.0.4!

$ MESA_LOADER_DRIVER_OVERRIDE=zink glmark2
MIT-SHM enabled.
Present enabled.
present mode fifo.
create swapchain.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
MIT-SHM enabled.
Present enabled.
present mode immediate.
create swapchain.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
=======================================================
    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.0.4
    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: 703 FrameTime: 1.424 ms
[build] use-vbo=true: FPS: 628 FrameTime: 1.595 ms
[texture] texture-filter=nearest: FPS: 408 FrameTime: 2.456 ms
[texture] texture-filter=linear: FPS: 493 FrameTime: 2.031 ms
[texture] texture-filter=mipmap: FPS: 536 FrameTime: 1.868 ms
[shading] shading=gouraud: FPS: 705 FrameTime: 1.420 ms
[shading] shading=blinn-phong-inf: FPS: 550 FrameTime: 1.821 ms
[shading] shading=phong: FPS: 464 FrameTime: 2.157 ms
[shading] shading=cel: FPS: 459 FrameTime: 2.181 ms
[bump] bump-render=high-poly: FPS: 389 FrameTime: 2.572 ms
[bump] bump-render=normals: FPS: 487 FrameTime: 2.054 ms
[bump] bump-render=height: FPS: 488 FrameTime: 2.050 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 431 FrameTime: 2.325 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 370 FrameTime: 2.707 ms
[pulsar] light=false:quads=5:texture=false: FPS: 386 FrameTime: 2.594 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 380 FrameTime: 2.638 ms
[desktop] effect=shadow:windows=4: FPS: 271 FrameTime: 3.697 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 178 FrameTime: 5.638 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 310 FrameTime: 3.230 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 234 FrameTime: 4.279 ms
[ideas] speed=duration: FPS: 494 FrameTime: 2.026 ms
[jellyfish] <default>: FPS: 472 FrameTime: 2.122 ms
[terrain] <default>: FPS: 174 FrameTime: 5.767 ms
[shadow] <default>: FPS: 239 FrameTime: 4.193 ms
[refract] <default>: FPS: 259 FrameTime: 3.868 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 610 FrameTime: 1.640 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 474 FrameTime: 2.110 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 471 FrameTime: 2.128 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 467 FrameTime: 2.141 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 503 FrameTime: 1.991 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 471 FrameTime: 2.127 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 470 FrameTime: 2.128 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 470 FrameTime: 2.132 ms
=======================================================
                                  glmark2 Score: 436 
=======================================================
MESA_LOADER_DRIVER_OVERRIDE=zink glmark2-es2
libEGL warning: DRI3: Screen seems not DRI3 capable
MIT-SHM enabled.
Present enabled.
present mode fifo.
create swapchain.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
MIT-SHM enabled.
Present enabled.
present mode immediate.
create swapchain.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
format: 44
HardwareBuffer alloc success.
create swapchain image success.
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
    GL_VERSION:     OpenGL ES 3.2 Mesa 24.0.4
    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: 727 FrameTime: 1.376 ms
[build] use-vbo=true: FPS: 693 FrameTime: 1.443 ms
[texture] texture-filter=nearest: FPS: 605 FrameTime: 1.655 ms
[texture] texture-filter=linear: FPS: 595 FrameTime: 1.683 ms
[texture] texture-filter=mipmap: FPS: 623 FrameTime: 1.608 ms
[shading] shading=gouraud: FPS: 625 FrameTime: 1.602 ms
[shading] shading=blinn-phong-inf: FPS: 644 FrameTime: 1.554 ms
[shading] shading=phong: FPS: 631 FrameTime: 1.587 ms
[shading] shading=cel: FPS: 637 FrameTime: 1.571 ms
[bump] bump-render=high-poly: FPS: 505 FrameTime: 1.984 ms
[bump] bump-render=normals: FPS: 673 FrameTime: 1.486 ms
[bump] bump-render=height: FPS: 652 FrameTime: 1.535 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 453 FrameTime: 2.211 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 455 FrameTime: 2.202 ms
[pulsar] light=false:quads=5:texture=false: FPS: 497 FrameTime: 2.012 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 263 FrameTime: 3.811 ms
[desktop] effect=shadow:windows=4: FPS: 374 FrameTime: 2.679 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 239 FrameTime: 4.201 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 506 FrameTime: 1.979 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 287 FrameTime: 3.495 ms
[ideas] speed=duration: FPS: 439 FrameTime: 2.279 ms
[jellyfish] <default>: FPS: 300 FrameTime: 3.339 ms
[terrain] <default>: FPS: 150 FrameTime: 6.686 ms
[shadow] <default>: FPS: 398 FrameTime: 2.516 ms
[refract] <default>: FPS: 250 FrameTime: 4.011 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 664 FrameTime: 1.507 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 617 FrameTime: 1.623 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 614 FrameTime: 1.630 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 624 FrameTime: 1.603 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 595 FrameTime: 1.682 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 606 FrameTime: 1.651 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 604 FrameTime: 1.657 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 604 FrameTime: 1.656 ms
=======================================================
                                  glmark2 Score: 518 
=======================================================

benchmark results are excellent.

problem is that for that build version, there are two problems in the mesa 24.0.4 environment. first problem is that when you run Blender 3D, all elements in the 3D viewer area appear broken or misaligned.

Screenshot_2024-04-06_02-53-53

second problem is that when running vkmark, the performance is about half that of the latest WSI-Layer and larger artifacts occur.

1

[List in need of improvement]

I think it will be perfect if the three things above are reflected.

@licy183 I would like to request the latest package that reflects the sources below. https://github.com/xMeM/vulkan-wsi-layer/commit/9277c26d35dba4d63b14af626aa6db2d1cf96536

Please check.

hansm629 commented 5 months ago

@licy183

https://github.com/termux/termux-packages/actions/runs/8558168471

Thank you for building with the latest src!

@xMeM @twaik

Below are the test results from the latest build.

Surprisingly, starting with the latest src build, running vkmark no longer produces artifacts!

However, vkmark performance has dropped to almost 1/8 of the previous build.

~ $ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x5143
    Device ID:      0x43050A01
    Device Name:    Adreno (TM) 740
    Driver Version: 2150252544
    Device UUID:    dd6bb207435100000000010a05430000
=======================================================
[vertex] device-local=true: FPS: 1378 FrameTime: 0.726 ms
[vertex] device-local=false: FPS: 1472 FrameTime: 0.679 ms
[texture] anisotropy=0: FPS: 1421 FrameTime: 0.704 ms
[texture] anisotropy=16: FPS: 1405 FrameTime: 0.712 ms
[shading] shading=gouraud: FPS: 1377 FrameTime: 0.726 ms
[shading] shading=blinn-phong-inf: FPS: 1327 FrameTime: 0.754 ms
[shading] shading=phong: FPS: 1283 FrameTime: 0.779 ms
[shading] shading=cel: FPS: 1167 FrameTime: 0.857 ms
[effect2d] kernel=edge: FPS: 1287 FrameTime: 0.777 ms
[effect2d] kernel=blur: FPS: 895 FrameTime: 1.117 ms
[desktop] <default>: FPS: 989 FrameTime: 1.011 ms
[cube] <default>: FPS: 1117 FrameTime: 0.895 ms
[clear] <default>: FPS: 1092 FrameTime: 0.916 ms
=======================================================
                                   vkmark Score: 1246
=======================================================
~ $ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x144D
    Device ID:      0x2600200
    Device Name:    Samsung Xclipse 940
    Driver Version: 8388608
    Device UUID:    f27be8d2bf1155c3bb2bdaa328a742a7
=======================================================
[vertex] device-local=true: FPS: 777 FrameTime: 1.287 ms
[vertex] device-local=false: FPS: 803 FrameTime: 1.245 ms
[texture] anisotropy=0: FPS: 767 FrameTime: 1.304 ms
[texture] anisotropy=16: FPS: 870 FrameTime: 1.149 ms
[shading] shading=gouraud: FPS: 797 FrameTime: 1.255 ms
[shading] shading=blinn-phong-inf: FPS: 769 FrameTime: 1.300 ms
[shading] shading=phong: FPS: 775 FrameTime: 1.290 ms
[shading] shading=cel: FPS: 779 FrameTime: 1.284 ms
[effect2d] kernel=edge: FPS: 901 FrameTime: 1.110 ms
[effect2d] kernel=blur: FPS: 916 FrameTime: 1.092 ms
[desktop] <default>: FPS: 745 FrameTime: 1.342 ms
[cube] <default>: FPS: 881 FrameTime: 1.135 ms
[clear] <default>: FPS: 842 FrameTime: 1.188 ms
=======================================================
                                   vkmark Score: 817
=======================================================

https://github.com/termux/termux-packages/actions/runs/8497864850

When testing vkmark with the above build, artifacts occur but the performance is much higher.

~ $ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x5143
    Device ID:      0x43050A01
    Device Name:    Adreno (TM) 740
    Driver Version: 2150252544
    Device UUID:    dd6bb207435100000000010a05430000
=======================================================
[vertex] device-local=true: FPS: 11480 FrameTime: 0.087 ms
[vertex] device-local=false: FPS: 12447 FrameTime: 0.080 ms
[texture] anisotropy=0: FPS: 11144 FrameTime: 0.090 ms
[texture] anisotropy=16: FPS: 11210 FrameTime: 0.089 ms
[shading] shading=gouraud: FPS: 10507 FrameTime: 0.095 ms
[shading] shading=blinn-phong-inf: FPS: 10516 FrameTime: 0.095 ms
[shading] shading=phong: FPS: 10453 FrameTime: 0.096 ms
[shading] shading=cel: FPS: 10401 FrameTime: 0.096 ms
[effect2d] kernel=edge: FPS: 12918 FrameTime: 0.077 ms
[effect2d] kernel=blur: FPS: 7691 FrameTime: 0.130 ms
[desktop] <default>: FPS: 10168 FrameTime: 0.098 ms
[cube] <default>: FPS: 11568 FrameTime: 0.086 ms
[clear] <default>: FPS: 2529 FrameTime: 0.395 ms
=======================================================
                                   vkmark Score: 10233
=======================================================
~ $ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x144D
    Device ID:      0x2600200
    Device Name:    Samsung Xclipse 940
    Driver Version: 8388608
    Device UUID:    f27be8d2bf1155c3bb2bdaa328a742a7
=======================================================
[vertex] device-local=true: FPS: 7204 FrameTime: 0.139 ms
[vertex] device-local=false: FPS: 7366 FrameTime: 0.136 ms
[texture] anisotropy=0: FPS: 6942 FrameTime: 0.144 ms
[texture] anisotropy=16: FPS: 6978 FrameTime: 0.143 ms
[shading] shading=gouraud: FPS: 6942 FrameTime: 0.144 ms
[shading] shading=blinn-phong-inf: FPS: 6965 FrameTime: 0.144 ms
[shading] shading=phong: FPS: 6385 FrameTime: 0.157 ms
[shading] shading=cel: FPS: 5237 FrameTime: 0.191 ms
[effect2d] kernel=edge: FPS: 6450 FrameTime: 0.155 ms
[effect2d] kernel=blur: FPS: 5803 FrameTime: 0.172 ms
[desktop] <default>: FPS: 3710 FrameTime: 0.270 ms
[cube] <default>: FPS: 5333 FrameTime: 0.188 ms
[clear] <default>: FPS: 4305 FrameTime: 0.232 ms
=======================================================
                                   vkmark Score: 6125
=======================================================

We are seeing much stronger performance compared to the latest build.

ah! And there was a strange situation.

For Galaxy S24+ Xclipse 940 GPU, running vkmark through Termux-X11 directly on the phone produces mild artifact,

When connected to an external display and running vkmark through Termux-X11 in DeX mode, no artifact occur!

Currently, for Xclipse 940 GPU, when used in DeX mode, the corresponding build and It seems to be most stable to use with mesa-zink 22.0.5 distributed by tur-repo.

For Adreno 7xx series GPU

https://github.com/termux/termux-packages/actions/runs/8497864850

As long as there are no artifacts in the performance of the above build, it will be perfect in the Vulkan environment.

Other than that

https://github.com/termux/termux-packages/actions/runs/8558168471

The issue that occurs when using the latest build above with mesa 24.0.4 zink is the same.

twaik commented 5 months ago

Surprisingly, starting with the latest src build, running vkmark no longer produces artifacts!

However, vkmark performance has dropped to almost 1/8 of the previous build.

Performance seems to be higher, but it is meaningless in the case if glitches occur...

hansm629 commented 5 months ago

@twaik It's not wrong, but For Xclipse 940 there is no problem with Dex Mod.

The performance is high and it is very stable.

twaik commented 5 months ago

@tareksander @xMeM I've added AHardwareBuffer importing support so you can export AHardwarebuffer from X11 client with socketpair.

  1. Open socketpair.
  2. Send one fd of it to X server with xcb_dri3_pixmap_from_buffers with modifier AHARDWAREBUFFER_SOCKET_FD (1255).
  3. Flush xcb connection.
  4. Read 1 byte from second fd of socketpair (that is the way X server signals it is ready to read AHardwareBuffer).
  5. Send AHardwareBuffer with AHardwareBuffer_sendHandleToUnixSocket.

The buffer will be available to be used with xcb_present_pixmap and xcb_shm_put_image as usual, but should work with wider range of hardware (because dmabuf fd exported from AHardwareBuffer is a bullshit and you must manually call AHardwareBuffer_{lock,unlock} each time you access buffers).

tareksander commented 5 months ago

@twaik Is there a way to query for support? An X extension maybe? Or do we have to try the request and see if it fails?

xMeM commented 5 months ago

@twaik A good improvement, but there are still some problems, maybe the stride of pixmap is wrong. Screenshot_2024-04-08-18-38-44-85_00df01c412509efb9bd6450c382822af

twaik commented 5 months ago

Can you please share the repro?

twaik commented 5 months ago

Is there a way to query for support? An X extension maybe? Or do we have to try the request and see if it fails?

Probably try-and-see is the best way. I mean you can do xcb_dri3_pixmap_from_buffers_checked with some test buffer and test if it throws xcb_error_t. And destroy the pixmap if it succeeds.

xMeM commented 5 months ago

Can you please share the repro?

diff.txt I only modified these.

twaik commented 5 months ago

Probably I forgot to multiply stride by 4. I'll fix it a bit later.

twaik commented 5 months ago

Ok @xMeM, try the latest build.

twaik commented 5 months ago

@twaik A good improvement, but there are still some problems, maybe the stride of pixmap is wrong. Screenshot_2024-04-08-18-38-44-85_00df01c412509efb9bd6450c382822af

Is it a horse?

xMeM commented 5 months ago

Yes, this is vkmark. The latest build didn't fix it. Screenshot_2024-04-09-00-50-39-11_00df01c412509efb9bd6450c382822af AHardwareBuffer_Desc: width: 800 height: 600 stride: 832 stride*4: 3328 VkSubresourceLayout: width: 800 height: 600 stride: 3328 offset: 0

twaik commented 5 months ago

Can you please send me prebuilt repro?

twaik commented 5 months ago

@xMeM. Probably the reason is simple. app-universal-debug.tar.gz

hansm629 commented 5 months ago

@twaik I have a question. Should the turnip dri3 patch be updated due to this improved Termux-X11?

Currently, I am using turnip after applying the dri3 patch on PRoot Debian 12 for the Galaxy S24 Ultra and Galaxy Tab S9 Ultra.

I am wondering if a new turnip dri3 patch should be released to support Termux-X11, which you are improving.

twaik commented 5 months ago

Should the turnip dri3 patch be updated due to this improved Termux-X11?

No. Improvement is related to AHardwareBuffers, which are not used by turnip.

xMeM commented 5 months ago

@xMeM. Probably the reason is simple. app-universal-debug.tar.gz

Still no fix.

xMeM commented 5 months ago

Can you please send me prebuilt repro?

What files do I need to send?

twaik commented 5 months ago

All files needed to setup and reproduce this (ICD, program?). Currently I am trying to write xcb-only repro (because most of the code will be used in virglrenderer-android improvement update) but it will take some time.

xMeM commented 5 months ago

All files needed to setup and reproduce this (ICD, program?). Currently I am trying to write xcb-only repro (because most of the code will be used in virglrenderer-android improvement update) but it will take some time.

files.tar.gz vkmark from termux-user-repository. Run with the following command: VK_LOADER_LAYERS_ENABLE=VK_LAYER_window_system_integration VK_ICD_FILENAMES=~/sysvk/build/sysvk_icd.json VK_LAYER_PATH=~/vulkan-wsi-layer/build vkmark

twaik commented 5 months ago

Ok, seems like I found the cause. I am a donkey. repro with ahardwarebuffer. main.tar.gz

twaik commented 5 months ago

Ok, @xMeM can you please test it again?

xMeM commented 5 months ago

Ok, @xMeM can you please test it again?

The latest build works fine.

twaik commented 4 months ago

@xMeM can you please try to make vulkan-wsi-layer being loaded as an ICD? With automatic sysvk loading?

xMeM commented 4 months ago

@xMeM can you please try to make vulkan-wsi-layer being loaded as an ICD? With automatic sysvk loading?

I don't know how the vulkan loader handles layer and ICD, so I don't know how to do it.

tareksander commented 4 months ago

@xMeM can you please try to make vulkan-wsi-layer being loaded as an ICD? With automatic sysvk loading?

I don't know how the vulkan loader handles layer and ICD, so I don't know how to do it.

https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderDriverInterface.md