feature: pass external device allocation to CB event

Related-To: NEO-11925

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-10-14 16:37:26 +00:00
committed by Compute-Runtime-Automation
parent 7172d373ea
commit acef3a1e71
6 changed files with 14 additions and 7 deletions

View File

@@ -62,12 +62,14 @@ HWTEST_F(CommandEncoderTests, givenDifferentInputParamsWhenCreatingStandaloneInO
uint64_t *hostAddress = &counterValue;
uint64_t gpuAddress = castToUint64(ptrOffset(&counterValue, 64));
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, gpuAddress, nullptr, hostAddress, counterValue);
MockGraphicsAllocation alloc(nullptr, gpuAddress, 1);
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &alloc, gpuAddress, nullptr, hostAddress, counterValue);
EXPECT_EQ(counterValue, inOrderExecInfo->getCounterValue());
EXPECT_EQ(hostAddress, inOrderExecInfo->getBaseHostAddress());
EXPECT_EQ(gpuAddress, inOrderExecInfo->getBaseDeviceAddress());
EXPECT_EQ(nullptr, inOrderExecInfo->getDeviceCounterAllocation());
EXPECT_EQ(&alloc, inOrderExecInfo->getDeviceCounterAllocation());
EXPECT_EQ(nullptr, inOrderExecInfo->getHostCounterAllocation());
EXPECT_TRUE(inOrderExecInfo->isExternalMemoryExecInfo());