I already tried musescore-dev. It built but would not start. I'll keep trying.
Here is the result of the bisect, FWIW:
f62724ccacffb2a1508647e9004adf02f92f7833 is the first bad commit
commit f62724ccacffb2a1508647e9004adf02f92f7833
Author: Kenneth Graunke <[email protected]>
Date: Thu May 20 02:02:51 2021 -0700
iris: Pick a single mmap mode (WB/WC) at BO allocation time
Previously, iris_bufmgr had the ability to maintain multiple
simultaneous memory mappings for a BO, one in WB mode (with CPU caches),
and another in WC (streaming) mode. Depending on the flags passed to
iris_bo_map(), we would select one mode or the other.
The rules for deciding which to use were:
- Systems with LLC always use WB mode because it's basically free
- Non-LLC systems used...
- WB maps for all BOs where snooping is enabled (which translates to
when BO_ALLOC_COHERENT is set at allocation time)
- WB maps for reads unless persistent, coherent, async, or raw.
- WC maps for everything else.
This patch simplifies the system by selecting a single mmap mode at
BO allocation time, and always using that. Each BO now has at most one
map at a time, rather than up to two (or three before we deleted GTT
map support in recent patches).
In practical terms, this eliminates the capability to use WB maps for
reads of non-snooped BOs on non-LLC systems. Such reads would now be
slow, uncached reads. However, iris_transfer_map recently began using
staging blits for such reads - so the GPU copies the data to a snooped
buffer which will be mapped WB. So, rather than incurring slow UC
reads, we really just take the hit of a blit, and retain fast reads.
The rest of the rules remain the same.
There are a few reasons for this:
1. TTM doesn't support mapping an object as both WB and WC. The
cacheability is treated as a property of the object, not the map.
The kernel is moving to use TTM as part of adding discrete local
memory support. So it makes sense to centralize on that model.
2. Mapping the same BO as both WB and WC is impossible to support on
some CPUs. It works on x86/x86_64, which was fine for integrated
GPUs, but it may become an issue for discrete graphics paired with
other CPUs (should that ever be a thing we need to support).
3. It's overall much simpler. We only have one bo->map field, and
manage to drop a significant amount of boilerplate.
One issue that arises is the interaction with the BO cache: BOs with
WB maps and WC maps will be lumped together into the same cache. This
means that a cached BO may have the wrong mmap mode. We check that,
and if it doesn't match, we unmap it, waiting until iris_bo_map is
called to restore one with the desired mode. This may underutilize
cache mappings slightly on non-LLC systems, but I don't expect it to
have a large impact.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4747
Acked-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10941>
src/gallium/drivers/iris/iris_bufmgr.c | 190 ++++++++-------------------------
src/gallium/drivers/iris/iris_bufmgr.h | 13 ++-
2 files changed, 56 insertions(+), 147 deletions(-)
The PKGBUILD used for bisecting:
# Maintainer: Laurent Carlier <[email protected]>
# Maintainer: Felix Yan <[email protected]>
# Maintainer: Jan de Groot <[email protected]>
# Contributor: Andreas Radke <[email protected]>
#pkgbase=mesa-git
pkgname=('mesa-custom')
#pkgname=('mesa')
pkgdesc="An open-source implementation of the OpenGL specification"
pkgver=21.2.0_devel.140410.f62724ccacf
pkgrel=1
arch=('x86_64')
makedepends=('python-mako' 'libxml2' 'libx11' 'xorgproto' 'libdrm' 'libxshmfence' 'libxxf86vm'
'libxdamage' 'libva' 'wayland' 'wayland-protocols' 'zstd' 'elfutils'
'libomxil-bellagio' 'libclc' 'libglvnd' 'libunwind' 'lm_sensors' 'libxrandr'
'glslang' 'meson' 'gcc10' 'llvm') #'valgrind' 'vulkan-icd-loader' 'libvdpau' 'clang''llvm'
url="https://www.mesa3d.org/"
#_commit=3e59d54daad6a02ef314f8159d7e90b9849e605e #(tag: mesa-21.1.2, 21.1)
license=('custom')
#groups=(modified)
source=("mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main" #commit=$_commit"
'LICENSE')
md5sums=('SKIP'
'1eff81373cde4b3d7b0ea7590431c962')
validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov <[email protected]>
'946D09B5E4C9845E63075FF1D961C596A7203456' # Andres Gomez <[email protected]>
'E3E8F480C52ADD73B278EE78E1ECBE07D7D70895' # Juan Antonio Suárez Romero (Igalia, S.L.) <[email protected]>
'A5CC9FEC93F2F837CB044912336909B6B25FADFA' # Juan A. Suarez Romero <[email protected]>
'71C4B75620BC75708B4BDB254C95FAAB3EB073EC' # Dylan Baker <[email protected]>
'57551DE15B968F6341C248F68D8E31AFC32428A6') # Eric Engestrom <[email protected]>
pkgver() {
cd mesa
read -r _ver <VERSION
echo ${_ver/-/_}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
prepare() {
# although removing build folder in build() function feels more natural,
# that interferes with the spirit of makepkg --noextract
cd mesa
if [ -d build ]; then
rm -rf build
fi
#patch --forward --strip=1 --input="${srcdir}/8543.patch"
}
build() {
export CC=/usr/bin/gcc-10
export CXX=/usr/bin/g++-10
export CPP=/usr/bin/cpp-10
meson mesa build -Dprefix=/usr \
-D b_lto=true \
-D b_ndebug=true \
-D platforms=x11,wayland \
-D dri-drivers=i915,i965 \
-D gallium-drivers=iris,swrast \
-D vulkan-drivers='' \
-D swr-arches=avx,avx2 \
-D dri3=disabled \
-D egl=enabled \
-D gbm=enabled \
-D gles1=disabled \
-D gles2=enabled \
-D glvnd=true \
-D glx=dri \
-D libunwind=enabled \
-D lmsensors=enabled \
-D llvm=enabled \
-D osmesa=true \
-D shared-glapi=enabled \
-D microsoft-clc=disabled \
-D valgrind=disabled \
-D datasources=''
# Print config
#meson configure build
ninja -C build
meson compile -C build
}
package_mesa-custom() {
depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf'
'libomxil-bellagio' 'libunwind' 'lm_sensors' 'libglvnd'
'zstd' 'llvm-libs') #'vulkan-icd-loader'
optdepends=('opengl-man-pages: for the OpenGL API man pages'
'mesa-vdpau: for accelerated video playback'
'libva-mesa-driver: for accelerated video playback')
provides=('mesa' 'mesa-libgl' 'opengl-driver')
conflicts=('mesa' 'mesa-libgl')
replaces=('mesa-libgl')
DESTDIR="${pkgdir}" meson install -C build
# indirect rendering
ln -s /usr/lib/libGLX_mesa.so.0 "${pkgdir}/usr/lib/libGLX_indirect.so.0"
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
It shows the first bad commit (for MuseScore; it corrupts the cursor - the blue bar that runs across the score).
The musescore people probably know this already, but they aren't forthcoming with the bugfixes. As I said, to find out if the previous commit works for the rest of my system will take time (I could try bisecting mate-terminal and pluma, but that would take a very long time, since the error is not immediately apparent. And of course it would mean bisecting the kernel, and that error goes ***WAY*** back).
The last good commit is 22bfb5355f2e7f0c365b4e50f9f8a77a601b1ccf (refs/bisect/good-22bfb5355f2e7f0c365b4e50f9f8a77a601b1ccf)