From 8a3f215dff44a098be499f0dda5da874bba04b78 Mon Sep 17 00:00:00 2001 From: "Jablonski, Mateusz" Date: Wed, 10 Jul 2019 18:35:06 +0200 Subject: [PATCH] Init gmm after filling hardware info Change-Id: I91c5704ef200b22214f37b2c02197cfad426de70 Signed-off-by: Jablonski, Mateusz --- runtime/os_interface/windows/device_factory_win.cpp | 1 - runtime/os_interface/windows/wddm/wddm.cpp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/os_interface/windows/device_factory_win.cpp b/runtime/os_interface/windows/device_factory_win.cpp index efb0a3af1e..aa6b119645 100644 --- a/runtime/os_interface/windows/device_factory_win.cpp +++ b/runtime/os_interface/windows/device_factory_win.cpp @@ -25,7 +25,6 @@ bool DeviceFactory::getDevices(size_t &numDevices, ExecutionEnvironment &executi numDevices = 0; auto hardwareInfo = executionEnvironment.getMutableHardwareInfo(); - executionEnvironment.initGmm(); std::unique_ptr wddm(Wddm::createWddm()); if (!wddm->init(*hardwareInfo)) { return false; diff --git a/runtime/os_interface/windows/wddm/wddm.cpp b/runtime/os_interface/windows/wddm/wddm.cpp index e792615c46..ebb1fd70b4 100644 --- a/runtime/os_interface/windows/wddm/wddm.cpp +++ b/runtime/os_interface/windows/wddm/wddm.cpp @@ -9,6 +9,7 @@ #include "core/helpers/interlocked_max.h" #include "runtime/command_stream/preemption.h" +#include "runtime/execution_environment/execution_environment.h" #include "runtime/gmm_helper/gmm.h" #include "runtime/gmm_helper/gmm_helper.h" #include "runtime/gmm_helper/page_table_mngr.h" @@ -22,6 +23,7 @@ #include "runtime/os_interface/windows/wddm/wddm_interface.h" #include "runtime/os_interface/windows/wddm_allocation.h" #include "runtime/os_interface/windows/wddm_engine_mapper.h" +#include "runtime/platform/platform.h" #include "runtime/sku_info/operations/sku_info_receiver.h" #include "gmm_memory.h" @@ -91,6 +93,8 @@ bool Wddm::init(HardwareInfo &outHardwareInfo) { return false; } + platform()->peekExecutionEnvironment()->initGmm(); + auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(outHardwareInfo); if (featureTable->ftrWddmHwQueues) {