mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
refactor: move gmm constructor flags to struct
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c454e0d33e
commit
961a8d91d0
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user