From d16f089e88f63931d792cb4b2fca05747ed8c90a Mon Sep 17 00:00:00 2001 From: Jack Frost Date: Thu, 15 Aug 2013 13:52:31 +0200 Subject: [PATCH 1/4] properly clean up PerfQuery on OGL --- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 6b2e92c93a..1eb986fe74 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -250,6 +250,8 @@ void VideoBackend::Video_Cleanup() { ProgramShaderCache::Shutdown(); VertexShaderManager::Shutdown(); PixelShaderManager::Shutdown(); + delete g_perf_query; + g_perf_query = NULL; delete g_vertex_manager; g_vertex_manager = NULL; OpcodeDecoder_Shutdown(); From c6d8d52041a6fc66bfa6116402f7aebb9d098850 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 15 Aug 2013 15:05:20 +0200 Subject: [PATCH 2/4] Fix a warning introduced by the recent netplay UI changes --- Source/Core/DolphinWX/Src/NetWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index ac315025ba..fdd54a2a3c 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -282,8 +282,8 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game const std::string& game, const bool is_hosting) : wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR), wxDefaultPosition, wxDefaultSize) , m_selected_game(game) - , m_game_list(game_list) , m_start_btn(NULL) + , m_game_list(game_list) { wxPanel* const panel = new wxPanel(this); From 605e3e8f653d1d37070992ff634133afaea4224f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 15 Aug 2013 10:07:52 -0400 Subject: [PATCH 3/4] Revert "D3DBase: Don't pass the DEBUG flag when creating a device" This reverts commit 0e6b5bc5c8abc1fafcefeaf20eb64e81aa15765a. --- Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp index 8ea7e88e3e..c786c16e17 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp @@ -333,7 +333,11 @@ HRESULT Create(HWND wnd) swap_chain_desc.BufferDesc.Width = xres; swap_chain_desc.BufferDesc.Height = yres; +#if defined(_DEBUG) || defined(DEBUGFAST) + D3D11_CREATE_DEVICE_FLAG device_flags = (D3D11_CREATE_DEVICE_FLAG)(D3D11_CREATE_DEVICE_DEBUG|D3D11_CREATE_DEVICE_SINGLETHREADED); +#else D3D11_CREATE_DEVICE_FLAG device_flags = D3D11_CREATE_DEVICE_SINGLETHREADED; +#endif hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, device_flags, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &swap_chain_desc, &swapchain, &device, From 863fb9f95b5fd17fd4ce9425931dc56c8417ac63 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 15 Aug 2013 10:19:14 -0400 Subject: [PATCH 4/4] D3DBase: Fall back to creating a normal context when debug fails This can happen if the user does not have an up to date version of the DirectX SDK, as Microsoft intentionally broke it and requires users to install the W8 SDK. --- .../Plugins/Plugin_VideoDX11/Src/D3DBase.cpp | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp index c786c16e17..0bd9a14ed8 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp @@ -334,15 +334,27 @@ HRESULT Create(HWND wnd) swap_chain_desc.BufferDesc.Height = yres; #if defined(_DEBUG) || defined(DEBUGFAST) - D3D11_CREATE_DEVICE_FLAG device_flags = (D3D11_CREATE_DEVICE_FLAG)(D3D11_CREATE_DEVICE_DEBUG|D3D11_CREATE_DEVICE_SINGLETHREADED); -#else - D3D11_CREATE_DEVICE_FLAG device_flags = D3D11_CREATE_DEVICE_SINGLETHREADED; + // Creating debug devices can sometimes fail if the user doesn't have the correct + // version of the DirectX SDK. If it does, simply fallback to a non-debug device. + { + hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, + D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_DEBUG, + supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, + D3D11_SDK_VERSION, &swap_chain_desc, &swapchain, &device, + &featlevel, &context); + } + + if (FAILED(hr)) #endif - hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, device_flags, - supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, - D3D11_SDK_VERSION, &swap_chain_desc, &swapchain, &device, - &featlevel, &context); - if (FAILED(hr) || !device || !context || !swapchain) + { + hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, + D3D11_CREATE_DEVICE_SINGLETHREADED, + supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, + D3D11_SDK_VERSION, &swap_chain_desc, &swapchain, &device, + &featlevel, &context); + } + + if (FAILED(hr)) { MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR); SAFE_RELEASE(device);