D3D: Fix EFB depth buffer copies, filtering on scaled EFB copies when MSAA is enabled, real XFB filtering

Since ResolveSubresource cannot be used with depth textures (and throws an error with the debug layer enabled), use a shader which selects the minimum depth value from all samples.

Changes the sampler by XFBEncoder to use a linear filter, rather than point, to match GL behavior.
This commit is contained in:
Stenzek
2015-11-28 21:33:47 +10:00
parent 5e803c3db3
commit 63264ac23f
7 changed files with 99 additions and 18 deletions

View File

@ -247,8 +247,7 @@ void XFBEncoder::Init()
// Create EFB texture sampler
D3D11_SAMPLER_DESC sd = CD3D11_SAMPLER_DESC(CD3D11_DEFAULT());
// FIXME: Should we really use point sampling here?
sd.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
sd.Filter = D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT;
hr = D3D::device->CreateSamplerState(&sd, &m_efbSampler);
CHECK(SUCCEEDED(hr), "create xfb encode texture sampler");
D3D::SetDebugObjectName(m_efbSampler, "xfb encoder texture sampler");