summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-11-27 11:37:57 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-11-27 11:37:57 +0000
commit5ae1b65388f1c76ffeab3a11057242f4944bbb20 (patch)
tree9c7fef2de223c284405d751e7ed22f3347279859 /Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
parent7698d85a8ef19cf5a6ea830b3909bcd9db4b5b5f (diff)
DX11: Fix stuff if MSAA is disabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6482 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
index b3ad2e2fb2..a9ee55a044 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
@@ -150,7 +150,8 @@ const char depth_matrix_program_msaa[] = {
ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
{
- if (!multisampled || s_ColorCopyProgram[1]) return s_ColorCopyProgram[multisampled];
+ if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1) return s_ColorCopyProgram[0];
+ else if (s_ColorCopyProgram[1]) return s_ColorCopyProgram[1];
else
{
// create MSAA shader for current AA mode
@@ -165,7 +166,8 @@ ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
{
- if (!multisampled || s_ColorMatrixProgram[1]) return s_ColorMatrixProgram[multisampled];
+ if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1) return s_ColorMatrixProgram[0];
+ else if (s_ColorMatrixProgram[1]) return s_ColorMatrixProgram[1];
else
{
// create MSAA shader for current AA mode
@@ -180,7 +182,8 @@ ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
ID3D11PixelShader* PixelShaderCache::GetDepthMatrixProgram(bool multisampled)
{
- if (!multisampled || s_DepthMatrixProgram[1]) return s_DepthMatrixProgram[multisampled];
+ if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1) return s_DepthMatrixProgram[0];
+ else if (s_DepthMatrixProgram[1]) return s_DepthMatrixProgram[1];
else
{
// create MSAA shader for current AA mode