FreeSpace models incorrectly rendered on Polaris cards, causing system freeze
System information
- OS: current ArchLinux
- GPU: occurs on both Gigabyte RX560 4GB Gaming OC and MSI Radeon RX480 Gaming X 8GB (flashed to RX580) (used separately, not connected at the same time)
- Kernel version: 5.11.8 and before
- Mesa version: 21.0.1 and before (at least back to 19.0)
- Desktop manager and compositor: GNOME on Wayland, also occurs on GNOME on Xorg
Issue description
I'm getting a freeze when playing the game FreeSpace Open (www.hard-light.net) (with shadows enabled and using community made high resolution ship models) through mesa. The freeze can be triggered by playing with or simply viewing multiple models. It does not occur when playing through AMDGPU-PRO's OpenGL implementation. Textures and parts of the UI are not rendered or rendered incorrectly prior to the freeze.
I'm attaching an apitrace of the shortest way to reproduce the faulty textures. Frames 119-195 are most relevant. The freeze does never occur through apitrace. Replaying this trace sometimes results in everything being displayed correctly, sometimes in a system freeze. I'm also attaching a screenshot of the incorrectly rendered UI, as well as a dmesg log of the amdgpu errors while rendering incorrect textures.
dmesg-output fs2_open_21_1_0_x64_r20210328_12672d0c2_10.trace