diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.h b/Source/Core/VideoCommon/Src/TextureCacheBase.h index cea7c258b5..201bd1dc65 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.h +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.h @@ -4,7 +4,7 @@ #include -//#include "VideoCommon.h" +#include "VideoCommon.h" #include "TextureDecoder.h" #include "BPMemory.h" diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp index 287cf59f2c..c229802987 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp @@ -15,14 +15,12 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include "StringUtil.h" +#include "VideoConfig.h" + #include "D3DBase.h" #include "D3DTexture.h" -#include "D3DShader.h" -#include "D3Dcompiler.h" -#include "VideoConfig.h" -#include "Render.h" -#include "XFStructs.h" -#include "StringUtil.h" +#include "GfxState.h" HINSTANCE hD3DXDll = NULL; D3DX11COMPILEFROMMEMORYTYPE PD3DX11CompileFromMemory = NULL; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.h b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.h index 8bb22f238c..80d0c0ae1f 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.h @@ -19,8 +19,6 @@ #include #include "Common.h" -#include "D3DBlob.h" -#include "GfxState.h" #include #define SAFE_RELEASE(x) { if (x) (x)->Release(); (x) = NULL; } diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.cpp index 94655911fd..e5a069b0d4 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.cpp @@ -15,6 +15,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include #include "D3DBlob.h" D3DBlob::D3DBlob(unsigned int blob_size, const u8* init_data) : ref(1), size(blob_size), blob(NULL) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.h b/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.h index ec48053aab..0362f45ef6 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBlob.h @@ -17,8 +17,9 @@ #pragma once -#include -#include "Common.h" +#include "CommonTypes.h" + +struct ID3D10Blob; // use this class instead ID3D10Blob or ID3D11Blob whenever possible class D3DBlob diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.cpp index c186a36204..e7bcf05260 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.cpp @@ -15,11 +15,11 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include -#include #include #include "VideoConfig.h" + +#include "D3DBase.h" #include "D3DShader.h" namespace D3D @@ -54,10 +54,13 @@ bool CompileVertexShader(const char* code, unsigned int len, D3DBlob** blob) if (FAILED(hr) || errorBuffer) { - std::string msg = (char*)errorBuffer->GetBufferPointer(); - msg += "\n\n"; - msg += code; - MessageBoxA(0, msg.c_str(), "Error compiling pixel shader", MB_ICONERROR); + if (g_ActiveConfig.bShowShaderErrors) + { + std::string msg = (char*)errorBuffer->GetBufferPointer(); + msg += "\n\n"; + msg += code; + MessageBoxA(0, msg.c_str(), "Error compiling pixel shader", MB_ICONERROR); + } *blob = NULL; errorBuffer->Release(); @@ -99,10 +102,13 @@ bool CompilePixelShader(const char* code, unsigned int len, D3DBlob** blob) if (FAILED(hr) || errorBuffer) { - std::string msg = (char*)errorBuffer->GetBufferPointer(); - msg += "\n\n"; - msg += code; - MessageBoxA(0, msg.c_str(), "Error compiling pixel shader", MB_ICONERROR); + if (g_ActiveConfig.bShowShaderErrors) + { + std::string msg = (char*)errorBuffer->GetBufferPointer(); + msg += "\n\n"; + msg += code; + MessageBoxA(0, msg.c_str(), "Error compiling pixel shader", MB_ICONERROR); + } *blob = NULL; errorBuffer->Release(); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.h b/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.h index 75cb58c6cf..c88add9b07 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DShader.h @@ -17,7 +17,10 @@ #pragma once -#include "D3DBase.h" +#include "D3DBlob.h" + +struct ID3D11PixelShader; +struct ID3D11VertexShader; namespace D3D { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp index ee06bc1cf2..95f68856c6 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include #include "D3DBase.h" #include "D3DTexture.h" diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.h b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.h index 37479378d6..3b0aed5a8b 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.h @@ -17,7 +17,7 @@ #pragma once -#include "D3DBase.h" +#include "d3d11.h" namespace D3D { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.cpp index b83070433c..aea9e38e60 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.cpp @@ -16,15 +16,13 @@ // http://code.google.com/p/dolphin-emu/ #include -#include "Common.h" #include "D3DBase.h" #include "D3DUtil.h" -#include "D3DTexture.h" -#include "Render.h" #include "PixelShaderCache.h" #include "VertexShaderCache.h" #include "D3DShader.h" +#include "GfxState.h" namespace D3D { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.h b/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.h index 0628d16a9e..135d6f1a3f 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DUtil.h @@ -17,8 +17,7 @@ #pragma once -#include "D3DBase.h" -#include +#include "d3d11.h" #include namespace D3D diff --git a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp index afcc9a8e01..3b5ecb93e0 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp @@ -15,13 +15,13 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "D3DBase.h" -#include "D3DTexture.h" -#include "D3DUtil.h" -#include "Render.h" -#include "FramebufferManager.h" #include "VideoConfig.h" + +#include "D3DBase.h" +#include "D3DUtil.h" +#include "FramebufferManager.h" #include "PixelShaderCache.h" +#include "Render.h" #include "VertexShaderCache.h" FramebufferManager::Efb FramebufferManager::m_efb; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.h b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.h index ed5fd466a7..9039d91e1e 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.h @@ -18,10 +18,12 @@ #ifndef _FBMANAGER_D3D_H_ #define _FBMANAGER_D3D_H_ -#include "D3DBase.h" -#include "D3DTexture.h" +#include "d3d11.h" + #include "FramebufferManagerBase.h" +#include "D3DTexture.h" + // On the GameCube, the game sends a request for the graphics processor to // transfer its internal EFB (Embedded Framebuffer) to an area in GameCube RAM // called the XFB (External Framebuffer). The size and location of the XFB is diff --git a/Source/Plugins/Plugin_VideoDX11/Src/GfxState.cpp b/Source/Plugins/Plugin_VideoDX11/Src/GfxState.cpp index 10fc00d3f1..b0f89f652e 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/GfxState.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/GfxState.cpp @@ -15,9 +15,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "VideoConfig.h" +#include "Log.h" + +#include "D3DBase.h" #include "GfxState.h" -#include "VertexShaderCache.h" namespace D3D { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoDX11/Src/NativeVertexFormat.cpp index 59f24c4280..c86b2a9448 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/NativeVertexFormat.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/NativeVertexFormat.cpp @@ -17,14 +17,7 @@ // http://code.google.com/p/dolphin-emu/ #include "D3DBase.h" - -#include "Profiler.h" -#include "x64Emitter.h" -#include "ABI.h" -#include "MemoryUtil.h" -#include "VertexShaderGen.h" - -#include "CPMemory.h" +#include "D3DBlob.h" #include "NativeVertexFormat.h" #include "VertexManager.h" #include "VertexShaderCache.h" diff --git a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp index d4821bc854..285d9a4335 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp @@ -15,24 +15,18 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "Common.h" #include "FileUtil.h" #include "LinearDiskCache.h" -#include "Globals.h" -#include "D3DBase.h" -#include "D3Dcompiler.h" -#include "D3DShader.h" +#include "Debugger.h" #include "Statistics.h" #include "VideoConfig.h" + +#include "D3DBase.h" +#include "D3DShader.h" +#include "Globals.h" #include "PixelShaderGen.h" -#include "PixelShaderManager.h" #include "PixelShaderCache.h" -#include "VertexLoader.h" -#include "BPMemory.h" -#include "XFMemory.h" -#include "ImageWrite.h" -#include "Debugger.h" extern int frameCount; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.h b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.h index 7a1b96288e..874e9fb4c7 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.h @@ -17,14 +17,12 @@ #pragma once -#include "Common.h" -#include "LinearDiskCache.h" -#include "D3DBase.h" - #include -#include "PixelShaderGen.h" -#include "VertexShaderGen.h" +#include + +class PIXELSHADERUID; +enum DSTALPHA_MODE; class PixelShaderCache { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index ea026ed4ee..7059130d73 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -15,41 +15,30 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include +#include +#include -#include "StringUtil.h" -#include "Common.h" -#include "Atomic.h" -#include "FileUtil.h" -#include "Thread.h" #include "Timer.h" -#include "Statistics.h" - -#include "VideoConfig.h" -#include "main.h" -#include "VertexManager.h" -#include "PixelEngine.h" -#include "Render.h" -#include "OpcodeDecoding.h" -#include "BPStructs.h" -#include "XFStructs.h" -#include "D3DUtil.h" -#include "VertexShaderManager.h" -#include "PixelShaderManager.h" -#include "VertexShaderCache.h" -#include "PixelShaderCache.h" -#include "VertexLoaderManager.h" -#include "TextureCache.h" -#include "EmuWindow.h" -#include "AVIDump.h" -#include "OnScreenDisplay.h" -#include "FramebufferManager.h" -#include "Fifo.h" -#include "DLCache.h" #include "Debugger.h" +#include "DLCache.h" +#include "EmuWindow.h" +#include "Fifo.h" +#include "OnScreenDisplay.h" +#include "PixelEngine.h" +#include "Statistics.h" +#include "VertexShaderManager.h" +#include "VideoConfig.h" + +#include "D3DBase.h" +#include "D3DUtil.h" +#include "FramebufferManager.h" +#include "GfxState.h" +#include "PixelShaderCache.h" +#include "Render.h" +#include "TextureCache.h" +#include "VertexShaderCache.h" -#include static int s_fps = 0; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp index 5a1dd79219..3aa2fa28a7 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp @@ -15,30 +15,14 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include - -#include "Globals.h" -#include "Statistics.h" -#include "MemoryUtil.h" -#include "Hash.h" - -#include "CommonPaths.h" -#include "FileUtil.h" +#include "RenderBase.h" #include "D3DBase.h" -#include "D3DTexture.h" #include "D3DUtil.h" #include "FramebufferManager.h" #include "PixelShaderCache.h" -#include "PixelShaderManager.h" -#include "VertexShaderManager.h" -#include "VertexShaderCache.h" - -#include "Render.h" - -#include "TextureDecoder.h" #include "TextureCache.h" -#include "HiresTextures.h" +#include "VertexShaderCache.h" namespace DX11 { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h index ab0fa48083..3e229b671c 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h @@ -17,15 +17,10 @@ #pragma once -#include - -#include "D3DBase.h" -#include "D3DTexture.h" -#include "VideoCommon.h" -#include "BPMemory.h" - #include "TextureCacheBase.h" +#include "D3DTexture.h" + namespace DX11 { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp index c2b17c34c8..9f23efbfd2 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp @@ -15,32 +15,22 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "Common.h" -#include "FileUtil.h" - #include "D3DBase.h" -#include "D3DShader.h" -#include "D3DUtil.h" -#include "Fifo.h" -#include "Statistics.h" -#include "Profiler.h" -#include "FramebufferManager.h" -#include "VertexManager.h" -#include "OpcodeDecoding.h" -#include "IndexGenerator.h" -#include "VertexShaderManager.h" -#include "VertexShaderCache.h" -#include "PixelShaderManager.h" #include "PixelShaderCache.h" -#include "NativeVertexFormat.h" -#include "TextureCache.h" -#include "main.h" +#include "VertexManager.h" +#include "VertexShaderCache.h" -#include "BPStructs.h" -#include "XFStructs.h" - -#include "Globals.h" +#include "BPMemory.h" #include "Debugger.h" +#include "IndexGenerator.h" +#include "MainBase.h" +#include "PixelShaderManager.h" +#include "Profiler.h" +#include "RenderBase.h" +#include "Statistics.h" +#include "TextureCacheBase.h" +#include "VertexShaderManager.h" +#include "VideoConfig.h" // internal state for loading vertices extern NativeVertexFormat *g_nativeVertexFmt; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.h b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.h index 7be0fb864d..f79a03d4d6 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.h @@ -18,11 +18,8 @@ #ifndef _VERTEXMANAGER_H #define _VERTEXMANAGER_H -#include "CPMemory.h" -#include "VertexLoader.h" - #include "VertexManagerBase.h" -#include "D3DBase.h" + namespace DX11 { diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp index 4bbd686e15..5c79591d1a 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp @@ -15,23 +15,17 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include - -#include "Common.h" #include "FileUtil.h" #include "LinearDiskCache.h" -#include "Globals.h" -#include "D3DBase.h" -#include "D3DShader.h" -#include "Statistics.h" -#include "Profiler.h" -#include "VideoConfig.h" -#include "VertexShaderCache.h" -#include "VertexLoader.h" -#include "BPMemory.h" -#include "XFMemory.h" #include "Debugger.h" +#include "Profiler.h" +#include "Statistics.h" +#include "VertexShaderGen.h" + +#include "D3DShader.h" +#include "Globals.h" +#include "VertexShaderCache.h" VertexShaderCache::VSCache VertexShaderCache::vshaders; const VertexShaderCache::VSCacheEntry *VertexShaderCache::last_entry; diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.h b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.h index e52abee815..c993eb2429 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.h @@ -18,10 +18,13 @@ #ifndef _VERTEXSHADERCACHE_H #define _VERTEXSHADERCACHE_H -#include "D3DBase.h" -#include "VertexShaderGen.h" #include +#include "D3DBase.h" +#include "D3DBlob.h" + +class VERTEXSHADERUID; + class VertexShaderCache { public: diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp index 6e93b6e9c6..960277f806 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp @@ -15,46 +15,37 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include -#include -#include - #include -#include -#include "Common.h" -#include "Atomic.h" -#include "Thread.h" #include "LogManager.h" -#include "VideoConfig.h" -#include "Fifo.h" -#include "OpcodeDecoding.h" #include "BPStructs.h" +#include "CommandProcessor.h" +#include "Fifo.h" +#include "OnScreenDisplay.h" +#include "OpcodeDecoding.h" +#include "PixelEngine.h" +#include "PixelShaderManager.h" +#include "VideoConfig.h" #include "VertexLoaderManager.h" #include "VertexShaderManager.h" -#include "PixelShaderManager.h" -#include "CommandProcessor.h" -#include "PixelEngine.h" -#include "OnScreenDisplay.h" -#include "VideoState.h" #include "XFBConvert.h" -#include "Render.h" -#include "MainBase.h" -#include "main.h" +#include "DebuggerPanel.h" +#include "DLCache.h" +#include "EmuWindow.h" +#include "FileUtil.h" +#include "Globals.h" +#include "IniFile.h" #include "VideoConfigDiag.h" + +#include "D3DUtil.h" +#include "D3DBase.h" +#include "PixelShaderCache.h" #include "TextureCache.h" #include "VertexManager.h" #include "VertexShaderCache.h" -#include "PixelShaderCache.h" -#include "D3DTexture.h" -#include "D3DUtil.h" -#include "EmuWindow.h" -#include "FramebufferManager.h" -#include "DLCache.h" -#include "DebuggerPanel.h" -#include "IniFile.h" + HINSTANCE g_hInstance = NULL;