Move residency data from WddmAllocation to GraphicsAllocation

Related-To: NEO-6848

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-05-10 10:46:08 +00:00
committed by Compute-Runtime-Automation
parent f89c731a11
commit d935815d74
4 changed files with 15 additions and 12 deletions

View File

@@ -29,7 +29,8 @@ GraphicsAllocation::GraphicsAllocation(uint32_t rootDeviceIndex, size_t numGmms,
cpuPtr(cpuPtrIn),
memoryPool(pool),
allocationType(allocationType),
usageInfos(maxOsContextCount) {
usageInfos(maxOsContextCount),
residency(maxOsContextCount) {
gmms.resize(numGmms);
}
@@ -41,7 +42,8 @@ GraphicsAllocation::GraphicsAllocation(uint32_t rootDeviceIndex, size_t numGmms,
cpuPtr(cpuPtrIn),
memoryPool(pool),
allocationType(allocationType),
usageInfos(maxOsContextCount) {
usageInfos(maxOsContextCount),
residency(maxOsContextCount) {
sharingInfo.sharedHandle = sharedHandleIn;
gmms.resize(numGmms);
}

View File

@@ -16,6 +16,7 @@
#include "shared/source/memory_manager/definitions/storage_info.h"
#include "shared/source/memory_manager/host_ptr_defines.h"
#include "shared/source/memory_manager/memory_pool.h"
#include "shared/source/memory_manager/residency.h"
#include "shared/source/utilities/idlist.h"
#include "shared/source/utilities/stackvec.h"
@@ -258,6 +259,10 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
bool isCompressionEnabled() const;
ResidencyData &getResidencyData() {
return residency;
}
OsHandleStorage fragmentsStorage;
StorageInfo storageInfo = {};
@@ -327,5 +332,6 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
StackVec<UsageInfo, 32> usageInfos;
std::atomic<uint32_t> registeredContextsNum{0};
StackVec<Gmm *, EngineLimits::maxHandleCount> gmms;
ResidencyData residency;
};
} // namespace NEO