mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 01:54:16 +01:00
[d3d11] Issue warning when using a command list more than once
The way buffers are invalidated can cause issues when the same command list is submitted multiple times. Games don't seem to need this right now.
This commit is contained in:
parent
4520b1ca8f
commit
bc1384b7b4
@ -52,12 +52,25 @@ namespace dxvk {
|
||||
|
||||
for (const auto& chunk : m_chunks)
|
||||
cmdList->m_chunks.push_back(chunk);
|
||||
|
||||
MarkSubmitted();
|
||||
}
|
||||
|
||||
|
||||
void D3D11CommandList::EmitToCsThread(DxvkCsThread* CsThread) {
|
||||
for (const auto& chunk : m_chunks)
|
||||
CsThread->dispatchChunk(Rc<DxvkCsChunk>(chunk));
|
||||
|
||||
MarkSubmitted();
|
||||
}
|
||||
|
||||
|
||||
void D3D11CommandList::MarkSubmitted() {
|
||||
if (m_submitted.exchange(true) && !m_warned.exchange(true)) {
|
||||
Logger::warn(
|
||||
"D3D11: Command list submitted multiple times.\n"
|
||||
" This is currently not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -38,6 +38,11 @@ namespace dxvk {
|
||||
UINT const m_contextFlags;
|
||||
|
||||
std::vector<Rc<DxvkCsChunk>> m_chunks;
|
||||
|
||||
std::atomic<bool> m_submitted = { false };
|
||||
std::atomic<bool> m_warned = { false };
|
||||
|
||||
void MarkSubmitted();
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user