From 5ae1b65388f1c76ffeab3a11057242f4944bbb20 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 27 Nov 2010 11:37:57 +0000 Subject: [PATCH] DX11: Fix stuff if MSAA is disabled. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6482 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp | 9 ++++++--- 1 file 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