Search code examples
cudatextures

Do CUDA texture object's support 3 channel textures?


The older texture references in CUDA only support 1, 2, and 4 channel textures (e.g., I would pad RGB colors to RGBA). Do the new CUDA texture object's support a 3 channel texture?

(I currently don't have access to a newer nVidia card to try it with and the documentation started to make my eyes bleed looking for an answer).


Solution

  • In the general description of texture memory which applies to both texture references and texture objects, it states:

    The texture object or the texture reference specifies:

    ...

    The type of a texel, which is restricted to the basic integer and single-precision floating-point types and any of the 1-, 2-, and 4-component vector types defined in char, short, int, long, longlong, float, double that are derived from the basic integer and single-precision floating-point types.

    So, no, 3-component vector types, even with texture objects, are not supported.