Texture Management [Deprecated]

Texture Management [Deprecated]#

HIP Runtime API Reference: Texture Management [Deprecated]
Texture Management [Deprecated]
Collaboration diagram for Texture Management [Deprecated]:

Functions

hipError_t hipBindTextureToMipmappedArray (const textureReference *tex, hipMipmappedArray_const_t mipmappedArray, const hipChannelFormatDesc *desc)
 Binds a mipmapped array to a texture.
 
hipError_t hipGetTextureReference (const textureReference **texref, const void *symbol)
 Gets the texture reference related with the symbol.
 
hipError_t hipTexRefGetBorderColor (float *pBorderColor, const textureReference *texRef)
 Gets the border color used by a texture reference.
 
hipError_t hipTexRefGetArray (hipArray_t *pArray, const textureReference *texRef)
 Gets the array bound to a texture reference.
 
hipError_t hipTexRefSetAddressMode (textureReference *texRef, int dim, enum hipTextureAddressMode am)
 Sets address mode for a texture reference.
 
hipError_t hipTexRefSetArray (textureReference *tex, hipArray_const_t array, unsigned int flags)
 Binds an array as a texture reference.
 
hipError_t hipTexRefSetFilterMode (textureReference *texRef, enum hipTextureFilterMode fm)
 Set filter mode for a texture reference.
 
hipError_t hipTexRefSetFlags (textureReference *texRef, unsigned int Flags)
 Set flags for a texture reference.
 
hipError_t hipTexRefSetFormat (textureReference *texRef, hipArray_Format fmt, int NumPackedComponents)
 Set format for a texture reference.
 
hipError_t hipBindTexture (size_t *offset, const textureReference *tex, const void *devPtr, const hipChannelFormatDesc *desc, size_t size)
 Binds a memory area to a texture.
 
hipError_t hipBindTexture2D (size_t *offset, const textureReference *tex, const void *devPtr, const hipChannelFormatDesc *desc, size_t width, size_t height, size_t pitch)
 Binds a 2D memory area to a texture.
 
hipError_t hipBindTextureToArray (const textureReference *tex, hipArray_const_t array, const hipChannelFormatDesc *desc)
 Binds a memory area to a texture.
 
hipError_t hipGetTextureAlignmentOffset (size_t *offset, const textureReference *texref)
 Get the offset of the alignment in a texture.
 
hipError_t hipUnbindTexture (const textureReference *tex)
 Unbinds a texture.
 
hipError_t hipTexRefGetAddress (hipDeviceptr_t *dev_ptr, const textureReference *texRef)
 Gets the address for a texture reference.
 
hipError_t hipTexRefGetAddressMode (enum hipTextureAddressMode *pam, const textureReference *texRef, int dim)
 Gets the address mode for a texture reference.
 
hipError_t hipTexRefGetFilterMode (enum hipTextureFilterMode *pfm, const textureReference *texRef)
 Gets filter mode for a texture reference.
 
hipError_t hipTexRefGetFlags (unsigned int *pFlags, const textureReference *texRef)
 Gets flags for a texture reference.
 
hipError_t hipTexRefGetFormat (hipArray_Format *pFormat, int *pNumChannels, const textureReference *texRef)
 Gets texture format for a texture reference.
 
hipError_t hipTexRefGetMaxAnisotropy (int *pmaxAnsio, const textureReference *texRef)
 Gets the maximum anisotropy for a texture reference.
 
hipError_t hipTexRefGetMipmapFilterMode (enum hipTextureFilterMode *pfm, const textureReference *texRef)
 Gets the mipmap filter mode for a texture reference.
 
hipError_t hipTexRefGetMipmapLevelBias (float *pbias, const textureReference *texRef)
 Gets the mipmap level bias for a texture reference.
 
hipError_t hipTexRefGetMipmapLevelClamp (float *pminMipmapLevelClamp, float *pmaxMipmapLevelClamp, const textureReference *texRef)
 Gets the minimum and maximum mipmap level clamps for a texture reference.
 
