From 2434b531f3d0051b886211e84cd43b4deb7990e6 Mon Sep 17 00:00:00 2001 From: "mr.greywater" Date: Sun, 8 Feb 2015 16:58:04 +0100 Subject: [PATCH] D3D: Fixed crash rendering EFB textures with MSAA Rendering EFB textures currently crashes with the D3D backend when MSAA is enabled, because the depth texture wasn't correctly resolved. An example for a crash would be starting Pokemon Snap with D3D and MSAA enabled. --- Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp index 00f7236c40..c4d215d413 100644 --- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp @@ -148,7 +148,7 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, D3D::context->OMSetRenderTargets(1, &m_outRTV, nullptr); ID3D11ShaderResourceView* pEFB = (srcFormat == PEControl::Z24) ? - FramebufferManager::GetEFBDepthTexture()->GetSRV() : + FramebufferManager::GetResolvedEFBDepthTexture()->GetSRV() : // FIXME: Instead of resolving EFB, it would be better to pick out a // single sample from each pixel. The game may break if it isn't // expecting the blurred edges around multisampled shapes.