This forces the max thread count to be inlined with what blender expects. While this will make some shaders less eficient it avoid crashes / assert on shaders that could not compile. The performance impacts can be fixed by tackling the individual cases.