Compatibility fixes for Genshin Impact on AMD GPUs
Background
After the upgrade, Genshin Impact does not have special support for AMD GPU, so the AMD GPU will crash in the libgallium library when running. This is a brand new 3D engine framework proposed by Mesa. After we reported this problem to Mesa officials, we got a fix Genshin Impact crashed on AMD GPU. However, after the crash was fixed, there is still a problem of missing textures (that is, the exterior scenes in the game become some square boxes).
Solution
This problem can be solved by enabling the XMLConfig function of Mesa to run compatibly. The principle of this function is to return the characteristic value recorded in XMLConfig to the caller for the specified program name. The problem of texture loss can be fixed by using the name of another GPU instead of AMD GPU to return to Genshin Impact.
This file exists in etc/drirc.d/00-mesa-defaults.conf of the Wendor image.
When OpenFDE is turned off and you log in to the Linux system, you can manually mount the vendor image to view:
sudo mount /usr/share/waydroid-extra/images/vendor.img /mnt
sudo vim /mnt/etc/drirc.d/00-mesa-defaults.conf
910 <application name="Genshin Impact" executable="com.miHoYo.Yuanshen">
911 <option name="ignore_discard_framebuffer" value="true" />
912 <option name="force_gl_renderer" value="Adreno (TM) 630"/>
913 <option name="force_gl_vendor" value="Qualcomm"/>
914 </application>
esc
:wq
sudo umount /mnt
It should be noted that this compatibility solution may sometimes cause the entire screen of Genshin Impact to display in red. In this case, you need to comment or delete the contents of lines 910 to 914 above. First, let Genshin Impact start normally and enter the screen (with texture loss). Then exit fde, and follow the above steps to add the contents of lines 910 to 914. Enter fde again to enter the screen normally.
If you are interested, you can click https://github.com/openfde/openfde/issues/15