hipError_t hipTexRefGetMipMappedArray (hipMipmappedArray_t *pArray, const textureReference *texRef)
 Gets the mipmapped array bound to a texture reference.
 
hipError_t hipTexRefSetAddress (size_t *ByteOffset, textureReference *texRef, hipDeviceptr_t dptr, size_t bytes)
 Sets an bound address for a texture reference.
 
hipError_t hipTexRefSetAddress2D (textureReference *texRef, const HIP_ARRAY_DESCRIPTOR *desc, hipDeviceptr_t dptr, size_t Pitch)
 Set a bind an address as a 2D texture reference.
 
hipError_t hipTexRefSetMaxAnisotropy (textureReference *texRef, unsigned int maxAniso)
 Sets the maximum anisotropy for a texture reference.
 
hipError_t hipTexRefSetBorderColor (textureReference *texRef, float *pBorderColor)
 Sets border color for a texture reference.
 
hipError_t hipTexRefSetMipmapFilterMode (textureReference *texRef, enum hipTextureFilterMode fm)
 Sets mipmap filter mode for a texture reference.
 
hipError_t hipTexRefSetMipmapLevelBias (textureReference *texRef, float bias)
 Sets mipmap level bias for a texture reference.
 
hipError_t hipTexRefSetMipmapLevelClamp (textureReference *texRef, float minMipMapLevelClamp, float maxMipMapLevelClamp)
 Sets mipmap level clamp for a texture reference.
 
hipError_t hipTexRefSetMipmappedArray (textureReference *texRef, struct hipMipmappedArray *mipmappedArray, unsigned int Flags)
 Binds mipmapped array to a texture reference.
 

Detailed Description

This section describes the deprecated texture management functions of HIP runtime API.

Function Documentation

◆ hipBindTexture()

hipError_t hipBindTexture ( size_t *  offset,
const textureReference tex,
const void *  devPtr,
const hipChannelFormatDesc desc,
size_t  size 
)

Binds a memory area to a texture.

Parameters
[in]offsetOffset in bytes.
[in]texTexture to bind.
[in]devPtrPointer of memory on the device.
[in]descPointer of channel format descriptor.
[in]sizeSize of memory in bites.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipBindTexture2D()

hipError_t hipBindTexture2D ( size_t *  offset,
const textureReference tex,
const void *  devPtr,
const hipChannelFormatDesc desc,
size_t  width,
size_t  height,
size_t  pitch 
)

Binds a 2D memory area to a texture.

Parameters
[in]offsetOffset in bytes.
[in]texTexture to bind.
[in]devPtrPointer of 2D memory area on the device.
[in]descPointer of channel format descriptor.
[in]widthWidth in texel units.
[in]heightHeight in texel units.
[in]pitchPitch in bytes.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipBindTextureToArray()

hipError_t hipBindTextureToArray ( const textureReference tex,
hipArray_const_t  array,
const hipChannelFormatDesc desc 
)

Binds a memory area to a texture.

Parameters
[in]texPointer of texture reference.
[in]arrayArray to bind.
[in]descPointer of channel format descriptor.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipBindTextureToMipmappedArray()

hipError_t hipBindTextureToMipmappedArray ( const textureReference tex,
hipMipmappedArray_const_t  mipmappedArray,
const hipChannelFormatDesc desc 
)

Binds a mipmapped array to a texture.

Parameters
[in]texpointer to the texture reference to bind
[in]mipmappedArraymemory mipmapped array on the device
[in]descopointer to the channel format
Returns
hipSuccess, hipErrorInvalidValue

◆ hipGetTextureAlignmentOffset()

hipError_t hipGetTextureAlignmentOffset ( size_t *  offset,
const textureReference texref 
)

Get the offset of the alignment in a texture.

Parameters
[in]offsetOffset in bytes.
[in]texrefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipGetTextureReference()

hipError_t hipGetTextureReference ( const textureReference **  texref,
const void *  symbol 
)

Gets the texture reference related with the symbol.

Parameters
[out]texreftexture reference
[in]symbolpointer to the symbol related with the texture for the reference
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefGetAddress()

