Texture Management

Texture Management#

HIP Runtime API Reference: Texture Management
Texture Management
Collaboration diagram for Texture Management:

Modules

 Texture Management [Deprecated]
 
 Texture Management [Not supported]
 

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 hipCreateTextureObject (hipTextureObject_t *pTexObject, const hipResourceDesc *pResDesc, const hipTextureDesc *pTexDesc, const struct hipResourceViewDesc *pResViewDesc)
 Creates a texture object.
 
hipError_t hipDestroyTextureObject (hipTextureObject_t textureObject)
 Destroys a texture object.
 
hipError_t hipGetChannelDesc (hipChannelFormatDesc *desc, hipArray_const_t array)
 Gets the channel descriptor in an array.
 
hipError_t hipGetTextureObjectResourceDesc (hipResourceDesc *pResDesc, hipTextureObject_t textureObject)
 Gets resource descriptor for the texture object.
 
hipError_t hipGetTextureObjectResourceViewDesc (struct hipResourceViewDesc *pResViewDesc, hipTextureObject_t textureObject)
 Gets resource view descriptor for the texture object.
 
hipError_t hipGetTextureObjectTextureDesc (hipTextureDesc *pTexDesc, hipTextureObject_t textureObject)
 Gets texture descriptor for the texture object.
 
hipError_t hipTexRefSetAddressMode (textureReference *texRef, int dim, enum hipTextureAddressMode am)
 
hipError_t hipTexRefSetArray (textureReference *tex, hipArray_const_t array, unsigned int flags)
 
hipError_t hipTexRefSetFilterMode (textureReference *texRef, enum hipTextureFilterMode fm)
 
hipError_t hipTexRefSetFlags (textureReference *texRef, unsigned int Flags)
 
hipError_t hipTexRefSetFormat (textureReference *texRef, hipArray_Format fmt, int NumPackedComponents)
 
hipError_t hipTexObjectCreate (hipTextureObject_t *pTexObject, const HIP_RESOURCE_DESC *pResDesc, const HIP_TEXTURE_DESC *pTexDesc, const HIP_RESOURCE_VIEW_DESC *pResViewDesc)
 
hipError_t hipTexObjectDestroy (hipTextureObject_t texObject)
 
hipError_t hipTexObjectGetResourceDesc (HIP_RESOURCE_DESC *pResDesc, hipTextureObject_t texObject)
 
hipError_t hipTexObjectGetResourceViewDesc (HIP_RESOURCE_VIEW_DESC *pResViewDesc, hipTextureObject_t texObject)
 
hipError_t hipTexObjectGetTextureDesc (HIP_TEXTURE_DESC *pTexDesc, hipTextureObject_t texObject)
 

Detailed Description



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

Function Documentation

◆ 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

◆ hipCreateTextureObject()

hipError_t hipCreateTextureObject ( hipTextureObject_t pTexObject,
const hipResourceDesc pResDesc,
const hipTextureDesc pTexDesc,
const struct hipResourceViewDesc pResViewDesc 
)

Creates a texture object.

Parameters
[out]pTexObjectpointer to the texture object to create
[in]pResDescpointer to resource descriptor
[in]pTexDescpointer to texture descriptor
[in]pResViewDescpointer to resource view descriptor
Returns
hipSuccess, hipErrorInvalidValue

◆ hipDestroyTextureObject()

hipError_t hipDestroyTextureObject ( hipTextureObject_t  textureObject)

Destroys a texture object.

Parameters
[in]textureObjecttexture object to destroy
Returns
hipSuccess, hipErrorInvalidValue

◆ hipGetChannelDesc()

hipError_t hipGetChannelDesc ( hipChannelFormatDesc desc,
hipArray_const_t  array 
)

Gets the channel descriptor in an array.

Parameters
[in]descpointer to channel format descriptor
[out]arraymemory array on the device
Returns
hipSuccess, hipErrorInvalidValue

◆ hipGetTextureObjectResourceDesc()

hipError_t hipGetTextureObjectResourceDesc ( hipResourceDesc pResDesc,
hipTextureObject_t  textureObject 
)

Gets resource descriptor for the texture object.

Parameters
[out]pResDescpointer to resource descriptor
[in]textureObjecttexture object
Returns
hipSuccess, hipErrorInvalidValue

◆ hipGetTextureObjectResourceViewDesc()

hipError_t hipGetTextureObjectResourceViewDesc ( struct hipResourceViewDesc pResViewDesc,
hipTextureObject_t  textureObject 
)

Gets resource view descriptor for the texture object.

Parameters
[out]pResViewDescpointer to resource view descriptor
[in]textureObjecttexture object
Returns
hipSuccess, hipErrorInvalidValue

◆ hipGetTextureObjectTextureDesc()

hipError_t hipGetTextureObjectTextureDesc ( hipTextureDesc pTexDesc,
hipTextureObject_t  textureObject 
)

Gets texture descriptor for the texture object.

Parameters
[out]pTexDescpointer to texture descriptor
[in]textureObjecttexture object
Returns
hipSuccess, hipErrorInvalidValue

◆ 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

◆ hipTexObjectCreate()

hipError_t hipTexObjectCreate ( hipTextureObject_t pTexObject,
const HIP_RESOURCE_DESC pResDesc,
const HIP_TEXTURE_DESC pTexDesc,
const HIP_RESOURCE_VIEW_DESC pResViewDesc 
)

◆ hipTexObjectDestroy()

hipError_t hipTexObjectDestroy ( hipTextureObject_t  texObject)

◆ hipTexObjectGetResourceDesc()

hipError_t hipTexObjectGetResourceDesc ( HIP_RESOURCE_DESC pResDesc,
hipTextureObject_t  texObject 
)

◆ hipTexObjectGetResourceViewDesc()

hipError_t hipTexObjectGetResourceViewDesc ( HIP_RESOURCE_VIEW_DESC pResViewDesc,
hipTextureObject_t  texObject 
)

◆ hipTexObjectGetTextureDesc()

hipError_t hipTexObjectGetTextureDesc ( HIP_TEXTURE_DESC pTexDesc,
hipTextureObject_t  texObject 
)

◆ hipTexRefSetAddressMode()

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

◆ hipTexRefSetArray()

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

◆ hipTexRefSetFilterMode()

hipError_t hipTexRefSetFilterMode ( textureReference texRef,
enum hipTextureFilterMode  fm 
)

◆ hipTexRefSetFlags()

hipError_t hipTexRefSetFlags ( textureReference texRef,
unsigned int  Flags 
)

◆ hipTexRefSetFormat()

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