refactor: move gmm constructor flags to struct

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-11-14 17:28:21 +00:00
committed by Compute-Runtime-Automation
parent c454e0d33e
commit 961a8d91d0
45 changed files with 756 additions and 255 deletions

View File

@@ -210,7 +210,10 @@ class MemoryManagerNTHandleMock : public NEO::OsAgnosticMemoryManager {
rootDeviceIndex, false, false, false);
graphicsAllocation->setSharedHandle(static_cast<osHandle>(reinterpret_cast<uint64_t>(handle)));
graphicsAllocation->set32BitAllocation(false);
graphicsAllocation->setDefaultGmm(new Gmm(executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true));
GmmRequirements gmmRequirements{};
gmmRequirements.allowLargePages = true;
gmmRequirements.preferCompressed = false;
graphicsAllocation->setDefaultGmm(new Gmm(executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, {}, gmmRequirements));
return graphicsAllocation;
}
};

View File

@@ -365,7 +365,10 @@ class MemoryManagerNTHandleMock : public NEO::OsAgnosticMemoryManager {
rootDeviceIndex, false, false, false);
graphicsAllocation->setSharedHandle(static_cast<osHandle>(reinterpret_cast<uint64_t>(handle)));
graphicsAllocation->set32BitAllocation(false);
graphicsAllocation->setDefaultGmm(new Gmm(executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true));
GmmRequirements gmmRequirements{};
gmmRequirements.allowLargePages = true;
gmmRequirements.preferCompressed = false;
graphicsAllocation->setDefaultGmm(new Gmm(executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, {}, gmmRequirements));
return graphicsAllocation;
}
};