From a61c114519e28c2840c888f9c26a8a8338320c15 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 19 Feb 2025 00:40:06 +0100 Subject: [PATCH] [d3d11] Change AllowFlush behaviour No functional change, just makes it less annoying to use in methods that can be called from both immediate and deferred contexts- --- src/d3d11/d3d11_context.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 32f0ee77f..32fed700c 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -1085,7 +1085,7 @@ namespace dxvk { DxvkMultisampleState* pMsState, UINT SampleMask); - template + template void EmitCs(Cmd&& command) { m_cmdData = nullptr; @@ -1093,14 +1093,14 @@ namespace dxvk { GetTypedContext()->EmitCsChunk(std::move(m_csChunk)); m_csChunk = AllocCsChunk(); - if constexpr (AllowFlush) + if constexpr (!IsDeferred && AllowFlush) GetTypedContext()->ConsiderFlush(GpuFlushType::ImplicitWeakHint); m_csChunk->push(command); } } - template + template M* EmitCsCmd(Cmd&& command, Args&&... args) { M* data = m_csChunk->pushCmd( command, std::forward(args)...); @@ -1109,7 +1109,7 @@ namespace dxvk { GetTypedContext()->EmitCsChunk(std::move(m_csChunk)); m_csChunk = AllocCsChunk(); - if constexpr (AllowFlush) + if constexpr (!IsDeferred && AllowFlush) GetTypedContext()->ConsiderFlush(GpuFlushType::ImplicitWeakHint); // We must record this command after the potential