2727#include " runtime/gmm_helper/gmm_helper.h"
2828#include " runtime/gmm_helper/resource_info.h"
2929#include " runtime/gmm_helper/page_table_mngr.h"
30- #include " runtime/os_interface/windows/wddm.h"
30+ #include " runtime/os_interface/windows/wddm/wddm .h"
3131#include " runtime/os_interface/hw_info_config.h"
3232#include " runtime/os_interface/windows/wddm_allocation.h"
3333#include " runtime/os_interface/windows/registry_reader.h"
@@ -53,18 +53,16 @@ Wddm::GetSystemInfoFcn Wddm::getSystemInfo = getGetSystemInfo();
5353Wddm::VirtualAllocFcn Wddm::virtualAllocFnc = getVirtualAlloc();
5454Wddm::VirtualFreeFcn Wddm::virtualFreeFnc = getVirtualFree();
5555
56- Wddm::Wddm (Gdi *gdi) : initialized(false ),
57- gdiAllocated (false ),
58- gdi(gdi),
59- adapter(0 ),
60- context(0 ),
61- device(0 ),
62- pagingQueue(0 ),
63- pagingQueueSyncObject(0 ),
64- pagingFenceAddress(nullptr ),
65- currentPagingFenceValue(0 ),
66- hwContextId(0 ),
67- trimCallbackHandle(nullptr ) {
56+ Wddm::Wddm () : initialized(false ),
57+ adapter (0 ),
58+ context(0 ),
59+ device(0 ),
60+ pagingQueue(0 ),
61+ pagingQueueSyncObject(0 ),
62+ pagingFenceAddress(nullptr ),
63+ currentPagingFenceValue(0 ),
64+ hwContextId(0 ),
65+ trimCallbackHandle(nullptr ) {
6866 featureTable.reset (new FeatureTable ());
6967 waTable.reset (new WorkaroundTable ());
7068 gtSystemInfo.reset (new GT_SYSTEM_INFO);
@@ -81,10 +79,7 @@ Wddm::Wddm(Gdi *gdi) : initialized(false),
8179 gmmMemory = std::unique_ptr<GmmMemory>(GmmMemory::create ());
8280 minAddress = 0 ;
8381 kmDafListener = std::unique_ptr<KmDafListener>(new KmDafListener);
84- }
85-
86- Wddm::Wddm () : Wddm(new Gdi()) {
87- gdiAllocated = true ;
82+ gdi = std::unique_ptr<Gdi>(new Gdi ());
8883}
8984
9085Wddm::~Wddm () {
@@ -95,8 +90,6 @@ Wddm::~Wddm() {
9590 destroyPagingQueue ();
9691 destroyDevice ();
9792 closeAdapter ();
98- if (gdiAllocated)
99- delete gdi;
10093}
10194
10295bool Wddm::enumAdapters (unsigned int devNum, HardwareInfo &outHardwareInfo) {
0 commit comments