Skip to content

vulkan.c, opengl_surfaceless.c tests fail on arm64/freedreno: 'diff <= 150' at ../src/tests/gpu_tests.c:1623

I am running the libplacebo tests on an arm64 thinkpad t14s laptop, with an Adreno X1-85 GPU. It gets two failing tests. This issue is about the failures in vulkan.c.

I checked out the libplacebo master branch (53719e45), made a build dir, and configured the build with -Dtests=true, as described in the readme.

Without the PR !766 patch, the test is killed with SIGSEGV:

% meson test vulkan.c
ninja: Entering directory `/home/infinoid/workspace/libplacebo/build'
[4/4] Linking target src/tests/test.vulkan.c
1/1 vulkan.c        FAIL             0.55s   killed by signal 11 SIGSEGV

testlog-SIGSEGV.txt

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000c9f41a6adf1c in vk_malloc_import (ma=0xc9f43e630b60, out=out@entry=0xc9f43eb22458, params=params@entry=0xffffcb1e4cd8) at ../src/vulkan/malloc.c:896
#2  0x0000c9f41a6af5cc in vk_malloc_slice (ma=<optimized out>, out=out@entry=0xc9f43eb22458, params=params@entry=0xffffcb1e4cd8) at ../src/vulkan/malloc.c:1026
#3  0x0000c9f41a6a69c8 in vk_buf_create (gpu=0xc9f43e7a7250, params=0xffffcb1e4da0) at ../src/vulkan/gpu_buf.c:221
#4  0x0000c9f41a67c814 in pl_buf_create (gpu=gpu@entry=0xc9f43e7a7250, params=0xffffcb1e4da0, params@entry=0xffffcb1e4ea8) at ../src/gpu.c:609
#5  0x0000c9f41a67f3a0 in pl_tex_download_pbo (gpu=0xc9f43e7a7250, params=0xffffcb1e5078) at ../src/gpu/utils.c:631
#6  0x0000c9f41a6a845c in vk_tex_download (gpu=<optimized out>, params=<optimized out>) at ../src/vulkan/gpu_tex.c:1105
#7  0x0000c9f41a67c66c in pl_tex_download (gpu=gpu@entry=0xc9f43e7a7250, params=params@entry=0xffffcb1e5198) at ../src/gpu.c:529
#8  0x0000c9f41a6ea9a0 in pl_scaler_tests (gpu=gpu@entry=0xc9f43e7a7250) at ../src/tests/gpu_tests.c:879
#9  0x0000c9f41a6f34bc in gpu_shader_tests (gpu=0xc9f43e7a7250) at ../src/tests/gpu_tests.c:1749
#10 0x0000c9f41a665e20 in main () at ../src/tests/vulkan.c:203

This looks like the same issue described in that PR, only with line numbers corresponding to the latest git, rather than the release.

With the PR patch applied, the test doesn't segfault, but it still returns non-zero.

% meson test vulkan.c
ninja: Entering directory `/home/infinoid/workspace/libplacebo/build'
[4/4] Linking target src/tests/test.vulkan.c
1/1 vulkan.c        FAIL             2.14s   exit status 1
=== FAILED: 'diff <= 150' at ../src/tests/gpu_tests.c:1623
 diff                            = 151
 150                             = 150

testlog-exit1.txt

That error came from here; is it some kind of accuracy test?

All software on this machine (apart from the git clone of libplacebo) are from Debian forky (testing). Here are some version numbers:

% dpkg -l | egrep '(mesa|xorg|linux-image)' | cut -c -60
ii  libegl-mesa0:arm64                       25.2.6-1
ii  libegl1-mesa-dev:arm64                   25.2.6-1
ii  libgl1-mesa-dri:arm64                    25.2.6-1
ii  libglu1-mesa:arm64                       9.0.2-1.1+b3
ii  libglu1-mesa-dev:arm64                   9.0.2-1.1+b3
ii  libglx-mesa0:arm64                       25.2.6-1
ii  linux-image-6.18.0-caw                   6.18-22
ii  mesa-libgallium:arm64                    25.2.6-1
ii  mesa-utils                               9.0.0-2+b2
ii  mesa-utils-bin:arm64                     9.0.0-2+b2
ii  mesa-va-drivers:arm64                    25.2.6-1
ii  mesa-vdpau-drivers:arm64                 25.2.6-1
ii  mesa-vulkan-drivers:arm64                25.2.6-1
ii  xorg                                     1:7.7+26
ii  xorg-docs-core                           1:1.7.3-1
ii  xorg-sgml-doctools                       1:1.11-1.1
ii  xserver-xorg                             1:7.7+26
ii  xserver-xorg-core                        2:21.1.21-1
ii  xserver-xorg-input-all                   1:7.7+26
ii  xserver-xorg-input-libinput              1.5.0-1
ii  xserver-xorg-input-wacom                 1.2.3-1
ii  xserver-xorg-legacy                      2:21.1.21-1
ii  xserver-xorg-video-fbdev                 1:0.5.0-2+b2