Source : https://www.mesa3d.org/intro.htmlThe Mesa project began as an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.
Over the years the project has grown to implement more graphics APIs, including OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC and Vulkan.
A variety of device drivers allows the Mesa libraries to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs.
Mesa ties into several other open-source projects: the Direct Rendering Infrastructure and X.org to provide OpenGL support on Linux, FreeBSD and other operating systems.
I. Introduction and features
Normally, you will see me compile and upload kernel only, but this time I am the one who upload Mesa. Weird huh , and this Mesa version not only available for Intel, but also for AMD and Nvidia too. And I'll update it regularly Yes, not only 19.3.4 like this but also version like Mesa 20.0 .
So the features are quite small, rather just some update since I can't modify Mesa source :
- Update libdrm to 2.4.100
- Compile with LLVM8
- Adapt drm_gralloc and gbm patches from Android-x86 team.
- Compile using GCC 5.4.1 and clang 3.8/7.0.2
- Turn on more things like Intel Iris and Vulkan for Intel&AMD (still trying to use it).
II. Intel Iris
What is Iris?
Source : https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/283The new "Iris" driver prototype is essentially our Mesa i965 driver reimagined and rebuilt from the ground up. Our main goal was to make the driver as efficient as possible, aiming for very low CPU overhead. We also decided to drop support for legacy hardware and outdated kernel drivers, freeing us up to design for the future without worrying about impacting the past. This let us ask, "if we were doing it all again...what would we want it to look like?"
While designing the new driver, we drew a lot of inspiration from our newer Vulkan driver, as well as a few other Gallium drivers.
@mido.fayad actually tested my Mesa 20 build with Intel iris since it's on by default. But with 19.3.x it doesn't turn on by default so we're trying a way to turn it on since the review seems good on linux.
And as we know about the support :
Might be only for Intel Gen 5th CPU and newer (Kinda weird that they said Gen 8+) so if you guys have this CPU. Wait for this driver to availiable and hope it can boost your graphicsSupports only Broadwell and newer (Gen8+); drops support for the older Gen4-7.5 GPUs, as well as Braswell/Cherrytrail.
(Also it only support Kernel 4.18+ so install benares is recommended)
Source : https://www.khronos.org/vulkan/Vulkan is a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
Now come to Vulkan. As you guy read in PhoenixOS Darkmatter Exo4.5 changelog, we now officialy support it. Unlike some modder like Loltrex - who don't even know about his Mesa , we know that Mesa provide 2 Vulkan libs , anv (named android-x86 by Android-x86 team) for Intel Graphics and radv for AMD Graphics.
(But I still not recommend Vulkan on POS yet, since it's still unstable and even Android-x86 team still strugling bringing support for Android 7.1 so........ don't be fooled until we or Android-x86 team found a way.)
At first, read this document to find out if your device support Vulkan :
Intel : https://www.intel.vn/content/www/vn/vi/support/articles/000005524/graphics-drivers.html
AMD : https://www.amd.com/en/technologies/vulkan
Vulkan Hardware Database : https://vulkan.gpuinfo.org/
To turn Vulkan on it's pretty simple, you just need to add these grub code to your grub2 config :
For Intel :
For AMD :
And check with some info tools to see if Vulkan is there.
IV. Bugs and Troubleshooting
For now, bugs are still expected. If you guys are having some weird graphic glitch/artifacts or some colored screen try to revert the files from drmbackup that I moved.
Also, for some AMD GPUs there might be some cases if FPS lock, I still need to know why. Me and @mido.fayad got this problem and we both use AMD, it happened in 3DMark's Physics test and PUBG too ?
Finally, Vulkan is unstable and still need to find a resolution for it
I'd like to say a huge thanks for Mauro Rossi, one of the contributor of Android-x86 team, he is the one who fixed compiling problem on Mesa 19.2+ and even made a specific version of Mesa 19.3.3 for nougat, ehich I use his commit for further version.
Also, I'd like to thank youling257, who shared some of his recipe and solution to compile Mesa and adding gralloc and gbm problem