40035046ca
Set the number of planes based on the number of pass channels. If the pass contains 2 passes or more than 4 passes set the number of planes to the previously used value of 32. This is needed because quite some areas check for the number of planes for various optimizations. For example, this is one of the factors which make IMB_create_gpu_texture() to choose the texture format. If the number of planes for the depth pass is set to the previously used this function will never consider using single channel GPU texture. Unfortunately, this change is not enough to make the GPU texture to use single channel format as the color space of the image buffer is also checked, and that is nullptr which means scene linear.