mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
fix: write memory for resident allocations in simulation mode
- refactor and call proceesFlushResdiency() on memoryOperationsHandler - call free() to remove allocation from resident allocations when graphics allocation is released Related-To: NEO-11719 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9954002db1
commit
b3d72ddd3d
@@ -102,9 +102,23 @@ class MockMemoryOperations : public MemoryOperationsHandler {
|
||||
return MemoryOperationsStatus::success;
|
||||
}
|
||||
|
||||
MemoryOperationsStatus free(Device *device, GraphicsAllocation &gfxAllocation) override {
|
||||
freeCalledCount++;
|
||||
|
||||
if (captureGfxAllocationsForMakeResident) {
|
||||
auto itor = std::find(gfxAllocationsForMakeResident.begin(), gfxAllocationsForMakeResident.end(), &gfxAllocation);
|
||||
if (itor != gfxAllocationsForMakeResident.end()) {
|
||||
gfxAllocationsForMakeResident.erase(itor, itor + 1);
|
||||
}
|
||||
}
|
||||
|
||||
return MemoryOperationsStatus::success;
|
||||
}
|
||||
|
||||
std::vector<GraphicsAllocation *> gfxAllocationsForMakeResident{};
|
||||
int makeResidentCalledCount = 0;
|
||||
int evictCalledCount = 0;
|
||||
int freeCalledCount = 0;
|
||||
uint32_t isResidentCalledCount = 0;
|
||||
uint32_t lockCalledCount = 0;
|
||||
uint32_t makeResidentContextId = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
Reference in New Issue
Block a user