AMD Linux Graphics No Longer Unusable For Blender Developers: 251 To 9 Seconds Speed-Up
Two weeks ago a bug report was opened for Mesa that when using Radeon RX 7900 XT or Radeon Pro WX 9100 graphics, Blender's Eevee shader node trees are unusably slow. A fix has now been merged in reducing that shader compilation time from around 251 seconds to now getting done in just about 9 seconds.
Sebastian Parborg of the Blender Studio crew found that "shader compilation takes way too long on our AMD GPUs" when using their AMD graphics hardware on Linux with Blender. Parborg went on to explain:
Within days of opening that bug report, the issue was analyzed with Valve engineers doing much of the analysis and work.
Timothy Arceri of Valve's Linux graphics team ended up coming up with the change to significantly optimize nir_opt_copy_prop_vars within Mesa's NIR compiler. This lowers the Blender shader compile time in Arceri's testing from 251 seconds down to a mere 9 seconds! For a CTS test case is also a 2.38 to 0.68 second improvement for a more mundane shader.
The code was merged yesterday to Mesa 23.3-devel. Testing at Blender Studio also revealed shader compilation times are now comparable to that when using the NVIDIA graphics driver. Thus AMD Linux graphics are back to being appropriate for Blender developers when dealing with heavy shaders.
Sebastian Parborg of the Blender Studio crew found that "shader compilation takes way too long on our AMD GPUs" when using their AMD graphics hardware on Linux with Blender. Parborg went on to explain:
"For example some of our scenes with many shader trees would take 20 seconds to compile the shaders on our Nvidia GPUs while it would take more than 16 minutes to finish shader compilation on our AMD GPUs. Because of this we had to switch out a lot of our AMD GPUs as previewing renders or adjusting the shader trees became impossible for our artists that were on AMD GPUs. Even final renders were not feasible because of this.
I have created a severely cut down example file that should still demonstrate the issue. I've tried this file on an WX 9100 and an RX 7900XT. Both takes around 2-3 minutes to compile the shaders without any cache. On the Nvidia cards I've tested, the compilation instead takes 6-7 seconds without any cache."
Within days of opening that bug report, the issue was analyzed with Valve engineers doing much of the analysis and work.
Timothy Arceri of Valve's Linux graphics team ended up coming up with the change to significantly optimize nir_opt_copy_prop_vars within Mesa's NIR compiler. This lowers the Blender shader compile time in Arceri's testing from 251 seconds down to a mere 9 seconds! For a CTS test case is also a 2.38 to 0.68 second improvement for a more mundane shader.
The code was merged yesterday to Mesa 23.3-devel. Testing at Blender Studio also revealed shader compilation times are now comparable to that when using the NVIDIA graphics driver. Thus AMD Linux graphics are back to being appropriate for Blender developers when dealing with heavy shaders.
116 Comments