1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 09:23:53 +01:00

[d3d11] Increment sequence number when submitting command lists

This does not do any tracking on deferred contexts just yet.
This commit is contained in:
Philip Rebohle 2022-02-09 03:21:58 +01:00
parent d33dac569c
commit 2eeb7295c8
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 8 additions and 4 deletions

View File

@ -62,14 +62,17 @@ namespace dxvk {
}
void D3D11CommandList::EmitToCsThread(DxvkCsThread* CsThread) {
uint64_t D3D11CommandList::EmitToCsThread(DxvkCsThread* CsThread) {
uint64_t seq = 0;
for (const auto& query : m_queries)
query->DoDeferredEnd();
for (const auto& chunk : m_chunks)
CsThread->dispatchChunk(DxvkCsChunkRef(chunk));
seq = CsThread->dispatchChunk(DxvkCsChunkRef(chunk));
MarkSubmitted();
return seq;
}

View File

@ -29,7 +29,7 @@ namespace dxvk {
void EmitToCommandList(
ID3D11CommandList* pCommandList);
void EmitToCsThread(
uint64_t EmitToCsThread(
DxvkCsThread* CsThread);
private:

View File

@ -212,7 +212,8 @@ namespace dxvk {
// Dispatch command list to the CS thread and
// restore the immediate context's state
commandList->EmitToCsThread(&m_csThread);
uint64_t csSeqNum = commandList->EmitToCsThread(&m_csThread);
m_csSeqNum = std::max(m_csSeqNum, csSeqNum);
if (RestoreContextState)
RestoreState();