mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
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:
committed by
Compute-Runtime-Automation
parent
eed69f45ed
commit
9e89d6019f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user