1
0
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:
Philip Rebohle 2018-06-29 12:44:52 +02:00
parent 4520b1ca8f
commit bc1384b7b4
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 18 additions and 0 deletions

View File

@ -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.");
}
}
}

View File

@ -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();
};