Don't specify BIND_DEPTH_STENCIL on 3D textures

This commit is contained in:
baldurk
2019-12-13 11:45:59 +00:00
parent 6ffd725a13
commit 66cd12f113
+3 -6
View File
@@ -3409,9 +3409,6 @@ ResourceId D3D11Replay::CreateProxyTexture(const TextureDescription &templateTex
desc.ArraySize = templateTex.arraysize;
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
if(templateTex.creationFlags & TextureCategory::DepthTarget)
desc.BindFlags |= D3D11_BIND_DEPTH_STENCIL;
desc.CPUAccessFlags = 0;
desc.Format = GetTypelessFormat(MakeDXGIFormat(templateTex.format));
desc.MipLevels = templateTex.mips;
@@ -3419,6 +3416,9 @@ ResourceId D3D11Replay::CreateProxyTexture(const TextureDescription &templateTex
desc.Usage = D3D11_USAGE_DEFAULT;
desc.Width = RDCMAX(1U, templateTex.width);
if(IsDepthFormat(desc.Format))
desc.BindFlags |= D3D11_BIND_DEPTH_STENCIL;
HRESULT hr = m_pDevice->CreateTexture1D(&desc, NULL, &throwaway);
if(FAILED(hr))
{
@@ -3477,9 +3477,6 @@ ResourceId D3D11Replay::CreateProxyTexture(const TextureDescription &templateTex
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
if(templateTex.creationFlags & TextureCategory::DepthTarget)
desc.BindFlags |= D3D11_BIND_DEPTH_STENCIL;
desc.CPUAccessFlags = 0;
desc.Format = GetTypelessFormat(MakeDXGIFormat(templateTex.format));
desc.MipLevels = templateTex.mips;