SWDEV-299127 - Support External Mipmap
Support hipExternalMemoryGetMappedMipmappedArray(). Add ImageExternalBuffer to differiate ImageBuffer. Currently we only support tiling_optimal mode as vulkan driver doesn't provide tiling information. Change-Id: I7e3524cdde53e4df9f728894bcebf4bd3f58d4d9
This commit is contained in:
@@ -1284,6 +1284,7 @@ typedef enum cudaExternalMemoryHandleType hipExternalMemoryHandleType;
|
||||
typedef struct cudaExternalMemoryHandleDesc hipExternalMemoryHandleDesc;
|
||||
typedef struct cudaExternalMemoryBufferDesc hipExternalMemoryBufferDesc;
|
||||
typedef cudaExternalMemory_t hipExternalMemory_t;
|
||||
typedef cudaExternalMemoryMipmappedArrayDesc hipExternalMemoryMipmappedArrayDesc;
|
||||
|
||||
typedef enum cudaExternalSemaphoreHandleType hipExternalSemaphoreHandleType;
|
||||
#define hipExternalSemaphoreHandleTypeOpaqueFd cudaExternalSemaphoreHandleTypeOpaqueFd
|
||||
@@ -2944,6 +2945,14 @@ inline static hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExte
|
||||
return hipCUDAErrorTohipError(cudaExternalMemoryGetMappedBuffer(devPtr, extMem, (const struct cudaExternalMemoryBufferDesc*)bufferDesc));
|
||||
}
|
||||
|
||||
inline static hipError_t hipExternalMemoryGetMappedMipmappedArray(
|
||||
hipMipmappedArray_t* mipmap, hipExternalMemory_t extMem,
|
||||
const hipExternalMemoryMipmappedArrayDesc* mipmapDesc) {
|
||||
return hipCUDAErrorTohipError(cudaExternalMemoryGetMappedMipmappedArray(
|
||||
(cudaMipmappedArray_t*)mipmap, (cudaExternalMemory_t)extMem,
|
||||
(const struct cudaExternalMemoryMipmappedArrayDesc*)mipmapDesc));
|
||||
}
|
||||
|
||||
inline static hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem) {
|
||||
return hipCUDAErrorTohipError(cudaDestroyExternalMemory(extMem));
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user