mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +01:00
[d3d11] Removed draw-call based context flush
Combined with the recent command submission optimization, this actually had a negative impact on performance.
This commit is contained in:
parent
ac1fe7c2b0
commit
65d84dabfe
@ -166,7 +166,6 @@ namespace dxvk {
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::Flush() {
|
||||
if (m_type == D3D11_DEVICE_CONTEXT_IMMEDIATE) {
|
||||
m_parent->FlushInitContext();
|
||||
m_executedDrawCalls = 0;
|
||||
|
||||
m_device->submitCommandList(
|
||||
m_context->endRecording(),
|
||||
@ -738,7 +737,6 @@ namespace dxvk {
|
||||
m_context->draw(
|
||||
VertexCount, 1,
|
||||
StartVertexLocation, 0);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -750,7 +748,6 @@ namespace dxvk {
|
||||
IndexCount, 1,
|
||||
StartIndexLocation,
|
||||
BaseVertexLocation, 0);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -764,7 +761,6 @@ namespace dxvk {
|
||||
InstanceCount,
|
||||
StartVertexLocation,
|
||||
StartInstanceLocation);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -780,7 +776,6 @@ namespace dxvk {
|
||||
StartIndexLocation,
|
||||
BaseVertexLocation,
|
||||
StartInstanceLocation);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -791,7 +786,6 @@ namespace dxvk {
|
||||
DxvkBufferSlice bufferSlice = buffer->GetBufferSlice(AlignedByteOffsetForArgs);
|
||||
|
||||
m_context->drawIndexedIndirect(bufferSlice, 1, 0);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -802,7 +796,6 @@ namespace dxvk {
|
||||
DxvkBufferSlice bufferSlice = buffer->GetBufferSlice(AlignedByteOffsetForArgs);
|
||||
|
||||
m_context->drawIndirect(bufferSlice, 1, 0);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -814,7 +807,6 @@ namespace dxvk {
|
||||
ThreadGroupCountX,
|
||||
ThreadGroupCountY,
|
||||
ThreadGroupCountZ);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -825,7 +817,6 @@ namespace dxvk {
|
||||
DxvkBufferSlice bufferSlice = buffer->GetBufferSlice(AlignedByteOffsetForArgs);
|
||||
|
||||
m_context->dispatchIndirect(bufferSlice);
|
||||
m_executedDrawCalls += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -1550,13 +1541,6 @@ namespace dxvk {
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
ID3D11DepthStencilView* pDepthStencilView) {
|
||||
// Optimization: If the app has executed at least a given
|
||||
// number of draw calls since the last explicit flush, flush
|
||||
// the context in order to keep the GPU busy. We'll do this
|
||||
// here because we are going to start a new render pass anyway.
|
||||
// if (m_executedDrawCalls >= 500)
|
||||
// this->Flush();
|
||||
|
||||
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||
D3D11RenderTargetView* view = nullptr;
|
||||
|
||||
|
@ -564,8 +564,6 @@ namespace dxvk {
|
||||
|
||||
D3D11ContextState m_state;
|
||||
|
||||
uint32_t m_executedDrawCalls = 0;
|
||||
|
||||
void BindConstantBuffers(
|
||||
DxbcProgramType ShaderStage,
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
|
Loading…
x
Reference in New Issue
Block a user