Merge pull request #2082 from Armada651/resolve-depth
D3D: Use the correct format when resolving the EFB depth texture.
This commit is contained in:
commit
c3edab8f54
|
@ -45,7 +45,7 @@ D3DTexture2D* &FramebufferManager::GetResolvedEFBDepthTexture()
|
||||||
if (g_ActiveConfig.iMultisampleMode)
|
if (g_ActiveConfig.iMultisampleMode)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_efb.slices; i++)
|
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;
|
return m_efb.resolved_depth_tex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -78,7 +78,7 @@ static void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||||
else // D3D
|
else // D3D
|
||||||
{
|
{
|
||||||
WRITE(p, "sampler samp0 : register(s0);\n");
|
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, "void main(\n");
|
||||||
WRITE(p, " out float4 ocol0 : SV_Target, in float4 rawpos : SV_Position)\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
|
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
|
dest, xoffset, colorComp
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue