From 3465106456283b2f460842ec8526de3514bd4df6 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Wed, 2 Dec 2015 19:12:48 +0300 Subject: [PATCH] Shared PCH (experimental) "Rebuild" is broken though. --- README.md | 2 +- rpcs3.sln | 14 +- rpcs3/D3D12GSRender.vcxproj | 132 ++++++++++++++++-- rpcs3/D3D12GSRender.vcxproj.filters | 3 - rpcs3/Emu/Cell/PPUProgramCompiler.cpp | 1 + rpcs3/Emu/Io/XInput/XInputPadHandler.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp | 1 + .../D3D12/D3D12FragmentProgramDecompiler.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12MemoryHelpers.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12Overlay.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp | 1 + rpcs3/Emu/RSX/D3D12/D3D12Utils.cpp | 4 +- .../D3D12/D3D12VertexProgramDecompiler.cpp | 1 + rpcs3/Emu/RSX/GSManager.cpp | 16 +-- rpcs3/Emu/System.h | 1 + rpcs3/Gui/AutoPauseManager.cpp | 1 + rpcs3/Gui/CgDisasm.cpp | 1 + rpcs3/Gui/CompilerELF.cpp | 1 + rpcs3/Gui/ConLogFrame.cpp | 1 + rpcs3/Gui/Debugger.cpp | 1 + rpcs3/Gui/DisAsmFrame.cpp | 1 + rpcs3/Gui/GLGSFrame.cpp | 1 + rpcs3/Gui/GSFrame.cpp | 1 + rpcs3/Gui/GameViewer.cpp | 1 + rpcs3/Gui/InterpreterDisAsm.cpp | 1 + rpcs3/Gui/KernelExplorer.cpp | 1 + rpcs3/Gui/LLEModulesManager.cpp | 1 + rpcs3/Gui/MainFrame.cpp | 1 + rpcs3/Gui/MemoryStringSearcher.cpp | 1 + rpcs3/Gui/MemoryViewer.cpp | 1 + rpcs3/Gui/MsgDialog.cpp | 1 + rpcs3/Gui/PADManager.cpp | 1 + rpcs3/Gui/RSXDebugger.cpp | 1 + rpcs3/Gui/SaveDataDialog.cpp | 1 + rpcs3/Gui/SaveDataUtility.cpp | 1 + rpcs3/Gui/SettingsDialog.cpp | 1 + rpcs3/Gui/SignInDialog.cpp | 1 + rpcs3/Gui/TextInputDialog.cpp | 1 + rpcs3/Gui/VFSManager.cpp | 1 + rpcs3/Gui/VHDDManager.cpp | 1 + rpcs3/emucore.vcxproj | 17 ++- rpcs3/rpcs3.cpp | 34 +++-- rpcs3/rpcs3.vcxproj | 41 +++--- rpcs3/rpcs3.vcxproj.filters | 3 - rpcs3/stdafx_d3d12.cpp | 7 - rpcs3/stdafx_d3d12.h | 8 +- rpcs3/stdafx_gui.cpp | 1 - rpcs3/stdafx_gui.h | 8 +- 53 files changed, 241 insertions(+), 88 deletions(-) delete mode 100644 rpcs3/stdafx_d3d12.cpp delete mode 100644 rpcs3/stdafx_gui.cpp diff --git a/README.md b/README.md index a0b98537f5..595aa02099 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ __Mac OSX__ To initialize the repository don't forget to execute `git submodule update --init` to pull the wxWidgets source. * __Windows__: -Open the *.SLN* file, and press *Build* > *Rebuild Solution*. +Open the *.SLN* file, and press *Build* > *Clean Solution*, then *Build Solution*. *Rebuild* may not work correctly. * __Linux & Mac OSX__: If you want to build with LLVM, then LLVM 3.6.2 is required. `cd rpcs3 && cmake CMakeLists.txt && make && cd ../` then run with `cd bin && ./rpcs3`. diff --git a/rpcs3.sln b/rpcs3.sln index fdf33f6943..e230875034 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" ProjectSection(ProjectDependencies) = postProject @@ -594,18 +594,18 @@ Global {00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.Build.0 = Release|x64 {00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.ActiveCfg = Release|x64 {00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.Build.0 = Release|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.Build.0 = Debug|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.Build.0 = Debug|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug|x64.ActiveCfg = Debug|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug|x64.Build.0 = Debug|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.DLL Debug|x64.ActiveCfg = Debug|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.DLL Debug|x64.Build.0 = Debug|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.DLL Release|x64.ActiveCfg = Release|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.DLL Release|x64.Build.0 = Release|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release - LLVM|x64.ActiveCfg = Release|x64 - {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release - LLVM|x64.Build.0 = Release|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64 + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release - LLVM|x64.Build.0 = Release - LLVM|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release|x64.ActiveCfg = Release|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Release|x64.Build.0 = Release|x64 {AB222E8A-00CA-4ACF-A87E-5251C16C0587}.Debug - LLVM|x64.ActiveCfg = Debug|x64 diff --git a/rpcs3/D3D12GSRender.vcxproj b/rpcs3/D3D12GSRender.vcxproj index cf6f0ab07c..df5813dd6a 100644 --- a/rpcs3/D3D12GSRender.vcxproj +++ b/rpcs3/D3D12GSRender.vcxproj @@ -1,10 +1,22 @@  + + Debug - LLVM + x64 + + + Debug - MemLeak + x64 + Debug x64 + + Release - LLVM + x64 + Release x64 @@ -22,11 +34,30 @@ v140 Unicode + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + true + v140 + Unicode + StaticLibrary false v140 - true + false + Unicode + + + StaticLibrary + false + v140 + false Unicode @@ -37,24 +68,82 @@ + + + + + + + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\minidx12\Include;$(IncludePath) + + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\minidx12\Include;$(IncludePath) + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\minidx12\Include;$(IncludePath) + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\minidx12\Include;$(IncludePath) + + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\minidx12\Include;$(IncludePath) + Level3 Disabled false Use - stdafx_d3d12.h + stdafx.h .;.. + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + true + Async + + + true + + + + + Level3 + Disabled + false + Use + stdafx.h + .;.. + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + true + Async + _UNICODE;UNICODE;MSVC_CRT_MEMLEAK_DETECTION;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + false + Use + stdafx.h + .;.. + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + true + Async + _UNICODE;UNICODE;LLVM_AVAILABLE;%(PreprocessorDefinitions) true @@ -66,10 +155,36 @@ MaxSpeed true true - true + false Use - stdafx_d3d12.h + stdafx.h .;.. + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + true + Async + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + false + Use + stdafx.h + .;.. + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + true + Async + _UNICODE;UNICODE;LLVM_AVAILABLE;%(PreprocessorDefinitions) true @@ -103,10 +218,11 @@ - - Create - Create - + + + + {c4a10229-4712-4bd2-b63e-50d93c67a038} + diff --git a/rpcs3/D3D12GSRender.vcxproj.filters b/rpcs3/D3D12GSRender.vcxproj.filters index 8a80059961..52d361d921 100644 --- a/rpcs3/D3D12GSRender.vcxproj.filters +++ b/rpcs3/D3D12GSRender.vcxproj.filters @@ -73,9 +73,6 @@ Source Files - - Source Files - Source Files diff --git a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp index caa6f624bc..c4c6d73814 100644 --- a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp +++ b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "PPUProgramCompiler.h" #include "Utilities/File.h" diff --git a/rpcs3/Emu/Io/XInput/XInputPadHandler.cpp b/rpcs3/Emu/Io/XInput/XInputPadHandler.cpp index 8a8f6c994c..5823f71367 100644 --- a/rpcs3/Emu/Io/XInput/XInputPadHandler.cpp +++ b/rpcs3/Emu/Io/XInput/XInputPadHandler.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #ifdef _MSC_VER #include "Utilities/Log.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp index 52da134c03..bb02d2783c 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "Utilities/Log.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp index cbf1224c83..de1ff130ab 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12CommonDecompiler.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp index 22996bdafc..e20c4943ad 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12Formats.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12FragmentProgramDecompiler.cpp index 776b3aa385..ef46afafc5 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12FragmentProgramDecompiler.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12FragmentProgramDecompiler.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp index 35eb941b55..3596568253 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12GSRender.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12MemoryHelpers.cpp b/rpcs3/Emu/RSX/D3D12/D3D12MemoryHelpers.cpp index 985417e130..abcd84ad9d 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12MemoryHelpers.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12MemoryHelpers.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12MemoryHelpers.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Overlay.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Overlay.cpp index 17e062807f..0d90ddfc65 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Overlay.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Overlay.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12GSRender.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp index 360c8abba0..45f7e97928 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12PipelineState.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp index 8636c5dca6..fdea7f00d4 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12RenderTargetSets.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp index aec4da6d4f..ab3d4c1ec9 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12GSRender.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Utils.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Utils.cpp index 84f2380e63..6c77a9b8ca 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Utils.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Utils.cpp @@ -1,6 +1,4 @@ -/** -* Contains utility shaders -*/ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12GSRender.h" diff --git a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp index d603cc9c72..238cd12b82 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_d3d12.h" #ifdef _MSC_VER #include "D3D12VertexProgramDecompiler.h" diff --git a/rpcs3/Emu/RSX/GSManager.cpp b/rpcs3/Emu/RSX/GSManager.cpp index dd9002bf89..044ef34aa6 100644 --- a/rpcs3/Emu/RSX/GSManager.cpp +++ b/rpcs3/Emu/RSX/GSManager.cpp @@ -1,15 +1,11 @@ #include "stdafx.h" #include "Utilities/Log.h" +#include "Emu/System.h" #include "Emu/Memory/Memory.h" #include "Emu/SysCalls/Modules/cellVideoOut.h" #include "Emu/state.h" #include "GSManager.h" -#include "Null/NullGSRender.h" -#include "GL/GLGSRender.h" -#ifdef _MSC_VER -#include "Emu/RSX/D3D12/D3D12GSRender.h" -#endif void GSInfo::Init() { @@ -28,15 +24,7 @@ void GSManager::Init() m_info.Init(); - switch (rpcs3::state.config.rsx.renderer.value()) - { - default: - case rsx_renderer_type::Null : m_render = std::make_shared(); break; - case rsx_renderer_type::OpenGL: m_render = std::make_shared(); break; -#ifdef _MSC_VER - case rsx_renderer_type::DX12: m_render = std::make_shared(); break; -#endif - } + m_render = Emu.GetCallbacks().get_gs_render(); //m_render->Init(GetInfo().outresolution.width, GetInfo().outresolution.height); } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index c45c36b023..6e9438381e 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -14,6 +14,7 @@ struct EmuCallbacks std::function()> get_mouse_handler; std::function()> get_pad_handler; std::function(frame_type)> get_gs_frame; + std::function()> get_gs_render; std::function()> get_msg_dialog; std::function()> get_save_dialog; }; diff --git a/rpcs3/Gui/AutoPauseManager.cpp b/rpcs3/Gui/AutoPauseManager.cpp index a3b7cd7afa..0f20a6beec 100644 --- a/rpcs3/Gui/AutoPauseManager.cpp +++ b/rpcs3/Gui/AutoPauseManager.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Emu/System.h" #include "AutoPauseManager.h" diff --git a/rpcs3/Gui/CgDisasm.cpp b/rpcs3/Gui/CgDisasm.cpp index 91df818876..cc57e2b4d1 100644 --- a/rpcs3/Gui/CgDisasm.cpp +++ b/rpcs3/Gui/CgDisasm.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "CgDisasm.h" diff --git a/rpcs3/Gui/CompilerELF.cpp b/rpcs3/Gui/CompilerELF.cpp index 3e97ee7ef6..bc1bc501f4 100644 --- a/rpcs3/Gui/CompilerELF.cpp +++ b/rpcs3/Gui/CompilerELF.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/rMsgBox.h" diff --git a/rpcs3/Gui/ConLogFrame.cpp b/rpcs3/Gui/ConLogFrame.cpp index 5c59e982af..96269d479d 100644 --- a/rpcs3/Gui/ConLogFrame.cpp +++ b/rpcs3/Gui/ConLogFrame.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include diff --git a/rpcs3/Gui/Debugger.cpp b/rpcs3/Gui/Debugger.cpp index 05ab3d1337..6465bb5334 100644 --- a/rpcs3/Gui/Debugger.cpp +++ b/rpcs3/Gui/Debugger.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include diff --git a/rpcs3/Gui/DisAsmFrame.cpp b/rpcs3/Gui/DisAsmFrame.cpp index c7c52acff9..090df0493a 100644 --- a/rpcs3/Gui/DisAsmFrame.cpp +++ b/rpcs3/Gui/DisAsmFrame.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #if 0 #include "Utilities/Log.h" diff --git a/rpcs3/Gui/GLGSFrame.cpp b/rpcs3/Gui/GLGSFrame.cpp index 67e88bccae..cab168daae 100644 --- a/rpcs3/Gui/GLGSFrame.cpp +++ b/rpcs3/Gui/GLGSFrame.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "GLGSFrame.h" diff --git a/rpcs3/Gui/GSFrame.cpp b/rpcs3/Gui/GSFrame.cpp index 210fac10a4..ca795320c4 100644 --- a/rpcs3/Gui/GSFrame.cpp +++ b/rpcs3/Gui/GSFrame.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "GSFrame.h" #include "Emu/System.h" diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index 78b0e51314..337a44a9fb 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/AutoPause.h" #include "Utilities/Log.h" diff --git a/rpcs3/Gui/InterpreterDisAsm.cpp b/rpcs3/Gui/InterpreterDisAsm.cpp index 7b6167284d..ed90b9e61a 100644 --- a/rpcs3/Gui/InterpreterDisAsm.cpp +++ b/rpcs3/Gui/InterpreterDisAsm.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/KernelExplorer.cpp b/rpcs3/Gui/KernelExplorer.cpp index 0d1a9f3508..ced4b62646 100644 --- a/rpcs3/Gui/KernelExplorer.cpp +++ b/rpcs3/Gui/KernelExplorer.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/LLEModulesManager.cpp b/rpcs3/Gui/LLEModulesManager.cpp index fc9eb85a7e..bdb8dbd6a2 100644 --- a/rpcs3/Gui/LLEModulesManager.cpp +++ b/rpcs3/Gui/LLEModulesManager.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Loader/ELF64.h" diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 3bf3d52bff..5f9be47e18 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "rpcs3.h" #include "config.h" diff --git a/rpcs3/Gui/MemoryStringSearcher.cpp b/rpcs3/Gui/MemoryStringSearcher.cpp index 2138a1ece2..200be53d53 100644 --- a/rpcs3/Gui/MemoryStringSearcher.cpp +++ b/rpcs3/Gui/MemoryStringSearcher.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/rPlatform.h" #include "Utilities/Log.h" diff --git a/rpcs3/Gui/MemoryViewer.cpp b/rpcs3/Gui/MemoryViewer.cpp index 3489f2a33c..130847c54c 100644 --- a/rpcs3/Gui/MemoryViewer.cpp +++ b/rpcs3/Gui/MemoryViewer.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/MsgDialog.cpp b/rpcs3/Gui/MsgDialog.cpp index 6013db337e..a01154fe56 100644 --- a/rpcs3/Gui/MsgDialog.cpp +++ b/rpcs3/Gui/MsgDialog.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "rpcs3.h" #include "Emu/System.h" diff --git a/rpcs3/Gui/PADManager.cpp b/rpcs3/Gui/PADManager.cpp index 573e39edf1..e5c6f01b10 100644 --- a/rpcs3/Gui/PADManager.cpp +++ b/rpcs3/Gui/PADManager.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/RSXDebugger.cpp b/rpcs3/Gui/RSXDebugger.cpp index 1d7ed7d518..622ba4eabc 100644 --- a/rpcs3/Gui/RSXDebugger.cpp +++ b/rpcs3/Gui/RSXDebugger.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "RSXDebugger.h" diff --git a/rpcs3/Gui/SaveDataDialog.cpp b/rpcs3/Gui/SaveDataDialog.cpp index a6518800c0..31689f6940 100644 --- a/rpcs3/Gui/SaveDataDialog.cpp +++ b/rpcs3/Gui/SaveDataDialog.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/SaveDataUtility.cpp b/rpcs3/Gui/SaveDataUtility.cpp index 2403f8aa57..f25a49e8ef 100644 --- a/rpcs3/Gui/SaveDataUtility.cpp +++ b/rpcs3/Gui/SaveDataUtility.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "SaveDataUtility.h" #include "Utilities/Log.h" diff --git a/rpcs3/Gui/SettingsDialog.cpp b/rpcs3/Gui/SettingsDialog.cpp index fd651850a0..99ee6783a7 100644 --- a/rpcs3/Gui/SettingsDialog.cpp +++ b/rpcs3/Gui/SettingsDialog.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Emu/System.h" diff --git a/rpcs3/Gui/SignInDialog.cpp b/rpcs3/Gui/SignInDialog.cpp index 4b629a48fd..fdc8f8b271 100644 --- a/rpcs3/Gui/SignInDialog.cpp +++ b/rpcs3/Gui/SignInDialog.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "SignInDialog.h" diff --git a/rpcs3/Gui/TextInputDialog.cpp b/rpcs3/Gui/TextInputDialog.cpp index a95795b2dd..86353830d4 100644 --- a/rpcs3/Gui/TextInputDialog.cpp +++ b/rpcs3/Gui/TextInputDialog.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "TextInputDialog.h" diff --git a/rpcs3/Gui/VFSManager.cpp b/rpcs3/Gui/VFSManager.cpp index d83680fd16..ead39cc391 100644 --- a/rpcs3/Gui/VFSManager.cpp +++ b/rpcs3/Gui/VFSManager.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" diff --git a/rpcs3/Gui/VHDDManager.cpp b/rpcs3/Gui/VHDDManager.cpp index d164b16502..223ebefee0 100644 --- a/rpcs3/Gui/VHDDManager.cpp +++ b/rpcs3/Gui/VHDDManager.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Utilities/Log.h" #include "VHDDManager.h" diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 1c67445b4c..9535999138 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -638,11 +638,6 @@ - - - {fac9b17b-f4b8-4b75-8aeb-c8c7cb92b078} - - {C4A10229-4712-4BD2-B63E-50D93C67A038} emucore @@ -742,6 +737,8 @@ true ../glm false + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true @@ -758,6 +755,8 @@ Async true ../glm + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true @@ -778,6 +777,8 @@ Async true ../glm + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true @@ -796,6 +797,8 @@ true ../glm _UNICODE;UNICODE;%(PreprocessorDefinitions) + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true @@ -813,9 +816,11 @@ Use stdafx.h Async - LLVM_AVAILABLE;%(PreprocessorDefinitions) + _UNICODE;UNICODE;LLVM_AVAILABLE;%(PreprocessorDefinitions) true ../glm + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp index 50256fef02..54e1866a08 100644 --- a/rpcs3/rpcs3.cpp +++ b/rpcs3/rpcs3.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "stdafx_gui.h" #include "Emu/Memory/Memory.h" #include "Emu/System.h" @@ -29,6 +30,13 @@ #include "Gui/SaveDataDialog.h" #include "Gui/GLGSFrame.h" + +#include "Emu/RSX/Null/NullGSRender.h" +#include "Emu/RSX/GL/GLGSRender.h" +#ifdef _MSC_VER +#include "Emu/RSX/D3D12/D3D12GSRender.h" +#endif + #include #ifdef _WIN32 @@ -110,7 +118,7 @@ bool Rpcs3App::OnInit() #ifdef _MSC_VER case io_handler_mode::xinput: return std::make_unique(); #endif - default: throw EXCEPTION("Invalid Pad Handler Mode %d", +(u32)mode); + default: throw EXCEPTION("Invalid Pad Handler Mode %d", (int)mode); } }; @@ -118,19 +126,27 @@ bool Rpcs3App::OnInit() { switch (type) { - case frame_type::OpenGL: - return std::make_unique(); - - case frame_type::DX12: - return std::make_unique("DirectX 12"); - - case frame_type::Null: - return std::make_unique("Null"); + case frame_type::OpenGL: return std::make_unique(); + case frame_type::DX12: return std::make_unique("DirectX 12"); + case frame_type::Null: return std::make_unique("Null"); } throw EXCEPTION("Invalid Frame Type"); }; + callbacks.get_gs_render = []() -> std::shared_ptr + { + switch (auto mode = rpcs3::state.config.rsx.renderer.value()) + { + case rsx_renderer_type::Null: return std::make_shared(); + case rsx_renderer_type::OpenGL: return std::make_shared(); +#ifdef _MSC_VER + case rsx_renderer_type::DX12: return std::make_shared(); +#endif + default: throw EXCEPTION("Invalid GS Renderer %d", (int)mode); + } + }; + callbacks.get_msg_dialog = []() -> std::unique_ptr { return std::make_unique(); diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index 5f0dc350ed..7434256cc3 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -50,7 +50,7 @@ Application false - true + false Unicode v140 false @@ -58,7 +58,7 @@ Application false - true + false Unicode v140 false @@ -124,9 +124,10 @@ Use ..\wxWidgets\include\msvc;..\glm Async - stdafx_gui.h - $(IntDir)$(TargetName)_gui.pch + stdafx.h + $(Platform)\$(Configuration).pch _UNICODE;UNICODE;%(PreprocessorDefinitions) + $(Platform)\$(Configuration).pdb true @@ -154,9 +155,10 @@ Use ..\wxWidgets\include\msvc;..\glm Async - stdafx_gui.h - $(IntDir)$(TargetName)_gui.pch + stdafx.h + $(Platform)\$(Configuration).pch _UNICODE;UNICODE;LLVM_AVAILABLE;%(PreprocessorDefinitions) + $(Platform)\$(Configuration).pdb true @@ -183,10 +185,11 @@ ProgramDatabase Use ..\wxWidgets\include\msvc;..\glm - _UNICODE;UNICODE;MSVC_CRT_MEMLEAK_DETECTION;%(PreprocessorDefinitions);DX12_SUPPORT + _UNICODE;UNICODE;MSVC_CRT_MEMLEAK_DETECTION;%(PreprocessorDefinitions) Async - stdafx_gui.h - $(IntDir)$(TargetName)_gui.pch + stdafx.h + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb true @@ -214,15 +217,15 @@ true ..\wxWidgets\include\msvc;..\glm MultiThreadedDLL - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) false Use Speed Async false true - stdafx_gui.h - $(IntDir)$(TargetName)_gui.pch + stdafx.h + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb Windows @@ -252,15 +255,16 @@ true ..\wxWidgets\include\msvc;..\glm MultiThreadedDLL - WIN32;NDEBUG;_WINDOWS;LLVM_AVAILABLE;%(PreprocessorDefinitions) false Use Speed Async false true - stdafx_gui.h - $(IntDir)$(TargetName)_gui.pch + stdafx.h + $(Platform)\$(Configuration).pch + $(Platform)\$(Configuration).pdb + _UNICODE;UNICODE;LLVM_AVAILABLE;%(PreprocessorDefinitions) Windows @@ -311,13 +315,6 @@ - - Create - Create - Create - Create - Create - diff --git a/rpcs3/rpcs3.vcxproj.filters b/rpcs3/rpcs3.vcxproj.filters index 8d15491186..f4b9821357 100644 --- a/rpcs3/rpcs3.vcxproj.filters +++ b/rpcs3/rpcs3.vcxproj.filters @@ -81,9 +81,6 @@ Io\XInput - - rpcs3 - Gui diff --git a/rpcs3/stdafx_d3d12.cpp b/rpcs3/stdafx_d3d12.cpp deleted file mode 100644 index e8a394cff3..0000000000 --- a/rpcs3/stdafx_d3d12.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "stdafx_d3d12.h" - -#ifdef _MSC_VER -#pragma comment(lib, "d2d1") -#pragma comment(lib, "DXGI") -#pragma comment(lib, "Dwrite") -#endif diff --git a/rpcs3/stdafx_d3d12.h b/rpcs3/stdafx_d3d12.h index b72b986643..19f78b3671 100644 --- a/rpcs3/stdafx_d3d12.h +++ b/rpcs3/stdafx_d3d12.h @@ -1,7 +1,6 @@ #pragma once -#ifdef _MSC_VER -#include "stdafx.h" +#ifdef _MSC_VER // Must be included first #include @@ -10,4 +9,9 @@ #include "Emu\RSX\D3D12\D3D12Utils.h" #include "Emu\RSX\D3D12\D3D12Formats.h" #include "Emu\RSX\D3D12\D3D12GSRender.h" + +#pragma comment(lib, "d2d1") +#pragma comment(lib, "DXGI") +#pragma comment(lib, "Dwrite") + #endif diff --git a/rpcs3/stdafx_gui.cpp b/rpcs3/stdafx_gui.cpp deleted file mode 100644 index b4f62112d0..0000000000 --- a/rpcs3/stdafx_gui.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "stdafx_gui.h" \ No newline at end of file diff --git a/rpcs3/stdafx_gui.h b/rpcs3/stdafx_gui.h index 090192991b..083c9525c1 100644 --- a/rpcs3/stdafx_gui.h +++ b/rpcs3/stdafx_gui.h @@ -1,6 +1,9 @@ #pragma once #ifndef QT_UI +#ifdef _MSC_VER +#pragma warning(push, 0) +#endif #include #include #include @@ -23,6 +26,7 @@ #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#endif #endif - -#include "stdafx.h"