DX11: Fix stuff if MSAA is disabled.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6482 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2010-11-27 11:37:57 +00:00
parent 7698d85a8e
commit 5ae1b65388
1 changed files with 6 additions and 3 deletions

View File

@ -150,7 +150,8 @@ const char depth_matrix_program_msaa[] = {
ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled) 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 else
{ {
// create MSAA shader for current AA mode // create MSAA shader for current AA mode
@ -165,7 +166,8 @@ ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(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 else
{ {
// create MSAA shader for current AA mode // create MSAA shader for current AA mode
@ -180,7 +182,8 @@ ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
ID3D11PixelShader* PixelShaderCache::GetDepthMatrixProgram(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 else
{ {
// create MSAA shader for current AA mode // create MSAA shader for current AA mode