Add clearDepth parameter to resolveBindTexture()

This commit is contained in:
Jack Andersen
2018-01-05 20:49:54 -10:00
parent ed618fa8cb
commit db82ba674b
6 changed files with 37 additions and 7 deletions

View File

@@ -1112,7 +1112,7 @@ struct D3D11CommandQueue : IGraphicsCommandQueue
}
void resolveBindTexture(const boo::ObjToken<ITextureR>& texture, const SWindowRect& rect,
bool tlOrigin, int bindIdx, bool color, bool depth)
bool tlOrigin, int bindIdx, bool color, bool depth, bool clearDepth)
{
const D3D11TextureR* tex = texture.cast<D3D11TextureR>();
if (color && tex->m_colorBindCount)
@@ -1135,6 +1135,9 @@ struct D3D11CommandQueue : IGraphicsCommandQueue
{
m_deferredCtx->CopyResource(tex->m_depthBindTex[bindIdx].Get(), tex->m_depthTex.Get());
}
if (clearDepth)
m_deferredCtx->ClearDepthStencilView(tex->m_dsv.Get(), D3D11_CLEAR_DEPTH, 0.0f, 0);
}
boo::ObjToken<ITextureR> m_doPresent;