Mesa is painful to bisect, I hope this can be improved

Timur Kristóf timur.kristof at gmail.com
Thu Oct 17 23:36:27 UTC 2024


Hi,

I bisect RADV every now and then.

It's not clear what your issue is exactly, it seems your problem may be
that you try to build the entirety of Mesa and replace the version in
your system that was shipped by your distro? Or that you bisect between
very old very new versions?

My process is having a meson setup configured to build just the driver
I am interested in debugging and then I compile it and install to a
local prefix without replacing the Mesa version shipped by my system.
Then I run the application with that local Mesa version by pointing it
to the Vulkan ICD of that version or setting the relevant environment
variables for OpenGL. This works without affecting the rest of the
system. It is relatively quick and painless, I very rarely need to
tweak the Meson options or install a new dependency.

In extremely rare occations there are breaking changes that prevent
running apps using very old drivers on systems that otherwise run on a
newer version and vice versa. This is practically rare and usually can
be worked around if necessary.

Other than that, I think it's normal and expected that the drivers
evolve and some options change. Things that were experimental yesterday
might become default tomorrow; things that were default last week might
become obsolete or even removed.

Hope this helps,
Timur


On Mon, 2024-10-14 at 17:40 +0200, Thomas Debesse wrote:
> Hi, for a long time now I wanted to make this observation in the hope
> it can be improved:
> 
> Mesa is painfully hard to bisect because of many things.
> 
> The most common thing hindering bisect tasks is the fact some options
> values are constantly swapped to `true` to `enabled` and things like
> that. Even when there are some legacy-compatibility implemented to
> recognize one for the other, Meson looks to only be able to process
> the compatibility if and only if the build folder has been entirely
> cleaned-up first. So bisecting requires to clean-up the build folder
> on almost every bisecting step, and most of the bisecting steps also
> require to modify the options themselves.
> 
> I wonder if there are some rooms to improve the bisecting experience:
> 
> - either by implementing some working method like not doing random
> enable/true change one by one throughout the years but focusing at
> porting all of them at once,
> - either at making Meson accept one for the other in all cases.
> 
> Then comes the silent breaking of enabled features requiring another
> feature to be enabled too to be working again, which also prevents to
> bisect properly because the same configure and build commands for the
> same feature may or may not produce a working installation given the
> commit that is tested while bisecting, this has been reported there:
> 
> - https://gitlab.freedesktop.org/mesa/mesa/-/issues/12024
> 
> Then comes the usual renaming things like the `swrast` gallium driver
> option being split into by `llvmpipe` and `softpipe`, we can't
> probably avoid that, and I would be happy if in the future I and
> others would only have to deal with that.
> 
> Do you you also experience similar problems when bisecting Mesa? Do
> you also face similar problems but some I may have not listed ? I
> focus myself on OpenGL on Xorg with GLX and on OpenCL
> (clover/rusticl)
> so other people bisecting other things like GL ES, EGL, Vulkan or
> even
> some drivers I'm not testing myself that much or not at all may
> experience other things I'm not aware of but making bisecting uneasy
> as well.
> 
> An example of thing I don't test that much is zink, so problems like
> zink not being working while being installed given which commit is
> built is definitely something that makes bisecting painful, but it
> took me months to experience this problem myself only because I don't
> test zink that much myself, but I guess some people experience
> similar
> problems and pain with other features or components of Mesa. More
> info
> about that zink problem can be found there, but this is just yet one
> example among others:
> 
> - https://gitlab.freedesktop.org/mesa/mesa/-/issues/12024
> 
> While I don't bisect zink that much myself, when I had to bisect r300
> to discover what Meson option I needed to make it work again, I
> experienced the pain of having to rewrite Meson command line options
> and to clean-up the build on various bisecting steps. So I expect
> other people to experience similar problems I'm not aware of, only
> because they bisect other things in Mesa I don't bisect myself.
> 
> Do you have any opinion on the topic and/or ideas to make bisecting
> Mesa easier?
> 



More information about the mesa-dev mailing list