summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-12-25 12:09:35 +0100
committerJules Blok <jules.blok@gmail.com>2014-12-25 12:09:35 +0100
commit833513f38413dc0f6af47067b223125c3de3eeaf (patch)
tree8f1a497ff05475eba27008228dbf308702c41a09 /Source/Core/VideoBackends/D3D/XFBEncoder.cpp
parentaf8ac328e5fb83266a55b2117925beed0a48e2f4 (diff)
XFBEncoder: Sample the first layer of the resolved EFB texture.
Using the multisampled EFB texture is invalid, as the XFB encoder does not have a multisampling shader.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/XFBEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/XFBEncoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
index 955fb38bc8..9e95e1ea74 100644
--- a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
@@ -78,7 +78,7 @@ static const char XFB_ENCODE_PS[] =
"} Params;\n"
"}\n"
-"Texture2D EFBTexture : register(t0);\n"
+"Texture2DArray EFBTexture : register(t0);\n"
"sampler EFBSampler : register(s0);\n"
// GameCube/Wii uses the BT.601 standard algorithm for converting to YCbCr; see
@@ -92,7 +92,7 @@ static const char XFB_ENCODE_PS[] =
"float3 SampleEFB(float2 coord)\n"
"{\n"
"float2 texCoord = lerp(float2(Params.TexLeft,Params.TexTop), float2(Params.TexRight,Params.TexBottom), coord / float2(Params.Width,Params.Height));\n"
- "return EFBTexture.Sample(EFBSampler, texCoord).rgb;\n"
+ "return EFBTexture.Sample(EFBSampler, float3(texCoord, 0)).rgb;\n"
"}\n"
"void main(out float4 ocol0 : SV_Target, in float4 Pos : SV_Position, in float2 Coord : ENCODECOORD)\n"
@@ -311,7 +311,7 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR
D3D::context->OMSetRenderTargets(1, &m_outRTV, nullptr);
- ID3D11ShaderResourceView* pEFB = FramebufferManager::GetEFBColorTexture()->GetSRV();
+ ID3D11ShaderResourceView* pEFB = FramebufferManager::GetResolvedEFBColorTexture()->GetSRV();
D3D::stateman->SetVertexConstants(m_encodeParams);
D3D::stateman->SetPixelConstants(m_encodeParams);