Weird OpenCL compilation error when read_write image image is used

I know that NVIDIA cards don’t support OpenCL 2.0, but I got code from someone else that used a read_write image arg, and it took me a while to find the problem, because the output is simply “Error: Inavlid image type in tex.” (with the typo), with no line number mentioned. Would be nice if the OpenCL compiler does a better job of reporting this.

(If there’s a better place to report this, let me know.)