mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 07:26:34 +00:00
Don't specify BIND_DEPTH_STENCIL on 3D textures
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user