From 30d19cd0f2c0dab97979b9c56138415c0ac546f6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 29 Aug 2019 18:49:04 +0200 Subject: [PATCH] [d3d11] Rename some hazard tracking methods for clarity --- src/d3d11/d3d11_context.cpp | 46 ++++++++++++++++++------------------- src/d3d11/d3d11_context.h | 24 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 842e20b6..5d7f4276 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -2521,7 +2521,7 @@ namespace dxvk { uavSlotId + StartSlot + i, uav, ctrSlotId + StartSlot + i, ctr); - TestCsSrvHazards(uav); + ResolveCsSrvHazards(uav); } } } @@ -2645,10 +2645,10 @@ namespace dxvk { if (m_state.om.renderTargetViews[i] != rtv) { m_state.om.renderTargetViews[i] = rtv; needsUpdate = true; - TestOmSrvHazards(rtv); + ResolveOmSrvHazards(rtv); if (NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS) - TestOmUavHazards(rtv); + ResolveOmUavHazards(rtv); } } @@ -2657,7 +2657,7 @@ namespace dxvk { if (m_state.om.depthStencilView != dsv) { m_state.om.depthStencilView = dsv; needsUpdate = true; - TestOmSrvHazards(dsv); + ResolveOmSrvHazards(dsv); } m_state.om.maxRtv = NumRTVs; @@ -2687,10 +2687,10 @@ namespace dxvk { uavSlotId + i, uav, ctrSlotId + i, ctr); - TestOmSrvHazards(uav); + ResolveOmSrvHazards(uav); if (NumRTVs == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL) - needsUpdate |= TestOmRtvHazards(uav); + needsUpdate |= ResolveOmRtvHazards(uav); needsSpill = true; } @@ -3844,7 +3844,7 @@ namespace dxvk { template - void D3D11DeviceContext::TestSrvHazards( + void D3D11DeviceContext::ResolveSrvHazards( T* pView, D3D11ShaderResourceBindings& Bindings) { uint32_t slotId = computeSrvBinding(ShaderStage, 0); @@ -3873,18 +3873,26 @@ namespace dxvk { template - void D3D11DeviceContext::TestOmSrvHazards( + void D3D11DeviceContext::ResolveCsSrvHazards( T* pView) { if (!pView) return; - TestSrvHazards (pView, m_state.vs.shaderResources); - TestSrvHazards (pView, m_state.hs.shaderResources); - TestSrvHazards (pView, m_state.ds.shaderResources); - TestSrvHazards (pView, m_state.gs.shaderResources); - TestSrvHazards (pView, m_state.ps.shaderResources); + ResolveSrvHazards (pView, m_state.cs.shaderResources); + } + + + template + void D3D11DeviceContext::ResolveOmSrvHazards( + T* pView) { + if (!pView) return; + ResolveSrvHazards (pView, m_state.vs.shaderResources); + ResolveSrvHazards (pView, m_state.hs.shaderResources); + ResolveSrvHazards (pView, m_state.ds.shaderResources); + ResolveSrvHazards (pView, m_state.gs.shaderResources); + ResolveSrvHazards (pView, m_state.ps.shaderResources); } - bool D3D11DeviceContext::TestOmRtvHazards( + bool D3D11DeviceContext::ResolveOmRtvHazards( D3D11UnorderedAccessView* pView) { if (!pView || !pView->HasBindFlag(D3D11_BIND_RENDER_TARGET)) return false; @@ -3907,7 +3915,7 @@ namespace dxvk { } - void D3D11DeviceContext::TestOmUavHazards( + void D3D11DeviceContext::ResolveOmUavHazards( D3D11RenderTargetView* pView) { if (!pView || !pView->HasBindFlag(D3D11_BIND_UNORDERED_ACCESS)) return; @@ -3927,14 +3935,6 @@ namespace dxvk { } - template - void D3D11DeviceContext::TestCsSrvHazards( - T* pView) { - if (!pView) return; - TestSrvHazards (pView, m_state.cs.shaderResources); - } - - bool D3D11DeviceContext::ValidateRenderTargets( UINT NumViews, ID3D11RenderTargetView* const* ppRenderTargetViews, diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 0684c921..a9f4bdee 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -811,24 +811,24 @@ namespace dxvk { D3D11ShaderResourceView* pView); template - void TestSrvHazards( + void ResolveSrvHazards( T* pView, D3D11ShaderResourceBindings& Bindings); template - void TestOmSrvHazards( - T* pView); - - bool TestOmRtvHazards( - D3D11UnorderedAccessView* pView); - - void TestOmUavHazards( - D3D11RenderTargetView* pView); - - template - void TestCsSrvHazards( + void ResolveCsSrvHazards( T* pView); + template + void ResolveOmSrvHazards( + T* pView); + + bool ResolveOmRtvHazards( + D3D11UnorderedAccessView* pView); + + void ResolveOmUavHazards( + D3D11RenderTargetView* pView); + bool ValidateRenderTargets( UINT NumViews, ID3D11RenderTargetView* const* ppRenderTargetViews,