Improving OS abstraction

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
Jaroslaw Chodor
2021-05-21 01:17:57 +02:00
committed by Compute-Runtime-Automation
parent 7bec5d5d3b
commit 0e9aa45e46
127 changed files with 558 additions and 606 deletions

View File

@@ -33,7 +33,7 @@ class WddmPreemptionTests : public Test<WddmFixtureWithMockGdiDll> {
void createAndInitWddm(unsigned int forceReturnPreemptionRegKeyValue) {
wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *executionEnvironment->rootDeviceEnvironments[0].get()));
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(wddm);
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
osInterface = executionEnvironment->rootDeviceEnvironments[0]->osInterface.get();
auto regReader = new RegistryReaderMock();

View File

@@ -8,7 +8,7 @@
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/windows/os_interface.h"
#include "shared/source/os_interface/os_interface.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -32,7 +32,7 @@ class WddmMemManagerFixture {
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
DeviceFactory::prepareDeviceEnvironments(*executionEnvironment);
auto wddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
auto wddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->getDriverModel()->as<Wddm>());
wddm->callBaseMapGpuVa = false;
memManager = std::unique_ptr<FrontWindowMemManagerMock>(new FrontWindowMemManagerMock(*executionEnvironment));
}