mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Move PageTableManager to RootDeviceEnvironment
Related-To: NEO-2285 Change-Id: I77699b5f540b6ac5b73cf1830712a5591326b766 Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
8f5e9c8a3a
commit
cc46cdf46c
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/execution_environment/root_device_environment.h"
|
||||
#include "public/cl_gl_private_intel.h"
|
||||
#include "runtime/helpers/timestamp_packet.h"
|
||||
#include "runtime/os_interface/os_interface.h"
|
||||
@@ -15,6 +16,7 @@
|
||||
#include "runtime/sharings/gl/gl_arb_sync_event.h"
|
||||
#include "runtime/sharings/gl/gl_sharing.h"
|
||||
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
||||
#include "unit_tests/mocks/mock_execution_environment.h"
|
||||
#include "unit_tests/os_interface/windows/wddm_fixture.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
@@ -79,14 +81,16 @@ TEST(glSharingBasicTest, GivenSharingFunctionsWhenItIsConstructedThenBackupConte
|
||||
|
||||
struct GlArbSyncEventOsTest : public ::testing::Test {
|
||||
void SetUp() override {
|
||||
rootDeviceEnvironment = std::make_unique<RootDeviceEnvironment>(executionEnvironment);
|
||||
sharing.GLContextHandle = 0x2cU;
|
||||
sharing.GLDeviceHandle = 0x3cU;
|
||||
wddm = new WddmMock();
|
||||
wddm = new WddmMock(*rootDeviceEnvironment);
|
||||
gdi = new MockGdi();
|
||||
wddm->gdi.reset(gdi);
|
||||
osInterface.get()->setWddm(wddm);
|
||||
}
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
std::unique_ptr<RootDeviceEnvironment> rootDeviceEnvironment;
|
||||
GlSharingFunctionsMock sharing;
|
||||
MockGdi *gdi = nullptr;
|
||||
WddmMock *wddm = nullptr;
|
||||
@@ -209,7 +213,7 @@ TEST_F(GlArbSyncEventOsTest, GivenNewGlSyncInfoWhenCreateEventFailsThenSetupArbS
|
||||
MockOSInterface mockOsInterface;
|
||||
MockOSInterfaceImpl *mockOsInterfaceImpl = static_cast<MockOSInterfaceImpl *>(mockOsInterface.get());
|
||||
|
||||
auto wddm = new WddmMock();
|
||||
auto wddm = new WddmMock(*rootDeviceEnvironment.get());
|
||||
auto gdi = new MockGdi();
|
||||
wddm->gdi.reset(gdi);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
@@ -238,7 +242,7 @@ TEST_F(GlArbSyncEventOsTest, GivenInvalidGlSyncInfoWhenCleanupArbSyncObjectIsCal
|
||||
}
|
||||
};
|
||||
|
||||
auto wddm = new WddmMock();
|
||||
auto wddm = new WddmMock(*rootDeviceEnvironment.get());
|
||||
auto gdi = new MockGdi();
|
||||
wddm->gdi.reset(gdi);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
@@ -268,7 +272,7 @@ TEST_F(GlArbSyncEventOsTest, GivenValidGlSyncInfoWhenCleanupArbSyncObjectIsCalle
|
||||
}
|
||||
};
|
||||
|
||||
auto wddm = new WddmMock();
|
||||
auto wddm = new WddmMock(*rootDeviceEnvironment.get());
|
||||
auto gdi = new MockGdi();
|
||||
wddm->gdi.reset(gdi);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
|
||||
Reference in New Issue
Block a user