Yes, I did caveat my suggestion. Why not submit a fix if it's so simple ;-)
Assuming they play nice with the community, it could be a huge benefit to AMD in the long run.
Still, 2 million lines is a massive amount of code to start working on.
Propriatery drivers (especially nvidia), most likely has lots of similar game specific workarounds and optimizations (even going as far as overriding shaders in games with better ones they wrote). [1]
1: https://www.gamedev.net/forums/topic/666419-what-are-your-op...
If anyone wants to learn more about lower-level aspects of GPUs, the Vulkan driver code I linked is one of the best places to start. It directly implements the Vulkan API on one end and talks to the kernel drivers on the other end, so it's relatively easy to follow if you're a systems programmer with an API-level understanding of graphics. Just pick a Vulkan function of your choice and start tracing through the code, e.g. vkCmdDraw: https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/ra.... The Vulkan driver calls into some of the low-level radeonsi code I linked from the Gallium tree but it isn't a Gallium-based driver, so you don't have to deal with those extra layers of abstraction.
They are enabled via driconf [0]. Not nearly as many as what I imagine you'd find in the proprietary Windows drivers though.
[0] https://github.com/mesa3d/mesa/blob/master/src/util/00-mesa-...
Another way of looking at it is -- I started playing with openwrt for a relatively small router, with 5 ports plus wifi.
I was amazed at not only the amount of openwrt code required to support the different router families and the different router models, but at the sheer amount of stuff turned on by default in the kernel just in case I might need to load a module for some obscure feature or package. I assume the same goes for a gpu driver both at the source level and in the kernel.