Moved texture/surface error codes into the tex module.