hipError_t hipTexRefGetAddress ( hipDeviceptr_t dev_ptr,
const textureReference texRef 
)

Gets the address for a texture reference.

Parameters
[out]dev_ptrPointer of device address.
[in]texRefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetAddressMode()

hipError_t hipTexRefGetAddressMode ( enum hipTextureAddressMode pam,
const textureReference texRef,
int  dim 
)

Gets the address mode for a texture reference.

Parameters
[out]pamPointer of address mode.
[in]texRefPointer of texture reference.
[in]dimDimension.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetArray()

hipError_t hipTexRefGetArray ( hipArray_t pArray,
const textureReference texRef 
)

Gets the array bound to a texture reference.

Parameters
[in]pArrayReturned array.
[in]texReftexture reference.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefGetBorderColor()

hipError_t hipTexRefGetBorderColor ( float *  pBorderColor,
const textureReference texRef 
)

Gets the border color used by a texture reference.

Parameters
[out]pBorderColorReturned Type and Value of RGBA color.
[in]texRefTexture reference.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefGetFilterMode()

hipError_t hipTexRefGetFilterMode ( enum hipTextureFilterMode pfm,
const textureReference texRef 
)

Gets filter mode for a texture reference.

Parameters
[out]pfmPointer of filter mode.
[in]texRefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetFlags()

hipError_t hipTexRefGetFlags ( unsigned int *  pFlags,
const textureReference texRef 
)

Gets flags for a texture reference.

Parameters
[out]pFlagsPointer of flags.
[in]texRefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetFormat()

hipError_t hipTexRefGetFormat ( hipArray_Format pFormat,
int *  pNumChannels,
const textureReference texRef 
)

Gets texture format for a texture reference.

Parameters
[out]pFormatPointer of the format.
[out]pNumChannelsPointer of number of channels.
[in]texRefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetMaxAnisotropy()

hipError_t hipTexRefGetMaxAnisotropy ( int *  pmaxAnsio,
const textureReference texRef 
)

Gets the maximum anisotropy for a texture reference.

Parameters
[out]pmaxAnsioPointer of the maximum anisotropy.
[in]texRefPointer of texture reference.
Returns
hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetMipmapFilterMode()

hipError_t hipTexRefGetMipmapFilterMode ( enum hipTextureFilterMode pfm,
const textureReference texRef 
)

Gets the mipmap filter mode for a texture reference.

Parameters
[out]pfmPointer of the mipmap filter mode.
[in]texRefPointer of texture reference.
Returns
hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetMipmapLevelBias()

hipError_t hipTexRefGetMipmapLevelBias ( float *  pbias,
const textureReference texRef 
)

Gets the mipmap level bias for a texture reference.

Parameters
[out]pbiasPointer of the mipmap level bias.
[in]texRefPointer of texture reference.
Returns
hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetMipmapLevelClamp()

hipError_t hipTexRefGetMipmapLevelClamp ( float *  pminMipmapLevelClamp,
float *  pmaxMipmapLevelClamp,
const textureReference texRef 
)

Gets the minimum and maximum mipmap level clamps for a texture reference.

Parameters
[out]pminMipmapLevelClampPointer of the minimum mipmap level clamp.
[out]pmaxMipmapLevelClampPointer of the maximum mipmap level clamp.
[in]texRefPointer of texture reference.
Returns
hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefGetMipMappedArray()

hipError_t hipTexRefGetMipMappedArray ( hipMipmappedArray_t *  pArray,
const textureReference texRef 
)

Gets the mipmapped array bound to a texture reference.

Parameters
[out]pArrayPointer of the mipmapped array.
[in]texRefPointer of texture reference.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetAddress()

hipError_t hipTexRefSetAddress ( size_t *  ByteOffset,
textureReference texRef,
hipDeviceptr_t  dptr,
size_t  bytes 
)

Sets an bound address for a texture reference.

Parameters
[out]ByteOffsetPointer of the offset in bytes.
[in]texRefPointer of texture reference.
[in]dptrPointer of device address to bind.
[in]bytesSize in bytes.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetAddress2D()

