mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: return correct allocation from InOrderExecInfo getter
Related-To: NEO-13971 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a33603a084
commit
68a0aa0525
@@ -62,14 +62,14 @@ HWTEST_F(CommandEncoderTests, givenDifferentInputParamsWhenCreatingStandaloneInO
|
||||
uint64_t *hostAddress = &counterValue;
|
||||
uint64_t gpuAddress = castToUint64(ptrOffset(&counterValue, 64));
|
||||
|
||||
MockGraphicsAllocation alloc(nullptr, gpuAddress, 1);
|
||||
MockGraphicsAllocation deviceAlloc(nullptr, gpuAddress, 1);
|
||||
|
||||
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &alloc, gpuAddress, nullptr, hostAddress, counterValue, 2, 3);
|
||||
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &deviceAlloc, gpuAddress, nullptr, hostAddress, counterValue, 2, 3);
|
||||
|
||||
EXPECT_EQ(counterValue, inOrderExecInfo->getCounterValue());
|
||||
EXPECT_EQ(hostAddress, inOrderExecInfo->getBaseHostAddress());
|
||||
EXPECT_EQ(gpuAddress, inOrderExecInfo->getBaseDeviceAddress());
|
||||
EXPECT_EQ(&alloc, inOrderExecInfo->getDeviceCounterAllocation());
|
||||
EXPECT_EQ(&deviceAlloc, inOrderExecInfo->getDeviceCounterAllocation());
|
||||
EXPECT_EQ(nullptr, inOrderExecInfo->getHostCounterAllocation());
|
||||
EXPECT_TRUE(inOrderExecInfo->isExternalMemoryExecInfo());
|
||||
EXPECT_EQ(2u, inOrderExecInfo->getNumDevicePartitionsToWait());
|
||||
@@ -78,6 +78,11 @@ HWTEST_F(CommandEncoderTests, givenDifferentInputParamsWhenCreatingStandaloneInO
|
||||
inOrderExecInfo->reset();
|
||||
|
||||
EXPECT_EQ(0u, inOrderExecInfo->getCounterValue());
|
||||
|
||||
MockGraphicsAllocation hostAlloc(nullptr, castToUint64(hostAddress), 1);
|
||||
|
||||
inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &deviceAlloc, gpuAddress, &hostAlloc, hostAddress, counterValue, 2, 3);
|
||||
EXPECT_EQ(&hostAlloc, inOrderExecInfo->getHostCounterAllocation());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandEncoderTests, givenTsNodesWhenStoringOnTempListThenHandleOwnershipCorrectly) {
|
||||
|
||||
Reference in New Issue
Block a user