Why whould I want to use surfaces instead of textures or global memory?

I saw the new surface interface with Cuda 3.1, but it’s not clear why I would want to use it

It does add write support, but removes sampling and normalized coordinates support. On the other hand, it can only work with arrays and not linear memory.

Does it provide cache memory reads, and cache coherency or is there any other reason that I would want to use surfaces instead of textures or global memory?

Thanks

Surfaces mainly exist to provide a mechanism to write to texture memory (CUDA arrays). Surface reads are cached, but I can’t think of any good reasons you’d want to use them instead of texture reads.

If you want texture features like interpolation and normalized coordinates you can always bind a texture reference to the same CUDA array.

Surfaces mainly exist to provide a mechanism to write to texture memory (CUDA arrays). Surface reads are cached, but I can’t think of any good reasons you’d want to use them instead of texture reads.

If you want texture features like interpolation and normalized coordinates you can always bind a texture reference to the same CUDA array.