mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
refactor: pass reference to pointer as arg to findAllocationDataForRange
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3911f6745f
commit
64fd270d56
@@ -1801,7 +1801,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
|
|||||||
bool hostPointerNeedsFlush = false;
|
bool hostPointerNeedsFlush = false;
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData = nullptr;
|
NEO::SvmAllocationData *allocData = nullptr;
|
||||||
bool dstAllocFound = device->getDriverHandle()->findAllocationDataForRange(ptr, size, &allocData);
|
bool dstAllocFound = device->getDriverHandle()->findAllocationDataForRange(ptr, size, allocData);
|
||||||
if (dstAllocFound) {
|
if (dstAllocFound) {
|
||||||
if (allocData->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY ||
|
if (allocData->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY ||
|
||||||
allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
|
allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
|
||||||
@@ -2129,7 +2129,7 @@ inline AlignedAllocationData CommandListCoreFamily<gfxCoreFamily>::getAlignedAll
|
|||||||
NEO::SvmAllocationData *allocData = nullptr;
|
NEO::SvmAllocationData *allocData = nullptr;
|
||||||
void *ptr = const_cast<void *>(buffer);
|
void *ptr = const_cast<void *>(buffer);
|
||||||
bool srcAllocFound = device->getDriverHandle()->findAllocationDataForRange(ptr,
|
bool srcAllocFound = device->getDriverHandle()->findAllocationDataForRange(ptr,
|
||||||
bufferSize, &allocData);
|
bufferSize, allocData);
|
||||||
NEO::GraphicsAllocation *alloc = nullptr;
|
NEO::GraphicsAllocation *alloc = nullptr;
|
||||||
|
|
||||||
uintptr_t sourcePtr = reinterpret_cast<uintptr_t>(ptr);
|
uintptr_t sourcePtr = reinterpret_cast<uintptr_t>(ptr);
|
||||||
@@ -2981,8 +2981,8 @@ bool CommandListCoreFamily<gfxCoreFamily>::isAppendSplitNeeded(void *dstPtr, con
|
|||||||
|
|
||||||
NEO::SvmAllocationData *srcAllocData = nullptr;
|
NEO::SvmAllocationData *srcAllocData = nullptr;
|
||||||
NEO::SvmAllocationData *dstAllocData = nullptr;
|
NEO::SvmAllocationData *dstAllocData = nullptr;
|
||||||
bool srcAllocFound = this->device->getDriverHandle()->findAllocationDataForRange(const_cast<void *>(srcPtr), size, &srcAllocData);
|
bool srcAllocFound = this->device->getDriverHandle()->findAllocationDataForRange(const_cast<void *>(srcPtr), size, srcAllocData);
|
||||||
bool dstAllocFound = this->device->getDriverHandle()->findAllocationDataForRange(dstPtr, size, &dstAllocData);
|
bool dstAllocFound = this->device->getDriverHandle()->findAllocationDataForRange(dstPtr, size, dstAllocData);
|
||||||
|
|
||||||
auto srcMemoryPool = getMemoryPoolFromAllocDataForSplit(srcAllocFound, srcAllocData);
|
auto srcMemoryPool = getMemoryPoolFromAllocDataForSplit(srcAllocFound, srcAllocData);
|
||||||
auto dstMemoryPool = getMemoryPoolFromAllocDataForSplit(dstAllocFound, dstAllocData);
|
auto dstMemoryPool = getMemoryPoolFromAllocDataForSplit(dstAllocFound, dstAllocData);
|
||||||
|
|||||||
@@ -523,8 +523,8 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopy(
|
|||||||
|
|
||||||
ze_result_t ret;
|
ze_result_t ret;
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(dstptr, srcptr, size);
|
CpuMemCopyInfo cpuMemCopyInfo(dstptr, srcptr, size);
|
||||||
this->device->getDriverHandle()->findAllocationDataForRange(const_cast<void *>(srcptr), size, &cpuMemCopyInfo.srcAllocData);
|
this->device->getDriverHandle()->findAllocationDataForRange(const_cast<void *>(srcptr), size, cpuMemCopyInfo.srcAllocData);
|
||||||
this->device->getDriverHandle()->findAllocationDataForRange(dstptr, size, &cpuMemCopyInfo.dstAllocData);
|
this->device->getDriverHandle()->findAllocationDataForRange(dstptr, size, cpuMemCopyInfo.dstAllocData);
|
||||||
if (preferCopyThroughLockedPtr(cpuMemCopyInfo, numWaitEvents, phWaitEvents)) {
|
if (preferCopyThroughLockedPtr(cpuMemCopyInfo, numWaitEvents, phWaitEvents)) {
|
||||||
ret = performCpuMemcpy(cpuMemCopyInfo, hSignalEvent, numWaitEvents, phWaitEvents);
|
ret = performCpuMemcpy(cpuMemCopyInfo, hSignalEvent, numWaitEvents, phWaitEvents);
|
||||||
if (ret == ZE_RESULT_SUCCESS || ret == ZE_RESULT_ERROR_DEVICE_LOST) {
|
if (ret == ZE_RESULT_SUCCESS || ret == ZE_RESULT_ERROR_DEVICE_LOST) {
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ ze_result_t ContextImp::makeMemoryResident(ze_device_handle_t hDevice, void *ptr
|
|||||||
if (allocation == nullptr) {
|
if (allocation == nullptr) {
|
||||||
NEO::SvmAllocationData *allocData = nullptr;
|
NEO::SvmAllocationData *allocData = nullptr;
|
||||||
DriverHandleImp *driverHandleImp = static_cast<DriverHandleImp *>(this->driverHandle);
|
DriverHandleImp *driverHandleImp = static_cast<DriverHandleImp *>(this->driverHandle);
|
||||||
bool foundBuffer = driverHandleImp->findAllocationDataForRange(ptr, size, &allocData);
|
bool foundBuffer = driverHandleImp->findAllocationDataForRange(ptr, size, allocData);
|
||||||
if (foundBuffer) {
|
if (foundBuffer) {
|
||||||
uintptr_t alignedPtr = reinterpret_cast<uintptr_t>(ptr);
|
uintptr_t alignedPtr = reinterpret_cast<uintptr_t>(ptr);
|
||||||
allocation = driverHandleImp->getPeerAllocation(device, allocData, ptr, &alignedPtr, nullptr);
|
allocation = driverHandleImp->getPeerAllocation(device, allocData, ptr, &alignedPtr, nullptr);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ struct DriverHandle : BaseDriver {
|
|||||||
virtual ze_result_t checkMemoryAccessFromDevice(Device *device, const void *ptr) = 0;
|
virtual ze_result_t checkMemoryAccessFromDevice(Device *device, const void *ptr) = 0;
|
||||||
virtual bool findAllocationDataForRange(const void *buffer,
|
virtual bool findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) = 0;
|
NEO::SvmAllocationData *&allocData) = 0;
|
||||||
virtual std::vector<NEO::SvmAllocationData *> findAllocationsWithinRange(const void *buffer,
|
virtual std::vector<NEO::SvmAllocationData *> findAllocationsWithinRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
bool *allocationRangeCovered) = 0;
|
bool *allocationRangeCovered) = 0;
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ ze_result_t DriverHandleImp::getDevice(uint32_t *pCount, ze_device_handle_t *phD
|
|||||||
|
|
||||||
bool DriverHandleImp::findAllocationDataForRange(const void *buffer,
|
bool DriverHandleImp::findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) {
|
NEO::SvmAllocationData *&allocData) {
|
||||||
|
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
@@ -439,12 +439,10 @@ bool DriverHandleImp::findAllocationDataForRange(const void *buffer,
|
|||||||
NEO::SvmAllocationData *beginAllocData = svmAllocsManager->getSVMAlloc(baseAddress);
|
NEO::SvmAllocationData *beginAllocData = svmAllocsManager->getSVMAlloc(baseAddress);
|
||||||
NEO::SvmAllocationData *endAllocData = svmAllocsManager->getSVMAlloc(baseAddress + offset);
|
NEO::SvmAllocationData *endAllocData = svmAllocsManager->getSVMAlloc(baseAddress + offset);
|
||||||
|
|
||||||
if (allocData) {
|
if (beginAllocData) {
|
||||||
if (beginAllocData) {
|
allocData = beginAllocData;
|
||||||
*allocData = beginAllocData;
|
} else {
|
||||||
} else {
|
allocData = endAllocData;
|
||||||
*allocData = endAllocData;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if the whole range requested is covered by the same allocation
|
// Return true if the whole range requested is covered by the same allocation
|
||||||
@@ -457,7 +455,7 @@ bool DriverHandleImp::findAllocationDataForRange(const void *buffer,
|
|||||||
auto allocDataVec = findAllocationsWithinRange(buffer, size, &allocationRangeCovered);
|
auto allocDataVec = findAllocationsWithinRange(buffer, size, &allocationRangeCovered);
|
||||||
for (const auto &mappedAllocationData : allocDataVec) {
|
for (const auto &mappedAllocationData : allocDataVec) {
|
||||||
if (mappedAllocationData->virtualReservationData) {
|
if (mappedAllocationData->virtualReservationData) {
|
||||||
*allocData = mappedAllocationData;
|
allocData = mappedAllocationData;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -560,7 +558,7 @@ NEO::GraphicsAllocation *DriverHandleImp::getDriverSystemMemoryAllocation(void *
|
|||||||
uint32_t rootDeviceIndex,
|
uint32_t rootDeviceIndex,
|
||||||
uintptr_t *gpuAddress) {
|
uintptr_t *gpuAddress) {
|
||||||
NEO::SvmAllocationData *allocData = nullptr;
|
NEO::SvmAllocationData *allocData = nullptr;
|
||||||
bool allocFound = findAllocationDataForRange(ptr, size, &allocData);
|
bool allocFound = findAllocationDataForRange(ptr, size, allocData);
|
||||||
if (allocFound) {
|
if (allocFound) {
|
||||||
if (gpuAddress != nullptr) {
|
if (gpuAddress != nullptr) {
|
||||||
*gpuAddress = reinterpret_cast<uintptr_t>(ptr);
|
*gpuAddress = reinterpret_cast<uintptr_t>(ptr);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ struct DriverHandleImp : public DriverHandle {
|
|||||||
ze_result_t initialize(std::vector<std::unique_ptr<NEO::Device>> neoDevices);
|
ze_result_t initialize(std::vector<std::unique_ptr<NEO::Device>> neoDevices);
|
||||||
bool findAllocationDataForRange(const void *buffer,
|
bool findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) override;
|
NEO::SvmAllocationData *&allocData) override;
|
||||||
std::vector<NEO::SvmAllocationData *> findAllocationsWithinRange(const void *buffer,
|
std::vector<NEO::SvmAllocationData *> findAllocationsWithinRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
bool *allocationRangeCovered) override;
|
bool *allocationRangeCovered) override;
|
||||||
|
|||||||
@@ -356,12 +356,10 @@ void ImmediateCmdListSharedHeapsFlushTaskFixtureInit::validateDispatchFlags(bool
|
|||||||
|
|
||||||
bool AppendFillFixture::MockDriverFillHandle::findAllocationDataForRange(const void *buffer,
|
bool AppendFillFixture::MockDriverFillHandle::findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) {
|
NEO::SvmAllocationData *&allocData) {
|
||||||
mockAllocation.reset(new NEO::MockGraphicsAllocation(const_cast<void *>(buffer), size));
|
mockAllocation.reset(new NEO::MockGraphicsAllocation(const_cast<void *>(buffer), size));
|
||||||
data.gpuAllocations.addAllocation(mockAllocation.get());
|
data.gpuAllocations.addAllocation(mockAllocation.get());
|
||||||
if (allocData) {
|
allocData = &data;
|
||||||
*allocData = &data;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ class AppendFillFixture : public DeviceFixture {
|
|||||||
public:
|
public:
|
||||||
bool findAllocationDataForRange(const void *buffer,
|
bool findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) override;
|
NEO::SvmAllocationData *&allocData) override;
|
||||||
|
|
||||||
const uint32_t rootDeviceIndex = 0u;
|
const uint32_t rootDeviceIndex = 0u;
|
||||||
std::unique_ptr<NEO::GraphicsAllocation> mockAllocation;
|
std::unique_ptr<NEO::GraphicsAllocation> mockAllocation;
|
||||||
|
|||||||
@@ -1927,9 +1927,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_FALSE(srcFound);
|
ASSERT_FALSE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(dstFound);
|
ASSERT_TRUE(dstFound);
|
||||||
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
||||||
}
|
}
|
||||||
@@ -1939,9 +1939,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(nonUsmHostPtr, devicePtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(nonUsmHostPtr, devicePtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_TRUE(srcFound);
|
ASSERT_TRUE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_FALSE(dstFound);
|
ASSERT_FALSE(dstFound);
|
||||||
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
||||||
}
|
}
|
||||||
@@ -1951,9 +1951,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndUsmHostPtrWhen
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, hostPtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, hostPtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_TRUE(srcFound);
|
ASSERT_TRUE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(dstFound);
|
ASSERT_TRUE(dstFound);
|
||||||
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
||||||
}
|
}
|
||||||
@@ -1963,9 +1963,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndUsmHostPtrWhen
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, hostPtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, hostPtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_TRUE(srcFound);
|
ASSERT_TRUE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(dstFound);
|
ASSERT_TRUE(dstFound);
|
||||||
|
|
||||||
ze_event_pool_desc_t eventPoolDesc = {};
|
ze_event_pool_desc_t eventPoolDesc = {};
|
||||||
@@ -2003,9 +2003,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndUsmHostPtrWhen
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(hostPtr, devicePtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(hostPtr, devicePtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_TRUE(srcFound);
|
ASSERT_TRUE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(dstFound);
|
ASSERT_TRUE(dstFound);
|
||||||
|
|
||||||
ze_event_pool_desc_t eventPoolDesc = {};
|
ze_event_pool_desc_t eventPoolDesc = {};
|
||||||
@@ -2043,9 +2043,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListWhenIsSuitableUSM
|
|||||||
cmdList.copyThroughLockedPtrEnabled = true;
|
cmdList.copyThroughLockedPtrEnabled = true;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
EXPECT_FALSE(srcFound);
|
EXPECT_FALSE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
EXPECT_TRUE(dstFound);
|
EXPECT_TRUE(dstFound);
|
||||||
EXPECT_FALSE(cmdList.isSuitableUSMDeviceAlloc(cpuMemCopyInfo.srcAllocData));
|
EXPECT_FALSE(cmdList.isSuitableUSMDeviceAlloc(cpuMemCopyInfo.srcAllocData));
|
||||||
EXPECT_TRUE(cmdList.isSuitableUSMDeviceAlloc(cpuMemCopyInfo.dstAllocData));
|
EXPECT_TRUE(cmdList.isSuitableUSMDeviceAlloc(cpuMemCopyInfo.dstAllocData));
|
||||||
@@ -2057,9 +2057,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListWhenIsSuitableUSM
|
|||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
NEO::SvmAllocationData *srcAllocData;
|
NEO::SvmAllocationData *srcAllocData;
|
||||||
NEO::SvmAllocationData *dstAllocData;
|
NEO::SvmAllocationData *dstAllocData;
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, srcAllocData);
|
||||||
EXPECT_TRUE(srcFound);
|
EXPECT_TRUE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, dstAllocData);
|
||||||
EXPECT_TRUE(dstFound);
|
EXPECT_TRUE(dstFound);
|
||||||
EXPECT_TRUE(cmdList.isSuitableUSMHostAlloc(srcAllocData));
|
EXPECT_TRUE(cmdList.isSuitableUSMHostAlloc(srcAllocData));
|
||||||
EXPECT_FALSE(cmdList.isSuitableUSMHostAlloc(dstAllocData));
|
EXPECT_FALSE(cmdList.isSuitableUSMHostAlloc(dstAllocData));
|
||||||
@@ -2072,11 +2072,11 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListWhenIsSuitableUSM
|
|||||||
NEO::SvmAllocationData *hostAllocData;
|
NEO::SvmAllocationData *hostAllocData;
|
||||||
NEO::SvmAllocationData *deviceAllocData;
|
NEO::SvmAllocationData *deviceAllocData;
|
||||||
NEO::SvmAllocationData *sharedAllocData;
|
NEO::SvmAllocationData *sharedAllocData;
|
||||||
auto hostAllocFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &hostAllocData);
|
auto hostAllocFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, hostAllocData);
|
||||||
EXPECT_TRUE(hostAllocFound);
|
EXPECT_TRUE(hostAllocFound);
|
||||||
auto deviceAllocFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &deviceAllocData);
|
auto deviceAllocFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, deviceAllocData);
|
||||||
EXPECT_TRUE(deviceAllocFound);
|
EXPECT_TRUE(deviceAllocFound);
|
||||||
auto sharedAllocFound = device->getDriverHandle()->findAllocationDataForRange(sharedPtr, 1024, &sharedAllocData);
|
auto sharedAllocFound = device->getDriverHandle()->findAllocationDataForRange(sharedPtr, 1024, sharedAllocData);
|
||||||
EXPECT_TRUE(sharedAllocFound);
|
EXPECT_TRUE(sharedAllocFound);
|
||||||
EXPECT_FALSE(cmdList.isSuitableUSMSharedAlloc(hostAllocData));
|
EXPECT_FALSE(cmdList.isSuitableUSMSharedAlloc(hostAllocData));
|
||||||
EXPECT_FALSE(cmdList.isSuitableUSMSharedAlloc(deviceAllocData));
|
EXPECT_FALSE(cmdList.isSuitableUSMSharedAlloc(deviceAllocData));
|
||||||
@@ -2104,7 +2104,7 @@ HWTEST2_F(LocalMemoryMultiSubDeviceTest, givenImmediateCommandListWhenIsSuitable
|
|||||||
context->allocDeviceMem(device->toHandle(), &deviceDesc, 2 * MemoryConstants::megaByte, 1u, &devicePtr);
|
context->allocDeviceMem(device->toHandle(), &deviceDesc, 2 * MemoryConstants::megaByte, 1u, &devicePtr);
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
auto allocFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 2 * MemoryConstants::megaByte, &allocData);
|
auto allocFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 2 * MemoryConstants::megaByte, allocData);
|
||||||
EXPECT_TRUE(allocFound);
|
EXPECT_TRUE(allocFound);
|
||||||
EXPECT_FALSE(cmdList.isSuitableUSMDeviceAlloc(allocData));
|
EXPECT_FALSE(cmdList.isSuitableUSMDeviceAlloc(allocData));
|
||||||
context->freeMem(devicePtr);
|
context->freeMem(devicePtr);
|
||||||
@@ -2131,9 +2131,9 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndForcingLockPtr
|
|||||||
cmdList.copyThroughLockedPtrEnabled = false;
|
cmdList.copyThroughLockedPtrEnabled = false;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(devicePtr, nonUsmHostPtr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
ASSERT_FALSE(srcFound);
|
ASSERT_FALSE(srcFound);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(dstFound);
|
ASSERT_TRUE(dstFound);
|
||||||
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
EXPECT_TRUE(cmdList.preferCopyThroughLockedPtr(cpuMemCopyInfo, 0, nullptr));
|
||||||
}
|
}
|
||||||
@@ -2153,15 +2153,15 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListWhenGetTransferTy
|
|||||||
NEO::SvmAllocationData *sharedUSMAllocData;
|
NEO::SvmAllocationData *sharedUSMAllocData;
|
||||||
NEO::SvmAllocationData *notSpecifiedAllocData;
|
NEO::SvmAllocationData *notSpecifiedAllocData;
|
||||||
|
|
||||||
const auto hostUSMFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &hostUSMAllocData);
|
const auto hostUSMFound = device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, hostUSMAllocData);
|
||||||
EXPECT_TRUE(hostUSMFound);
|
EXPECT_TRUE(hostUSMFound);
|
||||||
const auto hostNonUSMFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &hostNonUSMAllocData);
|
const auto hostNonUSMFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, hostNonUSMAllocData);
|
||||||
EXPECT_FALSE(hostNonUSMFound);
|
EXPECT_FALSE(hostNonUSMFound);
|
||||||
const auto deviceUSMFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &deviceUSMAllocData);
|
const auto deviceUSMFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, deviceUSMAllocData);
|
||||||
EXPECT_TRUE(deviceUSMFound);
|
EXPECT_TRUE(deviceUSMFound);
|
||||||
const auto sharedUSMFound = device->getDriverHandle()->findAllocationDataForRange(sharedPtr, 1024, &sharedUSMAllocData);
|
const auto sharedUSMFound = device->getDriverHandle()->findAllocationDataForRange(sharedPtr, 1024, sharedUSMAllocData);
|
||||||
EXPECT_TRUE(sharedUSMFound);
|
EXPECT_TRUE(sharedUSMFound);
|
||||||
const auto hostUSM2Found = device->getDriverHandle()->findAllocationDataForRange(hostPtr2, 1024, ¬SpecifiedAllocData);
|
const auto hostUSM2Found = device->getDriverHandle()->findAllocationDataForRange(hostPtr2, 1024, notSpecifiedAllocData);
|
||||||
EXPECT_TRUE(hostUSM2Found);
|
EXPECT_TRUE(hostUSM2Found);
|
||||||
|
|
||||||
notSpecifiedAllocData->memoryType = NOT_SPECIFIED;
|
notSpecifiedAllocData->memoryType = NOT_SPECIFIED;
|
||||||
@@ -2238,7 +2238,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
||||||
@@ -2254,7 +2254,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
||||||
@@ -2276,11 +2276,11 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenForceModeWhenCopyIsCalledThenBothAllo
|
|||||||
void *devicePtr2 = nullptr;
|
void *devicePtr2 = nullptr;
|
||||||
context->allocDeviceMem(device->toHandle(), &deviceDesc, sz, 1u, &devicePtr2);
|
context->allocDeviceMem(device->toHandle(), &deviceDesc, sz, 1u, &devicePtr2);
|
||||||
NEO::SvmAllocationData *allocData2;
|
NEO::SvmAllocationData *allocData2;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr2, 1024, &allocData2);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr2, 1024, allocData2);
|
||||||
auto dstAlloc2 = allocData2->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc2 = allocData2->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
||||||
@@ -2305,11 +2305,11 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenForceModeWhenCopyIsCalledFromHostUsmT
|
|||||||
void *hostPtr = nullptr;
|
void *hostPtr = nullptr;
|
||||||
context->allocHostMem(&hostDesc, sz, 1u, &hostPtr);
|
context->allocHostMem(&hostDesc, sz, 1u, &hostPtr);
|
||||||
NEO::SvmAllocationData *hostAlloc;
|
NEO::SvmAllocationData *hostAlloc;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, &hostAlloc);
|
device->getDriverHandle()->findAllocationDataForRange(hostPtr, 1024, hostAlloc);
|
||||||
auto hostAlloction = hostAlloc->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto hostAlloction = hostAlloc->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
EXPECT_EQ(nullptr, dstAlloc->getLockedPtr());
|
||||||
@@ -2328,7 +2328,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
device->getDriverHandle()->getMemoryManager()->lockResource(dstAlloc);
|
device->getDriverHandle()->getMemoryManager()->lockResource(dstAlloc);
|
||||||
@@ -2350,7 +2350,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndNonUsmHostPtrW
|
|||||||
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
|
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
|
||||||
|
|
||||||
NEO::SvmAllocationData *allocData;
|
NEO::SvmAllocationData *allocData;
|
||||||
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &allocData);
|
device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, allocData);
|
||||||
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto dstAlloc = allocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
auto lockedPtr = reinterpret_cast<char *>(dstAlloc->getLockedPtr());
|
auto lockedPtr = reinterpret_cast<char *>(dstAlloc->getLockedPtr());
|
||||||
@@ -2596,7 +2596,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenImmediateCommandListAndFailedToLockPt
|
|||||||
ASSERT_EQ(cmdList.appendMemoryCopyKernelWithGACalled, 0u);
|
ASSERT_EQ(cmdList.appendMemoryCopyKernelWithGACalled, 0u);
|
||||||
|
|
||||||
NEO::SvmAllocationData *dstAllocData;
|
NEO::SvmAllocationData *dstAllocData;
|
||||||
ASSERT_TRUE(device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1 * MemoryConstants::megaByte, &dstAllocData));
|
ASSERT_TRUE(device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1 * MemoryConstants::megaByte, dstAllocData));
|
||||||
ASSERT_NE(dstAllocData, nullptr);
|
ASSERT_NE(dstAllocData, nullptr);
|
||||||
auto mockMemoryManager = static_cast<MockMemoryManager *>(device->getDriverHandle()->getMemoryManager());
|
auto mockMemoryManager = static_cast<MockMemoryManager *>(device->getDriverHandle()->getMemoryManager());
|
||||||
auto graphicsAllocation = dstAllocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto graphicsAllocation = dstAllocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
@@ -2776,7 +2776,7 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenAllocationDataWhenFailingToObtainLock
|
|||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
|
|
||||||
NEO::SvmAllocationData *dstAllocData = nullptr;
|
NEO::SvmAllocationData *dstAllocData = nullptr;
|
||||||
EXPECT_TRUE(device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &dstAllocData));
|
EXPECT_TRUE(device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, dstAllocData));
|
||||||
ASSERT_NE(dstAllocData, nullptr);
|
ASSERT_NE(dstAllocData, nullptr);
|
||||||
auto graphicsAllocation = dstAllocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
auto graphicsAllocation = dstAllocData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
ASSERT_FALSE(graphicsAllocation->isLocked());
|
ASSERT_FALSE(graphicsAllocation->isLocked());
|
||||||
@@ -2802,8 +2802,8 @@ HWTEST2_F(AppendMemoryLockedCopyTest, givenFailedToObtainLockedPtrWhenPerforming
|
|||||||
MockCommandListImmediateHw<gfxCoreFamily> cmdList;
|
MockCommandListImmediateHw<gfxCoreFamily> cmdList;
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
||||||
CpuMemCopyInfo cpuMemCopyInfo(nullptr, nullptr, 1024);
|
CpuMemCopyInfo cpuMemCopyInfo(nullptr, nullptr, 1024);
|
||||||
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, &cpuMemCopyInfo.srcAllocData);
|
auto srcFound = device->getDriverHandle()->findAllocationDataForRange(nonUsmHostPtr, 1024, cpuMemCopyInfo.srcAllocData);
|
||||||
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, &cpuMemCopyInfo.dstAllocData);
|
auto dstFound = device->getDriverHandle()->findAllocationDataForRange(devicePtr, 1024, cpuMemCopyInfo.dstAllocData);
|
||||||
ASSERT_TRUE(srcFound != dstFound);
|
ASSERT_TRUE(srcFound != dstFound);
|
||||||
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,12 @@ class MockDriverHandle : public L0::DriverHandleImp {
|
|||||||
public:
|
public:
|
||||||
bool findAllocationDataForRange(const void *buffer,
|
bool findAllocationDataForRange(const void *buffer,
|
||||||
size_t size,
|
size_t size,
|
||||||
NEO::SvmAllocationData **allocData) override {
|
NEO::SvmAllocationData *&allocData) override {
|
||||||
mockAllocation.reset(new NEO::MockGraphicsAllocation(rootDeviceIndex, NEO::AllocationType::INTERNAL_HOST_MEMORY,
|
mockAllocation.reset(new NEO::MockGraphicsAllocation(rootDeviceIndex, NEO::AllocationType::INTERNAL_HOST_MEMORY,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::System4KBPages, MemoryManager::maxOsContextCount));
|
MemoryPool::System4KBPages, MemoryManager::maxOsContextCount));
|
||||||
data.gpuAllocations.addAllocation(mockAllocation.get());
|
data.gpuAllocations.addAllocation(mockAllocation.get());
|
||||||
if (allocData) {
|
allocData = &data;
|
||||||
*allocData = &data;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const uint32_t rootDeviceIndex = 0u;
|
const uint32_t rootDeviceIndex = 0u;
|
||||||
|
|||||||
Reference in New Issue
Block a user