Skip to content

Commit 5aa0dde

Browse files
committed
Modern tools for debugging Direct3D do not require special actions for initialization.
1 parent c51814e commit 5aa0dde

File tree

3 files changed

+2
-48
lines changed

3 files changed

+2
-48
lines changed

src/Layers/xrRender/HW.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,6 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window)
206206
DevAdapter = D3DADAPTER_DEFAULT;
207207
DevT = Caps.bForceGPU_REF ? D3DDEVTYPE_REF : D3DDEVTYPE_HAL;
208208

209-
#ifndef MASTER_GOLD
210-
// Look for 'NVIDIA NVPerfHUD' adapter
211-
// If it is present, override default settings
212-
for (UINT Adapter = 0; Adapter < pD3D->GetAdapterCount(); Adapter++)
213-
{
214-
D3DADAPTER_IDENTIFIER9 Identifier;
215-
HRESULT Res = pD3D->GetAdapterIdentifier(Adapter, 0, &Identifier);
216-
if (SUCCEEDED(Res) && (xr_strcmp(Identifier.Description, "NVIDIA PerfHUD") == 0))
217-
{
218-
DevAdapter = Adapter;
219-
DevT = D3DDEVTYPE_REF;
220-
break;
221-
}
222-
}
223-
#endif // MASTER_GOLD
224-
225209
// Display the name of video board
226210
D3DADAPTER_IDENTIFIER9 adapterID;
227211
R_CHK(pD3D->GetAdapterIdentifier(DevAdapter, 0, &adapterID));

src/Layers/xrRender/HW.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class CHW
8888

8989
D3D_DRIVER_TYPE m_DriverType; // DevT equivalent
9090
DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent
91-
bool m_bUsePerfhud;
9291
D3D_FEATURE_LEVEL FeatureLevel;
9392
#elif defined(USE_DX10)
9493
public:
@@ -105,7 +104,6 @@ class CHW
105104

106105
D3D10_DRIVER_TYPE m_DriverType; // DevT equivalent
107106
DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent
108-
bool m_bUsePerfhud;
109107
D3D_FEATURE_LEVEL FeatureLevel;
110108
#else
111109
private:

src/Layers/xrRenderDX10/dx10HW.cpp

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,10 @@ void CHW::CreateD3D()
8080
*/
8181

8282
IDXGIFactory* pFactory;
83-
R_CHK(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)(&pFactory)));
84-
85-
m_pAdapter = 0;
86-
m_bUsePerfhud = false;
8783

88-
#ifndef MASTER_GOLD
89-
// Look for 'NVIDIA NVPerfHUD' adapter
90-
// If it is present, override default settings
91-
UINT i = 0;
92-
while (pFactory->EnumAdapters(i, &m_pAdapter) != DXGI_ERROR_NOT_FOUND)
93-
{
94-
DXGI_ADAPTER_DESC desc;
95-
m_pAdapter->GetDesc(&desc);
96-
if (!wcscmp(desc.Description, L"NVIDIA PerfHUD"))
97-
{
98-
m_bUsePerfhud = true;
99-
break;
100-
}
101-
else
102-
{
103-
m_pAdapter->Release();
104-
m_pAdapter = 0;
105-
}
106-
++i;
107-
}
108-
#endif // MASTER_GOLD
84+
R_CHK(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)(&pFactory)));
10985

110-
if (!m_pAdapter)
111-
pFactory->EnumAdapters(0, &m_pAdapter);
86+
pFactory->EnumAdapters(0, &m_pAdapter);
11287

11388
pFactory->Release();
11489

@@ -164,9 +139,6 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window)
164139

165140
m_DriverType = Caps.bForceGPU_REF ? D3D_DRIVER_TYPE_REFERENCE : D3D_DRIVER_TYPE_HARDWARE;
166141

167-
if (m_bUsePerfhud)
168-
m_DriverType = D3D_DRIVER_TYPE_REFERENCE;
169-
170142
// For DirectX 10 adapter is already created in create D3D.
171143
/*
172144
//. #ifdef DEBUG

0 commit comments

Comments
 (0)