hipError_t hipTexRefSetAddress2D ( textureReference texRef,
const HIP_ARRAY_DESCRIPTOR desc,
hipDeviceptr_t  dptr,
size_t  Pitch 
)

Set a bind an address as a 2D texture reference.

Parameters
[in]texRefPointer of texture reference.
[in]descPointer of array descriptor.
[in]dptrPointer of device address to bind.
[in]PitchPitch in bytes.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetAddressMode()

hipError_t hipTexRefSetAddressMode ( textureReference texRef,
int  dim,
enum hipTextureAddressMode  am 
)

Sets address mode for a texture reference.

Parameters
[in]texReftexture reference.
[in]dimDimension of the texture.
[in]amValue of the texture address mode.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetArray()

hipError_t hipTexRefSetArray ( textureReference tex,
hipArray_const_t  array,
unsigned int  flags 
)

Binds an array as a texture reference.

Parameters
[in]texPointer texture reference.
[in]arrayArray to bind.
[in]flagsFlags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetBorderColor()

hipError_t hipTexRefSetBorderColor ( textureReference texRef,
float *  pBorderColor 
)

Sets border color for a texture reference.

Parameters
[in]texRefPointer of texture reference.
[in]pBorderColorPointer of border color.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetFilterMode()

hipError_t hipTexRefSetFilterMode ( textureReference texRef,
enum hipTextureFilterMode  fm 
)

Set filter mode for a texture reference.

Parameters
[in]texRefPointer texture reference.
[in]fmValue of texture filter mode.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetFlags()

hipError_t hipTexRefSetFlags ( textureReference texRef,
unsigned int  Flags 
)

Set flags for a texture reference.

Parameters
[in]texRefPointer texture reference.
[in]FlagsValue of flags.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetFormat()

hipError_t hipTexRefSetFormat ( textureReference texRef,
hipArray_Format  fmt,
int  NumPackedComponents 
)

Set format for a texture reference.

Parameters
[in]texRefPointer texture reference.
[in]fmtValue of format.
[in]NumPackedComponentsNumber of components per array.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipTexRefSetMaxAnisotropy()

hipError_t hipTexRefSetMaxAnisotropy ( textureReference texRef,
unsigned int  maxAniso 
)

Sets the maximum anisotropy for a texture reference.

Parameters
[in]texRefPointer of texture reference.
[out]maxAnisoValue of the maximum anisotropy.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetMipmapFilterMode()

hipError_t hipTexRefSetMipmapFilterMode ( textureReference texRef,
enum hipTextureFilterMode  fm 
)

Sets mipmap filter mode for a texture reference.

Parameters
[in]texRefPointer of texture reference.
[in]fmValue of filter mode.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetMipmapLevelBias()

hipError_t hipTexRefSetMipmapLevelBias ( textureReference texRef,
float  bias 
)

Sets mipmap level bias for a texture reference.

Parameters
[in]texRefPointer of texture reference.
[in]biasValue of mipmap bias.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetMipmapLevelClamp()

hipError_t hipTexRefSetMipmapLevelClamp ( textureReference texRef,
float  minMipMapLevelClamp,
float  maxMipMapLevelClamp 
)

Sets mipmap level clamp for a texture reference.

Parameters
[in]texRefPointer of texture reference.
[in]minMipMapLevelClampValue of minimum mipmap level clamp.
[in]maxMipMapLevelClampValue of maximum mipmap level clamp.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.

◆ hipTexRefSetMipmappedArray()

hipError_t hipTexRefSetMipmappedArray ( textureReference texRef,
struct hipMipmappedArray mipmappedArray,
unsigned int  Flags 
)

Binds mipmapped array to a texture reference.

Parameters
[in]texRefPointer of texture reference to bind.
[in]mipmappedArrayPointer of mipmapped array to bind.
[in]FlagsFlags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.
Returns
hipSuccess, hipErrorInvalidValue
Warning
This API is deprecated.

◆ hipUnbindTexture()

hipError_t hipUnbindTexture ( const textureReference tex)

Unbinds a texture.

Parameters
[in]texTexture to unbind.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported
Warning
This API is deprecated.