Resolve texture format correctly on D3D11/D3D12 (#2859)

* D3D12: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.

* D3D11: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.
This commit is contained in:
Julian Xhokaxhiu 2022-08-09 20:37:44 +02:00 committed by GitHub
parent b9d2b78667
commit 8358bf6ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -4873,7 +4873,7 @@ namespace bgfx { namespace d3d11
for (uint32_t ii = _layer; ii < _numLayers; ++ii)
{
const UINT resource = _mip + (ii * m_numMips);
deviceCtx->ResolveSubresource(m_texture2d, resource, m_rt, resource, s_textureFormat[m_textureFormat].m_fmt);
deviceCtx->ResolveSubresource(m_texture2d, resource, m_rt, resource, s_textureFormat[m_textureFormat].m_fmtSrv);
}
}

View File

@ -5210,7 +5210,7 @@ namespace bgfx { namespace d3d12
, resource
, m_ptr
, resource
, s_textureFormat[m_textureFormat].m_fmt
, s_textureFormat[m_textureFormat].m_fmtSrv
);
}