Mesa's DRIRC Options To Become More Driver-Agnostic
There's good news for both Mesa users and developers when needing to workaround OpenGL bugs / buggy applications and games.
Mesa's DRIRC file allows for Mesa DRI drivers via driconf to workaround application bugs, such as issues for the older Unigine benchmarks with improper GLSL code. Maintaining DRIRC though is a mess when needing to come up with this quirk handling, but Martin Peres of Intel is hoping to improve the situation.
With a new patch series published on Friday he explained the situation:
Mesa's DRIRC file allows for Mesa DRI drivers via driconf to workaround application bugs, such as issues for the older Unigine benchmarks with improper GLSL code. Maintaining DRIRC though is a mess when needing to come up with this quirk handling, but Martin Peres of Intel is hoping to improve the situation.
With a new patch series published on Friday he explained the situation:
Right now, adding a new drirc parameter is painful because it involvesadding a new entry in the gl constant structure, making sure that the field is set to the right value by default in osmesa drivers, adding the parameter in every driver's drirc xml and then reading the value at runtime to set it in the gl constant structure.More details here with the sixteen patches that adjust a few hundred lines of Mesa code.
With such an error-prone process, it is no wonder that driver devs patched only their own driver and let the other driver devs patch their own driver. This led to drivers supporting very different options...
I set out to fix this issue when I wanted to introduce the equivalent of MESA_EXTENSION_OVERRIDE to drirc to make the older unigine benchmarks work. More recently, I also noticed I needed to add the equivalent of MESA_GL_VERSION_OVERRIDE which made it clearer than such a shared-options approach would be beneficial.
This series unifies most of the shared options, introduces two more options and finally fixes the unigine benchmarks!
Ultimately, I would like us to move away from environment variables to use more the drirc options which can be set per-application through the drirc file or by using an environment variable.
