summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2015-12-28 01:13:42 +0100
committerMarkus Wick <degasus@users.noreply.github.com>2015-12-28 01:13:42 +0100
commit294bb753164b58eb0a1e9317eaf05ce3d5bb0209 (patch)
treeb8d7599b04718d94288fd2a7220ee4e8df296cc1 /Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
parent52d6a7505a3dc5c1a89d0795dcdcb20d7d01aff4 (diff)
parent63264ac23f3b9cfaa725cf90d995497ba1601449 (diff)
Merge pull request #3295 from stenzek/d3d-xfb-msaa
D3D: Fix multiple issues relating to MSAA
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
index 68a7a84d6a..5698077817 100644
--- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
@@ -96,6 +96,14 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p
HRESULT hr;
+ // Resolve MSAA targets before copying.
+ ID3D11ShaderResourceView* pEFB = (srcFormat == PEControl::Z24) ?
+ 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.
+ FramebufferManager::GetResolvedEFBColorTexture()->GetSRV();
+
// Reset API
g_renderer->ResetAPIState();
@@ -111,13 +119,6 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p
D3D::context->OMSetRenderTargets(1, &m_outRTV, nullptr);
- ID3D11ShaderResourceView* pEFB = (srcFormat == PEControl::Z24) ?
- 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.
- FramebufferManager::GetResolvedEFBColorTexture()->GetSRV();
-
EFBEncodeParams params;
params.SrcLeft = srcRect.left;
params.SrcTop = srcRect.top;