Improved Z/depth auto generation handling