wsl/hsakmt: add supporting contiguous memory allocation
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com> Signed-off-by: tiancyin <tianci.yin@amd.com>
Tento commit je obsažen v:
+3
-3
@@ -99,11 +99,11 @@ HSAKMTAPI int amdgpu_bo_import(amdgpu_device_handle dev,
|
||||
enum amdgpu_bo_handle_type type,
|
||||
uint32_t shared_handle,
|
||||
struct amdgpu_bo_import_result *output) {
|
||||
void *MemoryAddress = nullptr;
|
||||
HSAKMT_STATUS ret = hsaKmtImportDMABufHandle(shared_handle, &MemoryAddress);
|
||||
HsaGraphicsResourceInfo GraphicsResourceInfo;
|
||||
HSAKMT_STATUS ret = hsaKmtImportDMABufHandle(shared_handle, &GraphicsResourceInfo);
|
||||
if (ret == HSAKMT_STATUS_SUCCESS) {
|
||||
//use GpuMemory object's address as drm buf handle
|
||||
output->buf_handle = reinterpret_cast<amdgpu_bo_handle>(MemoryAddress);
|
||||
output->buf_handle = reinterpret_cast<amdgpu_bo_handle>(GraphicsResourceInfo.MemoryAddress);
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele