Add instance of gmm helper to execution environment

Change-Id: I1b044611fbad91fbb681ba233938f41502f29056
This commit is contained in:
Mateusz Jablonski
2018-07-03 10:00:12 +02:00
committed by sys_ocldev
parent f26535a93d
commit 94dbdb602d
67 changed files with 220 additions and 204 deletions

View File

@@ -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() {

View File

@@ -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()) {

View File

@@ -85,8 +85,6 @@ Wddm::Wddm() : initialized(false),
Wddm::~Wddm() {
resetPageTableManager(nullptr);
if (initialized)
destroyGmmContext();
destroyContext(context);
destroyPagingQueue();
destroyDevice();

View File

@@ -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; }

View File

@@ -52,9 +52,6 @@ bool Wddm::init() {
if (!createPagingQueue()) {
return false;
}
if (!initGmmContext()) {
return false;
}
if (!configureDeviceAddressSpace<GfxFamily>()) {
return false;
}

View File

@@ -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