Merge pull request #1677 from raizam/master

d3d11: use old OMSetRenderTargets when UnorderedAccessViews not availlable
This commit is contained in:
Бранимир Караџић 2019-03-07 09:26:25 -08:00 committed by GitHub
commit 91f7e954f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4945,15 +4945,22 @@ namespace bgfx { namespace d3d11
void FrameBufferD3D11::set()
{
s_renderD3D11->m_deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
m_num
, m_rtv
, m_dsv
, 16
, m_numUav
, m_uav
, NULL
);
if (0 < m_numUav)
{
s_renderD3D11->m_deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
m_num
, m_rtv
, m_dsv
, 16
, m_numUav
, m_uav
, NULL
);
}
else
{
s_renderD3D11->m_deviceCtx->OMSetRenderTargets(m_num, m_rtv, m_dsv);
}
m_needPresent = UINT16_MAX != m_denseIdx;
s_renderD3D11->m_currentColor = m_rtv[0];
s_renderD3D11->m_currentDepthStencil = m_dsv;