Did anyone tested mesa.git for current PowerVR status?

Since last ping about me in need to get 1080p monitor I actually realized that my HDMI cable or that old TV set is kinda broken. Not even my laptop can project onto it, let alone VF1 which worked previously, but now I boot it and still get “No signal”. Sigh.

But I was able to build optimized mesa-23.1.0-rc3 natively on VF2 with clang-14, with imagination-experimental driver enabled:

root@serval:/usr/src# ls -l /usr/lib/libvulkan_powervr_mesa.so 
-rwxr-xr-x 1 root root 1143776 Apr 29 22:20 /usr/lib/libvulkan_powervr_mesa.so
root@serval:/usr/src# ldd /usr/lib/libvulkan_powervr_mesa.so 
        linux-vdso.so.1 (0x0000003f99fbe000)
        libpowervr_rogue.so => /usr/lib/libpowervr_rogue.so (0x0000003f9984a000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0000003f99834000)
        libudev.so.1 => /lib/libudev.so.1 (0x0000003f99814000)
        libz.so.1 => /lib/libz.so.1 (0x0000003f997fc000)
        libm.so.6 => /lib/libm.so.6 (0x0000003f99786000)
        libzstd.so.1 => /lib/libzstd.so.1 (0x0000003f9964f000)
        libunwind.so.8 => /usr/lib/libunwind.so.8 (0x0000003f99626000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000003f99608000)
        libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x0000003f99605000)
        libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x0000003f99601000)
        libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x0000003f995fd000)
        libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x0000003f995f6000)
        libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x0000003f995ee000)
        libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x0000003f995e2000)
        libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x0000003f995de000)
        libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x0000003f995db000)
        libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x0000003f995cb000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000003f995a6000)
        libc++abi.so.1 => /usr/lib/libc++abi.so.1 (0x0000003f99568000)
        libc.so.6 => /lib/libc.so.6 (0x0000003f99426000)
        /lib/ld-linux-riscv64-lp64d.so.1 (0x0000003f99fbf000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000003f99412000)
        liblzma.so.5 => /lib/liblzma.so.5 (0x0000003f993e9000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x0000003f993e5000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0000003f993df000)
        libffi.so.8 => /usr/lib/libffi.so.8 (0x0000003f993d4000)

But I can’t test it (yet).

Did anyone tried it?

1 Like

I got a working VisionFive 2 with Debian. Can you provide a deb or instructions?

1 Like


Unfortunately I run Slackware Slarm64-riscv64. I have an .txz package with full mesa inside, so you might to setup a chroot for example, unpack it plainly there and test from there (ofc you have to bind mount stuff like /proc, /sys, /dev, /tmp and /run inside chroot).
Another way is to build it yourself and install… somewhere. idk how it will ruin your system afterwards, but here is exerpt from my mesa.SlackBuild (translated):

mkdir -p /tmp/r/package-mesa
cd /tmp/r
tar -xf mesa-23.1.0-rc3.tar.xz
cd mesa-23.1.0-rc3
mkdir meson-build && cd meson-build
mkdir meson-build
cd meson-build
meson setup \
  --prefix=/usr \
  --libdir=lib \
  --libexecdir=/usr/libexec \
  --bindir=/usr/bin \
  --sbindir=/usr/sbin \
  --includedir=/usr/include \
  --datadir=/usr/share \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --buildtype=release \
  -Dplatforms=x11,wayland \
  -Dgallium-opencl=icd \
  -Dgallium-nine=true \
  -Dgallium-rusticl=true \
  -Drust_std=2021 \
  -Dosmesa=true \
  -Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl,zink,freedreno,etnaviv,kmsro,lima,panfrost,v3d,vc4 \
  -Dvulkan-drivers=amd,swrast,broadcom,panfrost,imagination-experimental \
  -Dvulkan-layers=device-select,overlay \
  -Dvideo-codecs="h264dec,h264enc,h265dec,h265enc,vc1dec" \
  -Dglvnd=true \
  -Dllvm=enabled \
  -Dshared-llvm=enabled \
  -Dshared-glapi=enabled \
  -Degl=enabled \
  -Dgles1=enabled \
  -Dgles2=enabled \
  -Dopengl=true \
  -Dglx=dri \
  -Ddri3=enabled \
  -Dgbm=enabled \
  .. || exit 1
  ninja -j4 || exit 1
  DESTDIR=/tmp/r/package-mesa ninja install || exit 1
cd ..

If successful, you’ll find stuff in /tmp/r/package-mesa. It will contain file tree that you might want to overlay to rootfs like cd /tmp/r/package-mesa && tar -c * | tar -C/ -x, but it might be dangerous.
You also might want to reduce amount of code built by removing drivers not relevant to platform. I just did not care about that.

NOTE that my compiler was overriden with PATH environment variable, and, instead, a script driver was sat up in place invoking /usr/bin/clang with appropriate CFLAGS, CXXFLAGS and stuff transparently defined.

Please let me know how would you like to proceed.

Unfortunately, this is a little over my head. I will take a look at mesa build instructions and try to build it, but no promises.