Texture management#
-
hipError_t hipCreateTextureObject(hipTextureObject_t *pTexObject, const hipResourceDesc *pResDesc, const hipTextureDesc *pTexDesc, const struct hipResourceViewDesc *pResViewDesc)#
Creates a texture object.
Note
3D linear filter isn’t supported on GFX90A boards, on which the API
hipCreateTextureObject
will return hipErrorNotSupported.- Parameters:
pTexObject – [out] pointer to the texture object to create
pResDesc – [in] pointer to resource descriptor
pTexDesc – [in] pointer to texture descriptor
pResViewDesc – [in] pointer to resource view descriptor
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorNotSupported, hipErrorOutOfMemory
-
hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject)#
Destroys a texture object.
- Parameters:
textureObject – [in] texture object to destroy
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGetChannelDesc(hipChannelFormatDesc *desc, hipArray_const_t array)#
Gets the channel descriptor in an array.
- Parameters:
desc – [in] pointer to channel format descriptor
array – [out] memory array on the device
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc *pResDesc, hipTextureObject_t textureObject)#
Gets resource descriptor for the texture object.
- Parameters:
pResDesc – [out] pointer to resource descriptor
textureObject – [in] texture object
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGetTextureObjectResourceViewDesc(struct hipResourceViewDesc *pResViewDesc, hipTextureObject_t textureObject)#
Gets resource view descriptor for the texture object.
- Parameters:
pResViewDesc – [out] pointer to resource view descriptor
textureObject – [in] texture object
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGetTextureObjectTextureDesc(hipTextureDesc *pTexDesc, hipTextureObject_t textureObject)#
Gets texture descriptor for the texture object.
- Parameters:
pTexDesc – [out] pointer to texture descriptor
textureObject – [in] texture object
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipTexObjectCreate(hipTextureObject_t *pTexObject, const HIP_RESOURCE_DESC *pResDesc, const HIP_TEXTURE_DESC *pTexDesc, const HIP_RESOURCE_VIEW_DESC *pResViewDesc)#
Creates a texture object.
- Parameters:
pTexObject – [out] pointer to texture object to create
pResDesc – [in] pointer to resource descriptor
pTexDesc – [in] pointer to texture descriptor
pResViewDesc – [in] pointer to resource view descriptor
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipTexObjectDestroy(hipTextureObject_t texObject)#
Destroys a texture object.
- Parameters:
texObject – [in] texture object to destroy
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipTexObjectGetResourceDesc(HIP_RESOURCE_DESC *pResDesc, hipTextureObject_t texObject)#
Gets resource descriptor of a texture object.
- Parameters:
pResDesc – [out] pointer to resource descriptor
texObject – [in] texture object
- Returns:
hipSuccess, hipErrorNotSupported, hipErrorInvalidValue
-
hipError_t hipTexObjectGetResourceViewDesc(HIP_RESOURCE_VIEW_DESC *pResViewDesc, hipTextureObject_t texObject)#
Gets resource view descriptor of a texture object.
- Parameters:
pResViewDesc – [out] pointer to resource view descriptor
texObject – [in] texture object
- Returns:
hipSuccess, hipErrorNotSupported, hipErrorInvalidValue
-
hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC *pTexDesc, hipTextureObject_t texObject)#
Gets texture descriptor of a texture object.
- Parameters:
pTexDesc – [out] pointer to texture descriptor
texObject – [in] texture object
- Returns:
hipSuccess, hipErrorNotSupported, hipErrorInvalidValue
-
hipError_t hipMallocMipmappedArray(hipMipmappedArray_t *mipmappedArray, const struct hipChannelFormatDesc *desc, struct hipExtent extent, unsigned int numLevels, unsigned int flags)#
Allocate a mipmapped array on the device.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
mipmappedArray – [out] - Pointer to allocated mipmapped array in device memory
desc – [in] - Requested channel format
extent – [in] - Requested allocation size (width field in elements)
numLevels – [in] - Number of mipmap levels to allocate
flags – [in] - Flags for extensions
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorMemoryAllocation
-
hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray)#
Frees a mipmapped array on the device.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
mipmappedArray – [in] - Pointer to mipmapped array to free
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGetMipmappedArrayLevel(hipArray_t *levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level)#
Gets a mipmap level of a HIP mipmapped array.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
levelArray – [out] - Returned mipmap level HIP array
mipmappedArray – [in] - HIP mipmapped array
level – [in] - Mipmap level
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t *pHandle, HIP_ARRAY3D_DESCRIPTOR *pMipmappedArrayDesc, unsigned int numMipmapLevels)#
Create a mipmapped array.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
pHandle – [out] pointer to mipmapped array
pMipmappedArrayDesc – [in] mipmapped array descriptor
numMipmapLevels – [in] mipmap level
- Returns:
hipSuccess, hipErrorNotSupported, hipErrorInvalidValue
-
hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray)#
Destroy a mipmapped array.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
hMipmappedArray – [out] pointer to mipmapped array to destroy
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipMipmappedArrayGetLevel(hipArray_t *pLevelArray, hipMipmappedArray_t hMipMappedArray, unsigned int level)#
Get a mipmapped array on a mipmapped level.
Note
This API is implemented on Linux and is under development on Microsoft Windows.
- Parameters:
pLevelArray – [in] Pointer of array
hMipMappedArray – [out] Pointer of mipmapped array on the requested mipmap level
level – [out] Mipmap level
- Returns:
hipSuccess, hipErrorInvalidValue