mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d11] Move OMSetRenderTargets optimization to D3D11ImmediateContext
We cannot call Flush() on deferred contexts anyway, so the command submission optimization should only be applied to immediate contexts.
This commit is contained in:
parent
ccfe1a346b
commit
1af52abb67
@ -1689,13 +1689,6 @@ namespace dxvk {
|
|||||||
UINT NumViews,
|
UINT NumViews,
|
||||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||||
ID3D11DepthStencilView* pDepthStencilView) {
|
ID3D11DepthStencilView* pDepthStencilView) {
|
||||||
// Optimization: If the number of draw and dispatch calls issued
|
|
||||||
// prior to the previous context flush is above a certain threshold,
|
|
||||||
// submit the current command buffer in order to keep the GPU busy.
|
|
||||||
// This also helps keep the command buffers at a reasonable size.
|
|
||||||
if (m_drawCount >= 500)
|
|
||||||
Flush();
|
|
||||||
|
|
||||||
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||||
D3D11RenderTargetView* view = nullptr;
|
D3D11RenderTargetView* view = nullptr;
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE OMSetRenderTargets(
|
void STDMETHODCALLTYPE OMSetRenderTargets(
|
||||||
UINT NumViews,
|
UINT NumViews,
|
||||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||||
ID3D11DepthStencilView* pDepthStencilView) final;
|
ID3D11DepthStencilView* pDepthStencilView);
|
||||||
|
|
||||||
void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews(
|
void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews(
|
||||||
UINT NumRTVs,
|
UINT NumRTVs,
|
||||||
|
@ -172,6 +172,22 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE D3D11ImmediateContext::OMSetRenderTargets(
|
||||||
|
UINT NumViews,
|
||||||
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||||
|
ID3D11DepthStencilView* pDepthStencilView) {
|
||||||
|
// Optimization: If the number of draw and dispatch calls issued
|
||||||
|
// prior to the previous context flush is above a certain threshold,
|
||||||
|
// submit the current command buffer in order to keep the GPU busy.
|
||||||
|
// This also helps keep the command buffers at a reasonable size.
|
||||||
|
if (m_drawCount >= 500)
|
||||||
|
Flush();
|
||||||
|
|
||||||
|
D3D11DeviceContext::OMSetRenderTargets(
|
||||||
|
NumViews, ppRenderTargetViews, pDepthStencilView);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT D3D11ImmediateContext::MapImage(
|
HRESULT D3D11ImmediateContext::MapImage(
|
||||||
D3D11CommonTexture* pResource,
|
D3D11CommonTexture* pResource,
|
||||||
UINT Subresource,
|
UINT Subresource,
|
||||||
|
@ -45,6 +45,11 @@ namespace dxvk {
|
|||||||
ID3D11Resource* pResource,
|
ID3D11Resource* pResource,
|
||||||
UINT Subresource) final;
|
UINT Subresource) final;
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE OMSetRenderTargets(
|
||||||
|
UINT NumViews,
|
||||||
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||||
|
ID3D11DepthStencilView* pDepthStencilView) final;
|
||||||
|
|
||||||
void SynchronizeCsThread();
|
void SynchronizeCsThread();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user