mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add instance of gmm helper to execution environment
Change-Id: I1b044611fbad91fbb681ba233938f41502f29056
This commit is contained in:
committed by
sys_ocldev
parent
f26535a93d
commit
94dbdb602d
@@ -75,8 +75,7 @@ bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices) {
|
||||
DeviceFactory::numDevices = devNum;
|
||||
DeviceFactory::hwInfos = ptr;
|
||||
|
||||
return GmmHelper::initContext(hwInfos->pPlatform, hwInfos->pSkuTable,
|
||||
hwInfos->pWaTable, hwInfos->pSysInfo);
|
||||
return true;
|
||||
}
|
||||
|
||||
void DeviceFactory::releaseDevices() {
|
||||
|
||||
@@ -39,9 +39,8 @@ decltype(GmmHelper::destroyGlobalContextFunc) GmmHelper::destroyGlobalContextFun
|
||||
decltype(GmmHelper::createClientContextFunc) GmmHelper::createClientContextFunc = nullptr;
|
||||
decltype(GmmHelper::deleteClientContextFunc) GmmHelper::deleteClientContextFunc = nullptr;
|
||||
|
||||
std::unique_ptr<OsLibrary> gmmLib;
|
||||
void GmmHelper::loadLib() {
|
||||
gmmLib.reset(OsLibrary::load(Os::gmmDllName));
|
||||
gmmLib = OsLibrary::load(Os::gmmDllName);
|
||||
|
||||
UNRECOVERABLE_IF(!gmmLib);
|
||||
if (gmmLib->isLoaded()) {
|
||||
|
||||
@@ -85,8 +85,6 @@ Wddm::Wddm() : initialized(false),
|
||||
|
||||
Wddm::~Wddm() {
|
||||
resetPageTableManager(nullptr);
|
||||
if (initialized)
|
||||
destroyGmmContext();
|
||||
destroyContext(context);
|
||||
destroyPagingQueue();
|
||||
destroyDevice();
|
||||
|
||||
@@ -211,8 +211,6 @@ class Wddm {
|
||||
void getDeviceState();
|
||||
void handleCompletion();
|
||||
unsigned int readEnablePreemptionRegKey();
|
||||
bool initGmmContext();
|
||||
void destroyGmmContext();
|
||||
void resetMonitoredFenceParams(D3DKMT_HANDLE &handle, uint64_t *cpuAddress, D3DGPU_VIRTUAL_ADDRESS &gpuAddress);
|
||||
virtual const bool hwQueuesSupported() const { return false; }
|
||||
|
||||
|
||||
@@ -52,9 +52,6 @@ bool Wddm::init() {
|
||||
if (!createPagingQueue()) {
|
||||
return false;
|
||||
}
|
||||
if (!initGmmContext()) {
|
||||
return false;
|
||||
}
|
||||
if (!configureDeviceAddressSpace<GfxFamily>()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -40,15 +40,4 @@ Wddm::VirtualFreeFcn getVirtualFree() {
|
||||
Wddm::VirtualAllocFcn getVirtualAlloc() {
|
||||
return VirtualAlloc;
|
||||
}
|
||||
|
||||
bool Wddm::initGmmContext() {
|
||||
return GmmHelper::initContext(gfxPlatform.get(),
|
||||
featureTable.get(),
|
||||
waTable.get(),
|
||||
gtSystemInfo.get());
|
||||
}
|
||||
|
||||
void Wddm::destroyGmmContext() {
|
||||
GmmHelper::destroyContext();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user