SWDEV-292714 - Add unique id for each allocation to support HIP_POINTER_ATTRIBUTE_BUFFER_ID

Change-Id: Ibb3fcb2d0bbbef03525fc884d5b3e9b5f6c11423
此提交包含在:
Satyanvesh Dittakavi committed 2021-11-24 06:10:50 -05:00
1 父節點 0ab4ad1310
當前提交 c56317b2e0
2 file changed
+8 -2

No files matched your search

+5
查看文件
@@ -28,6 +28,9 @@
#include <atomic>
// Stores the no. of memory allocations
std::atomic<uint32_t> numAllocs = 0;
namespace amd {
bool BufferRect::create(const size_t* bufferOrigin, const size_t* region, size_t bufferRowPitch,
@@ -309,6 +312,8 @@ bool Memory::create(void* initFrom, bool sysMemAlloc, bool skipAlloc, bool force
}
}
// Store the unique id for each memory allocation
uniqueId_ = ++numAllocs;
return true;
}