Fixed a bug that caused an error if a depth texture was read back