we've got a problem with some GPU (e.g. ATI HD 4800) types. We use the Stream Kernel Analyzer to translate c code to GPU assembler code. To track down the error we created a small kernel, which produces the error:
"sample_resource(0)_sampler(0) o0, v0.x0\n"
We found out that the sample_resource(0)_sampler(0) gets back wrong data for the range 1...0x7F, 0x7F80...0x807F and 0xFF7F...0xFFFF. This means we get back, e.g. 0 for 1, 0 for 0x7F, etc.
On some GPUs it works correct (e.g. HD3870).
Seems that on newer GPUs there is something wrong.