Skip to main content

cuTexRefSetAddressMode

Function cuTexRefSetAddressMode 

Source
pub unsafe extern "C" fn cuTexRefSetAddressMode(
    hTexRef: CUtexref,
    dim: c_int,
    am: CUaddress_mode,
) -> CUresult
👎Deprecated
Expand description

Sets the addressing mode for a texture reference.

Specifies the addressing mode am for the given dimension dim of the texture reference hTexRef. If dim is zero, the addressing mode is applied to the first parameter of the functions used to fetch from the texture; if dim is 1, the second, and so on. CUaddress_mode is defined as:

typedef enum CUaddress_mode_enum {
   CU_TR_ADDRESS_MODE_WRAP = 0,
   CU_TR_ADDRESS_MODE_CLAMP = 1,
   CU_TR_ADDRESS_MODE_MIRROR = 2,
   CU_TR_ADDRESS_MODE_BORDER = 3
} CUaddress_mode;

Note that this call has no effect if hTexRef is bound to linear memory. Also, if the flag, CU_TRSF_NORMALIZED_COORDINATES, is not set, the only supported address mode is CUaddress_mode_enum::CU_TR_ADDRESS_MODE_CLAMP.

§Parameters

  • hTexRef: Texture reference.
  • dim: Dimension.
  • am: Addressing mode to set.

§Return value

See also: cuTexRefSetAddress_v2, cuTexRefSetAddress2D, cuTexRefSetArray, cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress_v2, cuTexRefGetAddressMode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat.