test: fix aub test DebuggerSingleAddressSpaceAub

- add check for global bindless allocator to set correct address in
expectMemory calls

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-10-22 13:28:48 +00:00
committed by Compute-Runtime-Automation
parent eed69f45ed
commit 9e89d6019f

View File

@@ -126,6 +126,23 @@ HWTEST2_F(DebuggerSingleAddressSpaceAub, GivenSingleAddressSpaceWhenCmdListIsExe
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, instructionBaseAddress)),
&instructionHeapBaseAddress, sizeof(instructionHeapBaseAddress));
if (neoDevice->getBindlessHeapsHelper()) {
auto globalBase = neoDevice->getBindlessHeapsHelper()->getGlobalHeapsBase();
auto surfaceStateBaseAddress = 0ull;
auto bindlessSurfaceStateBaseAddress = globalBase;
auto dynamicStateBaseAddress = globalBase;
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, surfaceStateBaseAddress)),
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, bindlessSurfaceStateBaseAddress)),
&bindlessSurfaceStateBaseAddress, sizeof(bindlessSurfaceStateBaseAddress));
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, dynamicStateBaseAddress)),
&dynamicStateBaseAddress, sizeof(dynamicStateBaseAddress));
} else {
auto commandListSurfaceHeapAllocation = commandList->commandContainer.getIndirectHeap(HeapType::surfaceState);
if (commandListSurfaceHeapAllocation) {
auto surfaceStateBaseAddress = commandListSurfaceHeapAllocation->getGraphicsAllocation()->getGpuAddress();
@@ -145,6 +162,7 @@ HWTEST2_F(DebuggerSingleAddressSpaceAub, GivenSingleAddressSpaceWhenCmdListIsExe
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, dynamicStateBaseAddress)),
&dynamicStateBaseAddress, sizeof(dynamicStateBaseAddress));
}
}
EXPECT_EQ(ZE_RESULT_SUCCESS, zeKernelDestroy(kernel));
driverHandle->svmAllocsManager->freeSVMAlloc(bufferDst);