diff --git a/Source/Core/VideoCommon/Src/PixelShader.cpp b/Source/Core/VideoCommon/Src/PixelShader.cpp
index 779898bafa..dfac501beb 100644
--- a/Source/Core/VideoCommon/Src/PixelShader.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShader.cpp
@@ -337,12 +337,12 @@ static const char *alphaRef[2] =
static const char *tevCOutputTable[] = { "prev.rgb", "c0.rgb", "c1.rgb", "c2.rgb" };
static const char *tevAOutputTable[] = { "prev.a", "c0.a", "c1.a", "c2.a" };
-static const char* tevIndAlphaSel[] = {"", "x", "y", "z"};
-static const char* tevIndAlphaScale[] = {"", "*32","*16","*8"};
-static const char* tevIndBiasField[] = {"", "x", "y", "xy", "z", "xz", "yz", "xyz"}; // indexed by bias
-static const char* tevIndBiasAdd[] = {"-128.0f", "1.0f", "1.0f", "1.0f" }; // indexed by fmt
-static const char* tevIndWrapStart[] = {"0", "256", "128", "64", "32", "16", "0.001" };
-static const char* tevIndFmtScale[] = {"255.0f", "31.0f", "15.0f", "8.0f" };
+static const char *tevIndAlphaSel[] = {"", "x", "y", "z"};
+static const char *tevIndAlphaScale[] = {"", "*32","*16","*8"};
+static const char *tevIndBiasField[] = {"", "x", "y", "xy", "z", "xz", "yz", "xyz"}; // indexed by bias
+static const char *tevIndBiasAdd[] = {"-128.0f", "1.0f", "1.0f", "1.0f" }; // indexed by fmt
+static const char *tevIndWrapStart[] = {"0", "256", "128", "64", "32", "16", "0.001" };
+static const char *tevIndFmtScale[] = {"255.0f", "31.0f", "15.0f", "8.0f" };
#define WRITE p+=sprintf
@@ -364,7 +364,7 @@ static void BuildSwapModeTable()
}
}
-char *GeneratePixelShader(u32 texture_mask, bool has_zbuffer_target, bool bRenderZToCol0)
+const char *GeneratePixelShader(u32 texture_mask, bool has_zbuffer_target, bool bRenderZToCol0)
{
text[sizeof(text) - 1] = 0x7C; // canary
DVSTARTPROFILE();
diff --git a/Source/Core/VideoCommon/Src/PixelShader.h b/Source/Core/VideoCommon/Src/PixelShader.h
index 876daefb2f..df54a7b0a4 100644
--- a/Source/Core/VideoCommon/Src/PixelShader.h
+++ b/Source/Core/VideoCommon/Src/PixelShader.h
@@ -89,7 +89,7 @@ public:
}
};
-char *GeneratePixelShader(u32 texture_mask, bool has_zbuffer_target, bool bRenderZToCol0);
+const char *GeneratePixelShader(u32 texture_mask, bool has_zbuffer_target, bool bRenderZToCol0);
void GetPixelShaderId(PIXELSHADERUID &, u32 s_texturemask, u32 zbufrender, u32 zBufRenderToCol0);
#endif
diff --git a/Source/Core/VideoCommon/Src/VertexShader.cpp b/Source/Core/VideoCommon/Src/VertexShader.cpp
index 5fd307b881..af6cb73f8a 100644
--- a/Source/Core/VideoCommon/Src/VertexShader.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShader.cpp
@@ -77,7 +77,7 @@ static char text[16384];
char *GenerateLightShader(char* p, int index, const LitChannel& chan, const char* dest, int coloralpha);
-char *GenerateVertexShader(u32 components, bool has_zbuffer_target)
+const char *GenerateVertexShader(u32 components, bool has_zbuffer_target)
{
text[sizeof(text) - 1] = 0x7C; // canary
DVSTARTPROFILE();
diff --git a/Source/Core/VideoCommon/Src/VertexShader.h b/Source/Core/VideoCommon/Src/VertexShader.h
index 2680581acb..8518f299dd 100644
--- a/Source/Core/VideoCommon/Src/VertexShader.h
+++ b/Source/Core/VideoCommon/Src/VertexShader.h
@@ -94,7 +94,7 @@ public:
}
};
-char *GenerateVertexShader(u32 components, bool has_zbuffer_target);
+const char *GenerateVertexShader(u32 components, bool has_zbuffer_target);
void GetVertexShaderId(VERTEXSHADERUID& vid, u32 components, u32 zbufrender);
#endif
diff --git a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
index 8f8c5c0be0..9769798205 100644
--- a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
+++ b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
@@ -1205,6 +1205,14 @@
RelativePath=".\Src\NativeVertexFormat.cpp"
>
+
+
+
+
@@ -1270,11 +1278,11 @@
>
-
-
-
-
-
-
@@ -1314,11 +1310,11 @@
>
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp
index 5edf9a5ec7..36420bd88b 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp
@@ -251,13 +251,18 @@ namespace D3D
}
}
dev->GetDeviceCaps(&caps);
- dev->GetRenderTarget(0,&backBuffer);
+ dev->GetRenderTarget(0, &backBuffer);
Ps.Major = (D3D::caps.PixelShaderVersion >> 8) & 0xFF;
Ps.Minor = (D3D::caps.PixelShaderVersion) & 0xFF;
Vs.Major = (D3D::caps.VertexShaderVersion >>8) & 0xFF;
Vs.Minor = (D3D::caps.VertexShaderVersion) & 0xFF;
+ if (caps.NumSimultaneousRTs < 2)
+ {
+ MessageBox(0, "Warning - your graphics card does not support multiple render targets.", 0, 0);
+ }
+
// Device state would normally be set here
return S_OK;
}
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
similarity index 95%
rename from Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.cpp
rename to Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
index 9952cf8866..25b381d133 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
@@ -19,7 +19,7 @@
#include "Statistics.h"
#include "Utils.h"
#include "Profiler.h"
-#include "PixelShaderManager.h"
+#include "PixelShaderCache.h"
#include "VertexLoader.h"
#include "BPMemory.h"
#include "XFMemory.h"
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.h b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h
similarity index 87%
rename from Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.h
rename to Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h
index ef8e780fe8..c602e1c783 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderManager.h
+++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h
@@ -15,12 +15,13 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _PIXELSHADERMANAGER_H
-#define _PIXELSHADERMANAGER_H
+#ifndef _PIXELSHADERCACHE_H
+#define _PIXELSHADERCACHE_H
#include "D3DBase.h"
#include