From c180174e4ac122176cf3387ee48d9d4498a4c725 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Fri, 20 Feb 2015 10:00:13 +0100 Subject: [PATCH 1/2] D3D: Use the correct format when resolving the EFB depth texture. --- Source/Core/VideoBackends/D3D/FramebufferManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp index 9027bc21d5..f6751b085f 100644 --- a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp @@ -45,7 +45,7 @@ D3DTexture2D* &FramebufferManager::GetResolvedEFBDepthTexture() if (g_ActiveConfig.iMultisampleMode) { for (int i = 0; i < m_efb.slices; i++) - D3D::context->ResolveSubresource(m_efb.resolved_depth_tex->GetTex(), D3D11CalcSubresource(0, i, 1), m_efb.depth_tex->GetTex(), D3D11CalcSubresource(0, i, 1), DXGI_FORMAT_R8G8B8A8_UNORM); + D3D::context->ResolveSubresource(m_efb.resolved_depth_tex->GetTex(), D3D11CalcSubresource(0, i, 1), m_efb.depth_tex->GetTex(), D3D11CalcSubresource(0, i, 1), DXGI_FORMAT_R24_UNORM_X8_TYPELESS); return m_efb.resolved_depth_tex; } else From 139ad3b2b91564126af2be1d285093b79ce2a1c0 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sat, 21 Feb 2015 11:38:42 +0100 Subject: [PATCH 2/2] TextureConversionShader: Use a Texture2DArray to match the shader resource view. --- Source/Core/VideoCommon/TextureConversionShader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index 87e222c37f..99559db08b 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -78,7 +78,7 @@ static void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType) else // D3D { WRITE(p, "sampler samp0 : register(s0);\n"); - WRITE(p, "Texture2D Tex0 : register(t0);\n"); + WRITE(p, "Texture2DArray Tex0 : register(t0);\n"); WRITE(p, "void main(\n"); WRITE(p, " out float4 ocol0 : SV_Target, in float4 rawpos : SV_Position)\n"); @@ -126,7 +126,7 @@ static void WriteSampleColor(char*& p, const char* colorComp, const char* dest, } else { - WRITE(p, " %s = Tex0.Sample(samp0, uv0 + float2(%d, 0) * sample_offset).%s;\n", + WRITE(p, " %s = Tex0.Sample(samp0, float3(uv0 + float2(%d, 0) * sample_offset, 0.0)).%s;\n", dest, xoffset, colorComp ); }